synx 0.0.54 → 0.0.61
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +115 -0
- data/bin/synx +10 -2
- data/lib/synx/version.rb +1 -1
- data/lib/synx/xcodeproj_ext.rb +0 -1
- data/lib/synx/xcodeproj_ext/project/object/abstract_object.rb +22 -13
- data/lib/synx/xcodeproj_ext/project/object/pbx_file_reference.rb +2 -2
- data/lib/synx/xcodeproj_ext/project/object/pbx_group.rb +21 -20
- data/spec/dummy/dummy.xcodeproj/project.pbxproj +5 -10
- data/spec/dummy/dummy/en.lproj/Localizable.strings +2 -0
- data/spec/dummy/dummy/en.lproj/de.lproj/Localizable.strings +9 -0
- data/spec/synx/expected_file_structure.yml +2 -0
- data/spec/synx/project_spec.rb +1 -1
- metadata +24 -22
- data/lib/synx/xcodeproj_ext/project/object/pbx_variant_group.rb +0 -35
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e7857c0dc76b55453433714997f34307c5e0fa0
|
4
|
+
data.tar.gz: 12ab93749daa6a68902913eb595106eae891b726
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cdea1a333bba58a9b18e310f3438f38ace0b755aceaa97bc9d52198e0737f124edbb1c0a6b600dfecd4739c27832847b0bace69b17992c2d91ce700f31b17c81
|
7
|
+
data.tar.gz: ef602a4b02017f3e5b8060e1e40c33402a76d2895de1b61bc2da1123781d55d45420e1304c7aa7624e6f38ada350075ded32d7fbd2ab566e032da19fd0ffd022
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,115 @@
|
|
1
|
+
# CHANGELOG
|
2
|
+
|
3
|
+
## v0.0.6
|
4
|
+
|
5
|
+
* Make synx work for localized files
|
6
|
+
[archaeopterasa](https://github.com/archaeopterasa)
|
7
|
+
[#63](https://github.com/venmo/slather/pull/63)
|
8
|
+
|
9
|
+
* Prohibit running Synx as root to avoid file permission issues
|
10
|
+
[Mark Larsen](https://github.com/marklarr)
|
11
|
+
[#60](https://github.com/venmo/slather/pull/60)
|
12
|
+
|
13
|
+
* Add a command to show the version of Synx
|
14
|
+
[Mark Larsen](https://github.com/marklarr)
|
15
|
+
[#61](https://github.com/venmo/slather/pull/61)
|
16
|
+
|
17
|
+
## v0.0.54
|
18
|
+
|
19
|
+
* Use xcodeproj v0.20.0
|
20
|
+
[Mark Larsen](https://github.com/marklarr)
|
21
|
+
|
22
|
+
## v0.0.53
|
23
|
+
|
24
|
+
* Pods as a default exclusion + Fix for Exclusion path crash
|
25
|
+
[Dustin Bachrach](https://github.com/dbachrach)
|
26
|
+
[#51](https://github.com/venmo/synx/pull/51)
|
27
|
+
|
28
|
+
* Separate xcodeproj monkey patching
|
29
|
+
[Alex Genco](https://github.com/alexgenco)
|
30
|
+
[#39](https://github.com/venmo/synx/pull/39)
|
31
|
+
|
32
|
+
* Fix various `require` and `File.join` calls
|
33
|
+
[Alex Genco](https://github.com/alexgenco)
|
34
|
+
[#38](https://github.com/venmo/synx/pull/38)
|
35
|
+
|
36
|
+
* Remove output from tests
|
37
|
+
[Alex Genco](https://github.com/alexgenco)
|
38
|
+
[#37](https://github.com/venmo/synx/pull/37)
|
39
|
+
|
40
|
+
* Remove class variables from Tabber
|
41
|
+
[Alex Genco](https://github.com/alexgenco)
|
42
|
+
[#36](https://github.com/venmo/synx/pull/36)
|
43
|
+
|
44
|
+
* Fix misspelling of 'amended'
|
45
|
+
[Seth Friedman](https://github.com/sethfri)
|
46
|
+
[#35](https://github.com/venmo/synx/pull/35)
|
47
|
+
|
48
|
+
* Add support for the --no-color option.
|
49
|
+
[samsymons](https://github.com/samsymons)
|
50
|
+
[#32](https://github.com/venmo/synx/pull/32)
|
51
|
+
|
52
|
+
* Document the --quiet option.
|
53
|
+
[Sam Symons](https://github.com/samsymons)
|
54
|
+
[#31](https://github.com/venmo/synx/pull/31)
|
55
|
+
|
56
|
+
## v0.0.52
|
57
|
+
|
58
|
+
* Bug fix for en.lproj syncing
|
59
|
+
[Mark Larsen](https://github.com/marklarr)
|
60
|
+
[#30](https://github.com/venmo/slather/pull/30)
|
61
|
+
|
62
|
+
* Add support for a --quiet option
|
63
|
+
[Sam Symons](https://github.com/samsymons)
|
64
|
+
[#29](https://github.com/venmo/slather/pull/29)
|
65
|
+
|
66
|
+
## v0.0.51
|
67
|
+
|
68
|
+
* Fix regex escaping causing sync issues on paths with special characters
|
69
|
+
[Matt Lewix](https://github.com/mplewis)
|
70
|
+
[#22](https://github.com/venmo/slather/pull/22)
|
71
|
+
|
72
|
+
* Change Dir globbing to also find hidden files, and ignore .DS_Store files
|
73
|
+
[Mark Larsen](https://github.com/marklarr)
|
74
|
+
[#21](https://github.com/venmo/slather/pull/21)
|
75
|
+
|
76
|
+
## v0.0.5
|
77
|
+
|
78
|
+
* Be more forgiving with exclusion paths
|
79
|
+
[Mark Larsen](https://github.com/marklarr)
|
80
|
+
[#18](https://github.com/venmo/slather/pull/17)
|
81
|
+
|
82
|
+
* Abort sync if project has groups containing a forward slash
|
83
|
+
[Mark Larsen](https://github.com/marklarr)
|
84
|
+
[#17](https://github.com/venmo/slather/pull/17)
|
85
|
+
|
86
|
+
## v0.0.4
|
87
|
+
|
88
|
+
* Allow all abstract targets to have build settings changed
|
89
|
+
[Mark Larsen](https://github.com/marklarr)
|
90
|
+
[#11](https://github.com/venmo/slather/pull/11)
|
91
|
+
|
92
|
+
* Fix an exception being raised with aggregate targets
|
93
|
+
[Kyle Fuller](https://github.com/kylef)
|
94
|
+
[#10](https://github.com/venmo/slather/pull/10)
|
95
|
+
|
96
|
+
* Linkify Contributors
|
97
|
+
[Ayaka Nonaka](https://github.com/ayanonagon)
|
98
|
+
[#7](https://github.com/venmo/slather/pull/7)
|
99
|
+
|
100
|
+
## v0.0.3
|
101
|
+
|
102
|
+
* Accommodate for case insensitive dir names
|
103
|
+
[Mark Larsen](https://github.com/marklarr)
|
104
|
+
[#5](https://github.com/venmo/slather/pull/5)
|
105
|
+
|
106
|
+
* Removing mention of Gemfile from installation instructions
|
107
|
+
[Mattt Thompson](https://github.com/mattt)
|
108
|
+
[#2](https://github.com/venmo/slather/pull/2)
|
109
|
+
|
110
|
+
## v0.0.2
|
111
|
+
|
112
|
+
* Initial Release
|
113
|
+
[Mark Larsen](https://github.com/marklarr)
|
114
|
+
[#1](https://github.com/venmo/slather/pull/1)
|
115
|
+
|
data/bin/synx
CHANGED
@@ -11,10 +11,18 @@ Clamp do
|
|
11
11
|
option "--no-default-exclusions", :flag, "doesn't use the default exclusions of /Libraries, /Frameworks, and /Products"
|
12
12
|
option ["--quiet", "-q"], :flag, "silence all output"
|
13
13
|
option ["--exclusion", "-e"], "EXCLUSION", "ignore an Xcode group while syncing", :multivalued => true
|
14
|
+
option ["--version", "-v"], :flag, "shows synx version" do
|
15
|
+
puts "Synx #{Synx::VERSION}"
|
16
|
+
exit(0)
|
17
|
+
end
|
14
18
|
|
15
19
|
def execute
|
16
|
-
|
17
|
-
|
20
|
+
if Process.uid == 0
|
21
|
+
puts "You cannot run Synx as root.".red
|
22
|
+
else
|
23
|
+
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
|
+
end
|
18
26
|
end
|
19
27
|
|
20
28
|
end
|
data/lib/synx/version.rb
CHANGED
data/lib/synx/xcodeproj_ext.rb
CHANGED
@@ -4,4 +4,3 @@ require "synx/xcodeproj_ext/project/object/pbx_file_reference"
|
|
4
4
|
require "synx/xcodeproj_ext/project/object/pbx_group"
|
5
5
|
require "synx/xcodeproj_ext/project/object/abstract_object"
|
6
6
|
require "synx/xcodeproj_ext/project/object/abstract_target"
|
7
|
-
require "synx/xcodeproj_ext/project/object/pbx_variant_group"
|
@@ -8,27 +8,36 @@ module Xcodeproj
|
|
8
8
|
end
|
9
9
|
|
10
10
|
def referring_groups
|
11
|
-
referrers.select { |ref| ref.
|
11
|
+
referrers.select { |ref| ref.is_a?(Xcodeproj::Project::Object::PBXGroup) }
|
12
12
|
end
|
13
13
|
|
14
14
|
def work_pathname
|
15
|
-
#
|
16
|
-
|
15
|
+
# Intuitively, we want the work pathname to correspond 1-1 with the
|
16
|
+
# view in the project hierarchy. Xcode's collapsed display of
|
17
|
+
# identically-named localized files causes some complications, leading
|
18
|
+
# to the special cases here.
|
19
|
+
if self.equal?(project.main_group)
|
20
|
+
@work_pathname ||= project.work_root_pathname
|
21
|
+
elsif parent.is_a?(Xcodeproj::Project::Object::PBXVariantGroup)
|
22
|
+
# Localized object, naming is handled differently.
|
23
|
+
@work_pathname ||= parent.work_pathname + "#{display_name}.lproj" + parent.display_name
|
24
|
+
elsif is_a?(Xcodeproj::Project::Object::PBXVariantGroup)
|
25
|
+
# Localized container, has no path of its own.
|
26
|
+
@work_pathname ||= parent.work_pathname
|
27
|
+
else
|
28
|
+
@work_pathname ||= parent.work_pathname + display_name
|
29
|
+
end
|
17
30
|
end
|
18
31
|
|
19
32
|
def ensure_internal_consistency(group)
|
20
33
|
@removed_from_groups = []
|
21
|
-
if
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
rg.remove_reference(self) unless rg == group
|
28
|
-
@removed_from_groups << rg.hierarchy_path
|
29
|
-
end
|
34
|
+
# Objects should only have one referring group -- this is an internal consistency issue if there is more than 1.
|
35
|
+
# Just remove all referring groups but the one we're passed
|
36
|
+
referring_groups.each do |rg|
|
37
|
+
unless rg == group
|
38
|
+
rg.remove_reference(self)
|
39
|
+
@removed_from_groups << rg.hierarchy_path
|
30
40
|
end
|
31
|
-
|
32
41
|
end
|
33
42
|
end
|
34
43
|
|
@@ -6,10 +6,10 @@ module Xcodeproj
|
|
6
6
|
def sync(group)
|
7
7
|
if should_sync?
|
8
8
|
if should_move?
|
9
|
-
FileUtils.mv(real_path.to_s,
|
9
|
+
FileUtils.mv(real_path.to_s, work_pathname.to_s)
|
10
10
|
# TODO: move out to abstract_object
|
11
11
|
self.source_tree = "<group>"
|
12
|
-
self.path =
|
12
|
+
self.path = work_pathname.relative_path_from(parent.work_pathname).to_s
|
13
13
|
else
|
14
14
|
# Don't move this file around -- it's not even inside the structure. Just fix the relative reference
|
15
15
|
self.path = real_path.relative_path_from((project.work_pathname_to_pathname(group.work_pathname))).to_s
|
@@ -4,7 +4,7 @@ module Xcodeproj
|
|
4
4
|
class PBXGroup
|
5
5
|
|
6
6
|
def sync(group)
|
7
|
-
ensure_internal_consistency(group)
|
7
|
+
ensure_internal_consistency(group) # Make sure we don't belong to any other groups
|
8
8
|
if excluded_from_sync?
|
9
9
|
Synx::Tabber.puts "#{basename}/ (excluded)".yellow
|
10
10
|
else
|
@@ -12,9 +12,17 @@ module Xcodeproj
|
|
12
12
|
Synx::Tabber.increase
|
13
13
|
|
14
14
|
squash_duplicate_file_references
|
15
|
-
|
16
|
-
|
17
|
-
|
15
|
+
# Child directories may not exist yet (and may be different for
|
16
|
+
# each file) if this is a localized group, so we do the mkpath call
|
17
|
+
# inside the loops.
|
18
|
+
files.each do |pbx_file|
|
19
|
+
pbx_file.work_pathname.dirname.mkpath
|
20
|
+
pbx_file.sync(self)
|
21
|
+
end
|
22
|
+
all_groups.each do |group|
|
23
|
+
group.work_pathname.dirname.mkpath
|
24
|
+
group.sync(self)
|
25
|
+
end
|
18
26
|
sync_path
|
19
27
|
|
20
28
|
Synx::Tabber.decrease
|
@@ -28,11 +36,10 @@ module Xcodeproj
|
|
28
36
|
def move_entries_not_in_xcodeproj
|
29
37
|
if excluded_from_sync?
|
30
38
|
Synx::Tabber.puts "#{basename}/ (excluded)".yellow
|
31
|
-
|
39
|
+
elsif real_path.exist?
|
32
40
|
Synx::Tabber.puts "#{basename}/".green
|
33
41
|
Synx::Tabber.increase
|
34
|
-
|
35
|
-
entry_pathname = real_path + entry
|
42
|
+
real_path.children.each do |entry_pathname|
|
36
43
|
unless project.has_object_for_pathname?(entry_pathname)
|
37
44
|
handle_unused_entry(entry_pathname)
|
38
45
|
end
|
@@ -43,32 +50,24 @@ module Xcodeproj
|
|
43
50
|
end
|
44
51
|
|
45
52
|
def sync_path
|
46
|
-
self.path =
|
53
|
+
self.path = work_pathname.relative_path_from(parent.work_pathname).to_s
|
47
54
|
self.source_tree = "<group>"
|
48
55
|
end
|
49
56
|
private :sync_path
|
50
57
|
|
51
58
|
def all_groups
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
def variant_groups
|
56
|
-
children.select { |child| child.instance_of?(Xcodeproj::Project::Object::PBXVariantGroup) }
|
59
|
+
children.select { |child| child.is_a?(Xcodeproj::Project::Object::PBXGroup)}
|
57
60
|
end
|
58
|
-
private :variant_groups
|
59
61
|
|
60
62
|
def handle_unused_entry(entry_pathname)
|
61
63
|
entries_to_ignore = %W(.DS_Store)
|
62
64
|
unless entries_to_ignore.include?(entry_pathname.basename.to_s)
|
63
65
|
if entry_pathname.directory?
|
64
|
-
work_entry_pathname = project.pathname_to_work_pathname(entry_pathname)
|
65
|
-
# The directory may have already been created for one of two reasons
|
66
|
-
# 1. It was created as a piece of another path, ie, /this/middle/directory.mkdir got called.
|
67
|
-
# 2. OS X has case insensitive folder names, so has_object_for_pathname? may have failed to notice it had the folder.
|
68
|
-
work_entry_pathname.mkdir unless work_entry_pathname.exist?
|
69
66
|
# recurse
|
70
67
|
Synx::Tabber.puts entry_pathname.basename.to_s.green
|
71
68
|
Synx::Tabber.increase
|
69
|
+
# Don't create the directory manually: if it has children, it will
|
70
|
+
# be created then, and if it doesn't, we don't want it.
|
72
71
|
entry_pathname.children.each { |child| handle_unused_entry(child) }
|
73
72
|
Synx::Tabber.decrease
|
74
73
|
elsif entry_pathname.file?
|
@@ -86,7 +85,9 @@ module Xcodeproj
|
|
86
85
|
Synx::Tabber.puts "#{file_pathname.basename} (removed source/image file that is not referenced by the Xcode project)".red
|
87
86
|
return
|
88
87
|
elsif !project.prune || !is_file_to_prune
|
89
|
-
|
88
|
+
destination = project.pathname_to_work_pathname(file_pathname.parent.realpath)
|
89
|
+
destination.mkpath
|
90
|
+
FileUtils.mv(file_pathname.realpath, destination)
|
90
91
|
if is_file_to_prune
|
91
92
|
Synx::Tabber.puts "#{file_pathname.basename} (source/image file that is not referenced by the Xcode project)".yellow
|
92
93
|
else
|
@@ -62,6 +62,7 @@
|
|
62
62
|
/* End PBXCopyFilesBuildPhase section */
|
63
63
|
|
64
64
|
/* Begin PBXFileReference section */
|
65
|
+
637E22771A5235CE00A08D6A /* de */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = de; path = de.lproj/Localizable.strings; sourceTree = "<group>"; };
|
65
66
|
8C2DEB7D191D3F5C003A1F44 /* ManyFiles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ManyFiles.h; sourceTree = "<group>"; };
|
66
67
|
8C2DEB7E191D3F5C003A1F44 /* ManyFiles.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ManyFiles.m; sourceTree = "<group>"; };
|
67
68
|
8C2DEB80191D3F68003A1F44 /* Wow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Wow.h; sourceTree = "<group>"; };
|
@@ -207,7 +208,7 @@
|
|
207
208
|
8C848C4E190DB9B300E9727B /* Supporting Files */ = {
|
208
209
|
isa = PBXGroup;
|
209
210
|
children = (
|
210
|
-
|
211
|
+
8CD2ABF119558D7800341C58 /* Localizable.strings */,
|
211
212
|
8C848C4F190DB9B300E9727B /* dummy-Prefix.pch */,
|
212
213
|
);
|
213
214
|
name = "Supporting Files";
|
@@ -227,7 +228,6 @@
|
|
227
228
|
isa = PBXGroup;
|
228
229
|
children = (
|
229
230
|
8C848C63190DB9B300E9727B /* dummyTests-Info.plist */,
|
230
|
-
8C848C64190DB9B300E9727B /* InfoPlist.strings */,
|
231
231
|
8CE2DA1D19220F7B00D06F5E /* dummyTests-prefix.pch */,
|
232
232
|
);
|
233
233
|
name = "Supporting Files";
|
@@ -249,14 +249,6 @@
|
|
249
249
|
name = Resources;
|
250
250
|
sourceTree = "<group>";
|
251
251
|
};
|
252
|
-
8CD2ABF019558D4100341C58 /* en.lproj */ = {
|
253
|
-
isa = PBXGroup;
|
254
|
-
children = (
|
255
|
-
8CD2ABF119558D7800341C58 /* Localizable.strings */,
|
256
|
-
);
|
257
|
-
path = en.lproj;
|
258
|
-
sourceTree = "<group>";
|
259
|
-
};
|
260
252
|
8CDA046219374F15004435A1 /* FolderWithGroupNotLinked */ = {
|
261
253
|
isa = PBXGroup;
|
262
254
|
children = (
|
@@ -318,6 +310,7 @@
|
|
318
310
|
hasScannedForEncodings = 0;
|
319
311
|
knownRegions = (
|
320
312
|
en,
|
313
|
+
de,
|
321
314
|
);
|
322
315
|
mainGroup = 8C848C3F190DB9B300E9727B;
|
323
316
|
productRefGroup = 8C848C49190DB9B300E9727B /* Products */;
|
@@ -389,8 +382,10 @@
|
|
389
382
|
isa = PBXVariantGroup;
|
390
383
|
children = (
|
391
384
|
8CD2ABF219558D7800341C58 /* en */,
|
385
|
+
637E22771A5235CE00A08D6A /* de */,
|
392
386
|
);
|
393
387
|
name = Localizable.strings;
|
388
|
+
path = en.lproj;
|
394
389
|
sourceTree = "<group>";
|
395
390
|
};
|
396
391
|
/* End PBXVariantGroup section */
|
data/spec/synx/project_spec.rb
CHANGED
@@ -131,7 +131,7 @@ describe Synx::Project do
|
|
131
131
|
expected_file_structure_with_removals = expected_file_structure
|
132
132
|
expected_file_structure_with_removals["dummy"].except!("image-not-in-xcodeproj.png")
|
133
133
|
expected_file_structure_with_removals["dummy"].except!("FileNotInXcodeProj.h")
|
134
|
-
expected_file_structure_with_removals["dummy"]["AlreadySynced"]
|
134
|
+
expected_file_structure_with_removals["dummy"]["AlreadySynced"].except!("FolderNotInXcodeProj")
|
135
135
|
verify_file_structure(Pathname(DUMMY_SYNX_TEST_PROJECT_PATH).parent, expected_file_structure_with_removals)
|
136
136
|
end
|
137
137
|
|
metadata
CHANGED
@@ -1,111 +1,111 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.61
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Larsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.6'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ~>
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '2.14'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '2.14'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0.9'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ~>
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0.9'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: clamp
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- -
|
73
|
+
- - ~>
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0.6'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- -
|
80
|
+
- - ~>
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0.6'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: colorize
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - ~>
|
88
88
|
- !ruby/object:Gem::Version
|
89
89
|
version: '0.7'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - ~>
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0.7'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: xcodeproj
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- -
|
101
|
+
- - ~>
|
102
102
|
- !ruby/object:Gem::Version
|
103
103
|
version: 0.20.0
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: 0.20.0
|
111
111
|
description: |2
|
@@ -118,8 +118,9 @@ executables:
|
|
118
118
|
extensions: []
|
119
119
|
extra_rdoc_files: []
|
120
120
|
files:
|
121
|
-
-
|
122
|
-
-
|
121
|
+
- .gitignore
|
122
|
+
- .travis.yml
|
123
|
+
- CHANGELOG.md
|
123
124
|
- Gemfile
|
124
125
|
- LICENSE.txt
|
125
126
|
- README.md
|
@@ -134,7 +135,6 @@ files:
|
|
134
135
|
- lib/synx/xcodeproj_ext/project/object/abstract_target.rb
|
135
136
|
- lib/synx/xcodeproj_ext/project/object/pbx_file_reference.rb
|
136
137
|
- lib/synx/xcodeproj_ext/project/object/pbx_group.rb
|
137
|
-
- lib/synx/xcodeproj_ext/project/object/pbx_variant_group.rb
|
138
138
|
- spec/dummy/dummy.xcodeproj/project.pbxproj
|
139
139
|
- spec/dummy/dummy.xcodeproj/project.xcworkspace/contents.xcworkspacedata
|
140
140
|
- spec/dummy/dummy.xcodeproj/xcuserdata/marklarsen.xcuserdatad/xcschemes/dummy.xcscheme
|
@@ -162,6 +162,7 @@ files:
|
|
162
162
|
- spec/dummy/dummy/dummy.h
|
163
163
|
- spec/dummy/dummy/dummy.m
|
164
164
|
- spec/dummy/dummy/en.lproj/Localizable.strings
|
165
|
+
- spec/dummy/dummy/en.lproj/de.lproj/Localizable.strings
|
165
166
|
- spec/dummy/dummy/folderWithGroupNotLinked/data.json
|
166
167
|
- spec/dummy/dummy/image-not-in-xcodeproj.png
|
167
168
|
- spec/dummy/dummy/image.png
|
@@ -186,17 +187,17 @@ require_paths:
|
|
186
187
|
- lib
|
187
188
|
required_ruby_version: !ruby/object:Gem::Requirement
|
188
189
|
requirements:
|
189
|
-
- -
|
190
|
+
- - '>='
|
190
191
|
- !ruby/object:Gem::Version
|
191
192
|
version: '0'
|
192
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
194
|
requirements:
|
194
|
-
- -
|
195
|
+
- - '>='
|
195
196
|
- !ruby/object:Gem::Version
|
196
197
|
version: '0'
|
197
198
|
requirements: []
|
198
199
|
rubyforge_project:
|
199
|
-
rubygems_version: 2.
|
200
|
+
rubygems_version: 2.0.14
|
200
201
|
signing_key:
|
201
202
|
specification_version: 4
|
202
203
|
summary: A command-line tool that reorganizes your Xcode project folder to match your
|
@@ -229,6 +230,7 @@ test_files:
|
|
229
230
|
- spec/dummy/dummy/dummy.h
|
230
231
|
- spec/dummy/dummy/dummy.m
|
231
232
|
- spec/dummy/dummy/en.lproj/Localizable.strings
|
233
|
+
- spec/dummy/dummy/en.lproj/de.lproj/Localizable.strings
|
232
234
|
- spec/dummy/dummy/folderWithGroupNotLinked/data.json
|
233
235
|
- spec/dummy/dummy/image-not-in-xcodeproj.png
|
234
236
|
- spec/dummy/dummy/image.png
|
@@ -1,35 +0,0 @@
|
|
1
|
-
module Xcodeproj
|
2
|
-
class Project
|
3
|
-
module Object
|
4
|
-
class PBXVariantGroup
|
5
|
-
|
6
|
-
# Need to retain *.lproj files on the system
|
7
|
-
def sync(group)
|
8
|
-
ensure_internal_consistency(group)
|
9
|
-
|
10
|
-
file = files.first
|
11
|
-
if lproj_as_group?
|
12
|
-
FileUtils.mv(file.real_path, work_pathname)
|
13
|
-
Synx::Tabber.puts file.real_path.basename.to_s.green
|
14
|
-
else
|
15
|
-
parent_folder_path = children.first.real_path.parent
|
16
|
-
work_destination_pathname = parent.work_pathname
|
17
|
-
|
18
|
-
if parent_folder_path.exist?
|
19
|
-
FileUtils.mv(parent_folder_path, work_destination_pathname.realpath)
|
20
|
-
end
|
21
|
-
Synx::Tabber.puts (parent_folder_path.basename.to_s + "/").green
|
22
|
-
Synx::Tabber.increase
|
23
|
-
Synx::Tabber.puts file.real_path.basename.to_s.green
|
24
|
-
Synx::Tabber.decrease
|
25
|
-
end
|
26
|
-
end
|
27
|
-
|
28
|
-
def lproj_as_group?
|
29
|
-
parent.basename =~ /.+\.lproj$/
|
30
|
-
end
|
31
|
-
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|
35
|
-
end
|