lib/synx/project.rb in synx-0.0.52 vs lib/synx/project.rb in synx-0.0.53

- old
+ new

@@ -5,22 +5,22 @@ class Project < Xcodeproj::Project SYNXRONIZE_DIR = File.join(ENV["HOME"], '.synx') private_constant :SYNXRONIZE_DIR - DEFAULT_EXCLUSIONS = %W(/Libraries /Frameworks /Products) + DEFAULT_EXCLUSIONS = %W(/Libraries /Frameworks /Products /Pods) private_constant :DEFAULT_EXCLUSIONS attr_accessor :delayed_groups_set_path, :group_exclusions, :prune def sync(options={}) set_options(options) presync_check Synx::Tabber.increase Synx::Tabber.puts "Syncing files that are included in Xcode project...".bold.white main_group.all_groups.each { |gr| gr.sync(main_group) } - puts "\n\n" unless options[:quiet] + Synx::Tabber.puts "\n\n" Synx::Tabber.puts "Syncing files that are not included in Xcode project..".bold.white main_group.all_groups.each(&:move_entries_not_in_xcodeproj) transplant_work_project Synx::Tabber.decrease save @@ -47,11 +47,11 @@ self.group_exclusions = DEFAULT_EXCLUSIONS end self.group_exclusions |= options[:group_exclusions] if options[:group_exclusions] - Synx::Tabber.quiet = options[:quiet] + Synx::Tabber.options = options end private :set_options def transplant_work_project # Move the synced entries over @@ -91,24 +91,23 @@ def pathname_is_inside_root_pathname?(grandchild_pathname) grandchild_pathname.realpath.to_s.start_with?(root_pathname.realpath.to_s) end def group_exclusions=(new_exclusions) - new_exclusions.each do |exclusion| + @group_exclusions = new_exclusions.map do |exclusion| # Group paths always start with a '/', so put one there if it isn't already. - exclusion.prepend("/") unless exclusion[0] == "/" + exclusion = "/" + exclusion unless exclusion[0] == "/" # Don't check our own default exclusions -- they may not have it in their project. unless DEFAULT_EXCLUSIONS.include?(exclusion) # remove leading '/' for this check - exclusion = exclusion.dup - exclusion[0] = '' - unless self[exclusion] - raise IndexError, "No group #{exclusion} exists" + exclusionCopy = exclusion.dup + exclusionCopy[0] = '' + unless self[exclusionCopy] + raise IndexError, "No group #{exclusionCopy} exists" end end + exclusion end - - @group_exclusions = new_exclusions end def has_object_for_pathname?(pathname) @unmodified_project ||= Synx::Project.open(path) @unmodified_project.objects.any? do |o|