survey_generator 0.2.96 → 0.2.97
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/generators/survey/survey_generator.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjI1M2E2OTFiNmJkNzg5MTBjZTE3NWI0ZDc2NmY3ZmZlMDEyZjNiMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NmRiNzk2NDRmODU2ZGQ2NzhiNTc3ODQ5ZDQyN2RjNGNkZGI5YTYwMA==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
Y2NlYmI0NDdhZjlmZTRhZjFjYjRmNDNjNmI2NGNjODAwZmQwNGQzMzZmNGRj
|
10
|
+
YzYxMWJhODk4MDY5ZTU2YmI4MmY2N2NhZTAzZTE5N2VmMGVkODljYmZmMTAw
|
11
|
+
YmQ0ZjM0ZjQ2NGZhMTVmNGFhNTZhMTk2NDFkMWU1Y2M1OTNkNjM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YmE5Mzc4YjI4MTNlYmQzNDczM2E4MjA3MzhmMTMxOTc1NWMzMDE2NmIwYTU0
|
14
|
+
ZDE2Y2RiMGE4YWVmMWFiNjVmMzg5MjQ5N2Y2ZThiY2QxYTA0NmM2NGVkYzBl
|
15
|
+
ZmY5ZTI4MDM2ZGM2NTlmYjFmZDUxNWNiZjIyZjUyMDA1NjVjY2I=
|
@@ -84,7 +84,7 @@ class SurveyGenerator < Rails::Generators::Base
|
|
84
84
|
out "Initializing application (adding needed gems, removing unused files, bundling)"
|
85
85
|
|
86
86
|
file_name = "Gemfile"
|
87
|
-
File.new(file_name)
|
87
|
+
File.new(file_name) unless File.exists?(file_name)
|
88
88
|
File.open(file_name, 'r+') do |file|
|
89
89
|
file.puts("source 'https://rubygems.org'")
|
90
90
|
end
|
@@ -135,7 +135,9 @@ class SurveyGenerator < Rails::Generators::Base
|
|
135
135
|
def create_model
|
136
136
|
out "Creating model file and base definition"
|
137
137
|
|
138
|
-
|
138
|
+
model_directory = File.dirname(model_path)
|
139
|
+
FileUtils.mkdir_p(model_directory) unless File.exists?(model_directory)
|
140
|
+
File.new(model_path, 'w') unless File.exists?(model_path)
|
139
141
|
File.open(model_path, 'r+') do |file|
|
140
142
|
file.puts("require 'rgen/model_builder'")
|
141
143
|
file.puts("require 'metamodels/survey_metamodel'")
|