ror_generators 0.2.2 → 0.2.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 56856411cf18a98f59733a837f6840c64aa811ab
4
- data.tar.gz: f85c1bbe3ea5ada1bad12eb4ae5c376690ffe6df
3
+ metadata.gz: f97e275974b99ac44bb312c93d90317043ec5de0
4
+ data.tar.gz: 821f047a16093431d1cab36a34a88171ba1fc635
5
5
  SHA512:
6
- metadata.gz: 2302ebcb75793903d2566eb32f2dfbe3d6a97df0968265c5bdc2debbdeb844a8e636764c83e1bf0fdadf30f24c0e71509fd89dde912b4659182341d6fdad01e6
7
- data.tar.gz: 173721f96d8d9f0d28d3ea2bde842e99648cbfca7565c10193f179587db7958b1049c918432bc76fe4e8cd41e622753e7405f1435c75517733a3ae9dfc2c02f6
6
+ metadata.gz: 198b25837f4645710a3693e218531721d86f77635b2ced5a3052b38b576751b383039e87364f732ec8f8cda70e9bb8a78989ef871c407d8f2960ea43df2a3053
7
+ data.tar.gz: c6293fcef1229243aabe6ae9be00293948b0090120071f952633ae6067391fb1d484eb7cacbdb546dfdaa0d6f1d1d7807b59cc57ea5297e0d57331cccf00477f
@@ -49,8 +49,8 @@ module RorGenerators
49
49
  def copy_webpack_config
50
50
  if dest_file_exists?("client/webpack.config.js")
51
51
  inject_into_file "client/webpack.config.js", after: "'babel-polyfill',\n" do
52
- "'./app/bundles/#{module_name}/startup/registration',\n"
53
- end
52
+ "\t\t\t'./app/bundles/#{module_name}/startup/registration',\n"
53
+ end unless in_bundle?
54
54
  else
55
55
  template "client/webpack.config.js.erb", "client/webpack.config.js"
56
56
  end
@@ -131,8 +131,13 @@ module RorGenerators
131
131
  contents.gsub!(regexp, replacement)
132
132
  File.open(client_package_json, "w+") { |f| f.puts contents }
133
133
  end
134
+
135
+ def in_bundle?
136
+ File.readlines('client/webpack.config.js').find do |line|
137
+ line.match("'./app/bundles/#{module_name}/startup/registration',\n")
138
+ end
139
+ end
134
140
 
135
141
  end
136
-
137
142
  end
138
143
  end
@@ -1,3 +1,3 @@
1
1
  module RorGenerators
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ror_generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dakota Martinez