Skip to content

Commit

Permalink
Added check for empty file_type [Fixed #116]
Browse files Browse the repository at this point in the history
  • Loading branch information
Beniamin Sarkisyan committed Jun 7, 2016
1 parent 23f7eb6 commit 0646ce6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions lib/generamba/helpers/xcodeproj_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,10 @@ def self.add_file_to_project_and_targets(project, targets_name, group_path, file
file_type = 'resource'
end
end

self.add_file_to_target(xcode_target, xcode_file, file_type)

if file_type != nil
self.add_file_to_target(xcode_target, xcode_file, file_type)
end
end
end

Expand Down
3 changes: 1 addition & 2 deletions lib/generamba/module_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ def process_files_if_needed(files, name, code_module, template, project, targets

# Generating the content of the code file and it's name
file_name, file_content = ContentGenerator.create_file(file, code_module, template)
file_path = dir_path.join(file_group)
.join(file_name)
file_path = dir_path.join(file_group).join(file_name)

# Creating the file in the filesystem
FileUtils.mkdir_p File.dirname(file_path)
Expand Down

0 comments on commit 0646ce6

Please sign in to comment.