synx 0.1.1 → 0.2.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 74142cf3a5e0d46f82e134875bb73915f808fc8d
4
- data.tar.gz: 54e49357628af0ad7be41ca87c527fce39120628
3
+ metadata.gz: f274857ea258f15c41e4cd795ee132e10c65aab2
4
+ data.tar.gz: 540ffdcc6752f0e5a1fe417e94b06ce53fba489f
5
5
  SHA512:
6
- metadata.gz: d90feceead72d99ea756d734021bcea3a68d06abbb64b9c19b9a1a0cc162c50cc197a63942d41bf5e38a92b490bdcab2f43ea3ff5d49087a478ccae629f39552
7
- data.tar.gz: 2ab81fac87a35684ec791964fafe44d40b685db87ebfdb72c2040427636deb9e932556978ee7d09ce771e8f358ddd588b49ebc20af05105154db28c2004f8a4e
6
+ metadata.gz: ca501f7cf96443618567cbd3a36dfcb47db0f5b06e103729cb1546fb5b481d4339966be684a86ac954861339c300ad64f13e6b339cf2ed6a4a61a53f56f182d6
7
+ data.tar.gz: 50865879aae17780b10c70b100d656074c7ea4d5796be5d2d73fd9559b95a0624a01ff653896de104c5fd086c7b522b8f7540393174e41a59150237321f59d05
data/README.md CHANGED
@@ -42,6 +42,7 @@ Synx supports the following options:
42
42
  --prune, -p remove source files and image resources that are not referenced by the the Xcode project
43
43
  --no-color removes all color from the output
44
44
  --no-default-exclusions doesn't use the default exclusions of /Libraries, /Frameworks, and /Products
45
+ --no-sort-by-name disable sorting groups by name
45
46
  --quiet, -q silence all output
46
47
  --exclusion, -e EXCLUSION ignore an Xcode group while syncing
47
48
  ```
data/bin/synx CHANGED
@@ -9,6 +9,7 @@ Clamp do
9
9
  option ["--prune", "-p"], :flag, "remove source files and image resources that are not referenced by the the xcode project"
10
10
  option "--no-color", :flag, "removes all color from the output"
11
11
  option "--no-default-exclusions", :flag, "doesn't use the default exclusions of /Libraries, /Frameworks, and /Products"
12
+ option "--no-sort-by-name", :flag, "disable sorting groups by name"
12
13
  option ["--quiet", "-q"], :flag, "silence all output"
13
14
  option ["--exclusion", "-e"], "EXCLUSION", "ignore an Xcode group while syncing", :multivalued => true
14
15
  option ["--version", "-v"], :flag, "shows synx version" do
@@ -21,7 +22,7 @@ Clamp do
21
22
  puts "You cannot run Synx as root.".red
22
23
  else
23
24
  project = Synx::Project.open(xcodeproj_path)
24
- project.sync(:prune => prune?, :quiet => quiet?, :no_color => no_color?, :no_default_exclusions => no_default_exclusions?, :group_exclusions => exclusion_list)
25
+ project.sync(:prune => prune?, :quiet => quiet?, :no_color => no_color?, :no_default_exclusions => no_default_exclusions?, :no_sort_by_name => no_sort_by_name?, :group_exclusions => exclusion_list)
25
26
  end
26
27
  end
27
28
 
data/lib/synx/project.rb CHANGED
@@ -10,7 +10,7 @@ module Synx
10
10
  DEFAULT_EXCLUSIONS = %W(/Libraries /Frameworks /Products /Pods)
11
11
  private_constant :DEFAULT_EXCLUSIONS
12
12
 
13
- attr_accessor :delayed_groups_set_path, :group_exclusions, :prune
13
+ attr_accessor :delayed_groups_set_path, :group_exclusions, :prune, :sort_by_name
14
14
 
15
15
  def sync(options={})
16
16
  set_options(options)
@@ -21,7 +21,7 @@ module Synx
21
21
  Synx::Tabber.puts "\n\n"
22
22
  Synx::Tabber.puts "Syncing files that are not included in Xcode project..".bold.white
23
23
  main_group.all_groups.each(&:move_entries_not_in_xcodeproj)
24
- main_group.sort_by_name
24
+ main_group.sort_by_name if self.sort_by_name
25
25
  transplant_work_project
26
26
  Synx::Tabber.decrease
27
27
  save
@@ -49,6 +49,7 @@ module Synx
49
49
  end
50
50
 
51
51
  self.group_exclusions |= options[:group_exclusions] if options[:group_exclusions]
52
+ self.sort_by_name = !options[:no_sort_by_name]
52
53
 
53
54
  Synx::Tabber.options = options
54
55
  end
data/lib/synx/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Synx
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
@@ -24,7 +24,7 @@ module Xcodeproj
24
24
  group.sync(self)
25
25
  end
26
26
  sync_path
27
- sort_by_name
27
+ sort_by_name if project.sort_by_name
28
28
 
29
29
  Synx::Tabber.decrease
30
30
  end
@@ -93,7 +93,7 @@ module Xcodeproj
93
93
  private :handle_unused_entry
94
94
 
95
95
  def handle_unused_file(file_pathname)
96
- prune_file_extensions = %W(.h .m .xib .mm .c .png .jpg .jpeg)
96
+ prune_file_extensions = %W(.h .m .swift .mm .c .xib .png .jpg .jpeg)
97
97
  is_file_to_prune = prune_file_extensions.include?(file_pathname.extname.downcase)
98
98
 
99
99
  if is_file_to_prune && project.prune
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Larsen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-15 00:00:00.000000000 Z
11
+ date: 2016-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler