lib/susanoo/generators/cordova.rb in susanoo-0.10.0 vs lib/susanoo/generators/cordova.rb in susanoo-0.11.1

- old
+ new

@@ -8,11 +8,11 @@ def initialize_project fname = Susanoo::Project.folder_name.dup # Java Package name - package_name = ask "Java Package Name: ".colorize(:light_green) + package_name = ask 'Java Package Name: '.colorize(:light_green) if package_name.chomp.strip.empty? package_name = "com.example.#{fname.gsub("-", "_")}" else if package_name.chomp.split(".").length < 3 say "Package name format should be like 'suffix.domain.subdomain'".colorize(:red) @@ -26,28 +26,28 @@ say "Initializing project with Apache Cordova #{version} at #{CORDOVA_PATH}" system "cordova create #{Susanoo::Project.folder_name} #{package_name.chomp} #{project_name.chomp}" end def platforms - platforms = ask "Platforms (comma separated): ".colorize(:light_blue) + platforms = ask 'Platforms (comma separated): '.colorize(:light_blue) inside Susanoo::Project.folder_name do platforms.chomp.split(",").each do |platform| say "Adding #{platform.strip} platform ...".colorize(:green) system "cordova platform add #{platform.strip}" end - say "Adding console plugin to project".colorize(:green) - system "cordova plugin add org.apache.cordova.console" + say 'Adding console plugin to project'.colorize(:green) + system 'cordova plugin add org.apache.cordova.console' end end def remove_default_files say "Removing cordova default files . . .".colorize(:yellow) inside Susanoo::Project.folder_name do - inside "www" do - remove_file "index.html" - remove_file "js" - remove_file "css" - remove_file "img" + inside 'www' do + remove_file 'index.html' + remove_file 'js' + remove_file 'css' + remove_file 'img' end end end def self.is_global_generator?