oa_angular_setup 0.1.1 → 0.1.2
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/oa_angular_setup/initialize_angular.rb +2 -0
- data/lib/oa_angular_setup/version.rb +1 -1
- 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: dffed1a65a488eedb2d54a363883366a213c1509
|
|
4
|
+
data.tar.gz: 652fa6f53b5b60a3550841216f6d4f55bf860c96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8982ec7852aecf64ea756591c370558888671294da31ff7baba176556e2630a4952fc69c7b88f40ae60de98abd5c14d1845d4431f6f625536b7fd5df5fbe7454
|
|
7
|
+
data.tar.gz: 5a6e14e1037cbd5058b2e573b32e2520ab2c396399b63e9300bd90acd98a0cd1a70707fe7655b18958c0561b2c29fffa18b0817b2618a8ff874ca16c645d6ff5
|
|
@@ -225,6 +225,7 @@ class AngularInitializer
|
|
|
225
225
|
|
|
226
226
|
def update_factory(apis, model, name)
|
|
227
227
|
Dir.mkdir("#{@destination}factories") unless File.exists?("#{@destination}factories")
|
|
228
|
+
return write_factories(apis, model_name, app_name) unless File.exists?("#{@destination}factories/#{model}_factory.js")
|
|
228
229
|
|
|
229
230
|
fh1 = name + ".factory('"
|
|
230
231
|
fh2 = "', ['$resource', function($resource){\n"
|
|
@@ -319,6 +320,7 @@ class AngularInitializer
|
|
|
319
320
|
|
|
320
321
|
def update_controllers(apis, model_name, app_name)
|
|
321
322
|
Dir.mkdir("#{@destination}controllers") unless File.exists?("#{@destination}controllers")
|
|
323
|
+
return write_controllers(apis, model_name, app_name) unless File.exists?("#{@destination}controllers/#{model}_controllers.js")
|
|
322
324
|
output, edited_controller_titles = [], []
|
|
323
325
|
model = model_name.delete('/')
|
|
324
326
|
file_contents = File.read("#{@destination}controllers/#{model}_controllers.js")
|