xsort 1.0.0 → 1.1.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
  SHA256:
3
- metadata.gz: 47a0f232dedfe9550256647514d43e14901211cf787c269469cb3649f745db25
4
- data.tar.gz: b1f666c504e5845a698c597bff661747409e4a20454107a976a183dcb1ce752d
3
+ metadata.gz: 4b41c066b32faa1dcdef969cd554001136fdb2985d044a3cd0eab284feab0103
4
+ data.tar.gz: 43364d8584a73b1b117586beecaa1384d8499da4adc617a404ab9effb83d71de
5
5
  SHA512:
6
- metadata.gz: ae1d2ef5caf86be2df99a69aa7157cdd34bf5140bcf035f2bd9b8514621e05cb60b9c1f47d44e1e91916cd2a6dff49419dcabbe4cb525d9854b85e17a4085ebe
7
- data.tar.gz: aeb2b1b2247d499523c8d9564afe9548037a76ddb66ff5e7e457b47bd2f4830f540949fa1cfd58b2f785dfa3fdfb5a05239e30e49abf3f15ce33b44a3a265caa
6
+ metadata.gz: ac2ec279e2193f734b6aefac623ce2fcd98e55716515b7a592cc5f465a9eb5e297152087bf0a3f4b1c34b6a479c1ebaf411df6286d21f5ba3d58894ffe7a995b
7
+ data.tar.gz: 7c2dd944f85383b57d9b5510d9e91886d7da90eb7f33e98d0c5b129cb100e73ab1389951c044e4bfe3a3204c66c0ca1fb02216e5dbe063f305ecf70d4b0b7615
data/.gitignore CHANGED
@@ -2,7 +2,6 @@
2
2
  /.yardoc
3
3
  /_yardoc/
4
4
  /coverage/
5
- /doc/
6
5
  /pkg/
7
6
  /spec/reports/
8
7
  /tmp/
data/README.md CHANGED
@@ -13,6 +13,17 @@
13
13
 
14
14
  Sort the file tree next to Xcode by file name.
15
15
 
16
+ ## Gem Installation
17
+
18
+ Download and install xsort with the following.
19
+
20
+ ```
21
+ gem install xsort
22
+ ```
23
+
24
+ [https://rubygems.org/gems/xsort](https://rubygems.org/gems/xsort)
25
+
26
+
16
27
  ## git clone
17
28
 
18
29
  ***Via SSH***: For those who plan on regularly making direct commits, cloning over SSH may provide a better experience (which requires uploading SSH keys to GitHub):
@@ -58,19 +69,24 @@ Regars !
58
69
  ⚠️Please do version control and back up before doing.⚠️
59
70
 
60
71
  ```
61
- xsort ./xsort ./project.pbxproj
72
+ xsort ./XcodeApps.xcodeproj
62
73
  ```
63
74
 
64
- this will sort files in the Xcode directory
75
+ ***You can sort them like the following image***
76
+
77
+ <img src="https://github.com/keisukeYamagishi/xsort/blob/feature/add_doc/doc/result.png" width="50%" height="50%">
78
+
65
79
 
66
- Output.pbxproj file will be output so copy and paste it.
67
80
 
68
81
  ## Use it
69
82
 
70
83
  ```
84
+ xsort ./XcodeApps.xcodeproj 
85
+ ```
86
+ or
71
87
 
72
- ./xsort path_to_project.pbxproj
73
-
88
+ ```
89
+ xsort ./XcodeApps.xcodeproj/project.pbxproj
74
90
  ```
75
91
 
76
92
  ## option
@@ -80,10 +96,11 @@ Output.pbxproj file will be output so copy and paste it.
80
96
  if you want to display result log
81
97
 
82
98
  ```
83
- ./xsort ./path/to/project.pbxproj -o
99
+ xsort ./XcodeApps.xcodeproj -o
84
100
  ```
85
101
 
86
- result
102
+ The following logs are output.
103
+
87
104
  ```
88
105
  // !$*UTF8*$!
89
106
  {
@@ -110,22 +127,16 @@ result
110
127
  any
111
128
  ```
112
129
 
113
- **Looking at Xcode**
114
-
115
- ![](https://github.com/keisukeYamagishi/xsort/blob/master/res/result.png)
116
-
117
-
118
130
  ***Use -r options***
119
131
 
120
- Do not overwrite pbxproj of Xcode project and output.pbxproj.
121
- You can test the output pbxproj file.
132
+ It does not sort Xcode's project file directly.
133
+ Output files sorted.
134
+ You can copy and paste the output.pbxproj file output to the target project.pbxproj file and test it.
122
135
 
123
136
  ```
124
137
  ./xsort ../App/App.xcodeproj -r
125
138
  ```
126
139
 
127
-
128
-
129
140
  ***Display version number***
130
141
 
131
142
  ```
data/lib/xsort/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Xsort
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -0,0 +1,29 @@
1
+ module Xcodeproj
2
+ module Pbxproj
3
+ module PbxObject
4
+ class Emurate
5
+
6
+ def self.emurates(chars)
7
+ splits = chars.split(" ")
8
+ isName = false
9
+ splits.each { |char|
10
+ if char == "*/"
11
+ isName = false
12
+ end
13
+ if isName == true
14
+ return char
15
+ end
16
+ if char == "/*"
17
+ isName = true
18
+ end
19
+ }
20
+ end
21
+
22
+ def self.emurateUUID(char)
23
+ return char.split(" ").first
24
+ end
25
+ end
26
+
27
+ end
28
+ end
29
+ end
@@ -1,3 +1,5 @@
1
+ require File.expand_path(File.dirname(__FILE__) + "/Emurate")
2
+
1
3
  module Xcodeproj
2
4
  module Pbxproj
3
5
  module PbxObject
@@ -103,7 +105,7 @@ module Xcodeproj
103
105
  begin
104
106
  File.open(@path, "r") do |pbx|
105
107
  pbx.each_line do |pbx_line|
106
-
108
+
107
109
  if @isOut == true
108
110
  puts pbx_line
109
111
  end
@@ -173,26 +175,3 @@ module Xcodeproj
173
175
  end
174
176
  end
175
177
  end
176
-
177
- class Emurate
178
-
179
- def self.emurates(chars)
180
- splits = chars.split(" ")
181
- isName = false
182
- splits.each { |char|
183
- if char == "*/"
184
- isName = false
185
- end
186
- if isName == true
187
- return char
188
- end
189
- if char == "/*"
190
- isName = true
191
- end
192
- }
193
- end
194
-
195
- def self.emurateUUID(char)
196
- return char.split(" ").first
197
- end
198
- end
data/xsort.gemspec CHANGED
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files -z`.split("\x0").reject do |f|
17
- f.match(%r{^(test|spec|features|bin/console|bin/setup|exe/xsort)/})
17
+ f.match(%r{^(test|spec|features|doc)/})
18
18
  end
19
19
 
20
20
  spec.bindir = "bin"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xsort
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - keisuke
@@ -70,9 +70,9 @@ files:
70
70
  - Rakefile
71
71
  - bin/xsort
72
72
  - lib/xsort.rb
73
- - lib/xsort/Emurate.rb
74
73
  - lib/xsort/option.rb
75
74
  - lib/xsort/version.rb
75
+ - lib/xsort/xcodeproj/pbxproj/pbxobject/Emurate.rb
76
76
  - lib/xsort/xcodeproj/pbxproj/pbxobject/PbxSort.rb
77
77
  - lib/xsort/xcodeproj/pbxproj/pbxobject/PbxWrite.rb
78
78
  - lib/xsort/xcodeproj/pbxproj/pbxobject/Pbxproj.rb
data/lib/xsort/Emurate.rb DELETED
@@ -1,22 +0,0 @@
1
- class Emurate
2
-
3
- def self.emurates(chars)
4
- splits = chars.split(" ")
5
- isName = false
6
- splits.each { |char|
7
- if char == "*/"
8
- isName = false
9
- end
10
- if isName == true
11
- return char
12
- end
13
- if char == "/*"
14
- isName = true
15
- end
16
- }
17
- end
18
-
19
- def self.emurateUUID(char)
20
- return char.split(" ").first
21
- end
22
- end