reactive_rails_generator 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5803d719ad896dccda1b87c1441f2ad1e40fb54f
|
4
|
+
data.tar.gz: 061cf172fe62ff09ca194e2e6dc23eee88ed02a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e4233b04f162f3dec69ad777a99320dace76dc08a4fb496dec3d01c6e5823c7de3639ac4a31cb8ebcd111389f6bc644a55b49050079ff14962ee1fbd7e557f08
|
7
|
+
data.tar.gz: 4284a31879ea6b7ba9c0a252310e76a6bd993af80e2bbd1abd327a3cdecc67a4c4fe3c9024b9376559839692d44abf373ea5431eed2eb031161b7367d742008f
|
@@ -10,7 +10,7 @@ module Reactrb
|
|
10
10
|
@modules = component_array[0..-2]
|
11
11
|
@file_name = component_array.last
|
12
12
|
@indet = 1
|
13
|
-
template "component_template.rb", File.join('app/react/components', @modules.join("/"), "#{@file_name.underscore}.rb")
|
13
|
+
template "component_template.rb", File.join('app/react/components', @modules.map(&:downcase).join("/"), "#{@file_name.underscore}.rb")
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -52,6 +52,11 @@ require_tree './models'
|
|
52
52
|
end
|
53
53
|
end
|
54
54
|
|
55
|
+
def add_config
|
56
|
+
application "config.assets.paths << ::Rails.root.join('app', 'react').to_s"
|
57
|
+
application 'config.autoload_paths += %W(#{config.root}/app/react/models)' if options[:"reactive-record"] || options[:all]
|
58
|
+
end
|
59
|
+
|
55
60
|
def add_gems
|
56
61
|
gem 'reactive-ruby'
|
57
62
|
gem 'react-rails', '~> 1.3.0'
|
@@ -59,7 +64,6 @@ require_tree './models'
|
|
59
64
|
gem 'therubyracer', platforms: :ruby
|
60
65
|
|
61
66
|
# optional gems
|
62
|
-
gem 'opal-jquery' if options[:"opal-jquery"] || options[:all]
|
63
67
|
gem 'reactive-router' if options[:"reactive-router"] || options[:all]
|
64
68
|
gem 'reactive-record' if options[:"reactive-record"] || options[:all]
|
65
69
|
end
|