xsort 1.2.3 → 1.2.4
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 +4 -4
- data/README.md +6 -7
- data/bin/xsort +2 -1
- data/lib/xsort/option.rb +7 -7
- data/lib/xsort/sortproj.rb +9 -8
- data/lib/xsort/version.rb +1 -1
- data/lib/xsort/xcodeproj/pbxproj/pbxobject/PbxWrite.rb +3 -3
- data/lib/xsort/xcodeproj/pbxproj/pbxobject/Pbxproj.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8c40d2c455e205214241c8062857a4b2b0330737
|
|
4
|
+
data.tar.gz: 3ce334aa69503adc6c96cd073d30c0c04d0a7212
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: da7b68bfddb6f8643edbe99f4560bb0e08fe68121b76c75d74268140e66aca40f0cb2da38749d50ebcf467fc6554a1a4666813a577e66e886508c3e3a06f6de3
|
|
7
|
+
data.tar.gz: 50401858c762ac2dfd4ca6ae00f66f272ec3c103e678c70e4defe08cfad59ea7cdf9da479fb91e06bce18abbd9314f87c3a7498f16e8ddde81f386ed28838644
|
data/README.md
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
<img src="https://github.com/keisukeYamagishi/xsort/blob/master/doc/xsort.png">
|
|
2
3
|
|
|
3
4
|
[](https://twitter.com/O_Linker_Error)
|
|
4
5
|
[](https://www.ruby-lang.org/ja/)
|
|
@@ -54,7 +55,7 @@ $ git clone https://github.com/keisukeYamagishi/xsort.git
|
|
|
54
55
|
|
|
55
56
|
Usage: xsort [-v] [<path>] [-o]
|
|
56
57
|
These are common detect commands used in various situations:
|
|
57
|
-
xsort version: 1.
|
|
58
|
+
xsort version: 1.2.3
|
|
58
59
|
option:
|
|
59
60
|
-v: display xsort version number
|
|
60
61
|
-o: output result
|
|
@@ -65,7 +66,7 @@ Regars !
|
|
|
65
66
|
```
|
|
66
67
|
|
|
67
68
|
# Hot fix ***********************
|
|
68
|
-
#### (☝ ՞ਊ ՞)☝ Wow What's this
|
|
69
|
+
#### (☝ ՞ਊ ՞)☝ Wow What's this!!!
|
|
69
70
|
|
|
70
71
|
mac OSX to HighSierra,
|
|
71
72
|
When xsort is executed, the following error occurs.
|
|
@@ -75,7 +76,7 @@ When xsort is executed, the following error occurs.
|
|
|
75
76
|
-bash: /usr/local/bin/xsort: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby: bad interpreter: No such file or directory
|
|
76
77
|
```
|
|
77
78
|
|
|
78
|
-
#### (☝ ՞ਊ ՞)☝ Wow What's this
|
|
79
|
+
#### (☝ ՞ਊ ՞)☝ Wow What's this!!!
|
|
79
80
|
|
|
80
81
|
In that case, please execute the following.
|
|
81
82
|
|
|
@@ -86,8 +87,6 @@ sudo gem install -n /usr/local/bin xsort
|
|
|
86
87
|
|
|
87
88
|
## Run
|
|
88
89
|
|
|
89
|
-
⚠️Please do version control and back up before doing.⚠️
|
|
90
|
-
|
|
91
90
|
```
|
|
92
91
|
xsort ./XcodeApps.xcodeproj
|
|
93
92
|
```
|
|
@@ -162,5 +161,5 @@ xsort ../App/App.xcodeproj -r
|
|
|
162
161
|
```
|
|
163
162
|
->> ./xsort -v
|
|
164
163
|
|
|
165
|
-
Version: 1.2.
|
|
164
|
+
Version: 1.2.3
|
|
166
165
|
```
|
data/bin/xsort
CHANGED
|
@@ -17,7 +17,8 @@ def execute(option)
|
|
|
17
17
|
puts "Version: #{Xsort::VERSION}"
|
|
18
18
|
elsif option.path.index("project.pbxproj")
|
|
19
19
|
# excute Xsort
|
|
20
|
-
Xsort::Sortproj.new(option)
|
|
20
|
+
xsort = Xsort::Sortproj.new(option.path)
|
|
21
|
+
xsort.sort(option.stdout,option.notOverwrite)
|
|
21
22
|
else
|
|
22
23
|
puts "(*_*).oO not pbxproj file"
|
|
23
24
|
puts "must select pbxproj file"
|
data/lib/xsort/option.rb
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
class Option
|
|
2
2
|
|
|
3
3
|
def initialize(argv)
|
|
4
|
-
@
|
|
4
|
+
@stdout = false
|
|
5
5
|
argvs = Array.new
|
|
6
|
-
@
|
|
6
|
+
@notOverwrite = false
|
|
7
7
|
|
|
8
8
|
argv.each_with_index do |arg, i|
|
|
9
9
|
argvs.push(arg)
|
|
@@ -15,7 +15,7 @@ class Option
|
|
|
15
15
|
if argv.index("-")
|
|
16
16
|
|
|
17
17
|
if argv == "-o"
|
|
18
|
-
@
|
|
18
|
+
@stdout = true
|
|
19
19
|
elsif argv == "-r"
|
|
20
20
|
@notOverWrite = true
|
|
21
21
|
end
|
|
@@ -46,12 +46,12 @@ class Option
|
|
|
46
46
|
@path
|
|
47
47
|
end
|
|
48
48
|
|
|
49
|
-
def
|
|
50
|
-
@
|
|
49
|
+
def stdout
|
|
50
|
+
@stdout
|
|
51
51
|
end
|
|
52
52
|
|
|
53
|
-
def
|
|
54
|
-
@
|
|
53
|
+
def notOverwrite
|
|
54
|
+
@notOverwrite
|
|
55
55
|
end
|
|
56
56
|
|
|
57
57
|
end
|
data/lib/xsort/sortproj.rb
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
module Xsort
|
|
2
2
|
class Sortproj
|
|
3
3
|
|
|
4
|
-
def initialize (
|
|
5
|
-
@
|
|
4
|
+
def initialize (path)
|
|
5
|
+
@path = path
|
|
6
6
|
end
|
|
7
7
|
|
|
8
|
-
def sort
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
def sort (stdout,notOverwrite)
|
|
9
|
+
puts @path
|
|
10
|
+
pbxproj = Xcodeproj::Pbxproj::PbxObject::Pbxproj.new(@path,stdout)
|
|
11
|
+
pbxproj.parse
|
|
12
|
+
sort = Xcodeproj::Pbxproj::PbxObject::PbxSort.new(pbxproj.pbxGroups)
|
|
13
|
+
pbxObject = sort.psort
|
|
14
|
+
write = Xcodeproj::Pbxproj::PbxObject::PbxWrite.new(@path,pbxObject,stdout,notOverwrite)
|
|
14
15
|
write.overWrite
|
|
15
16
|
end
|
|
16
17
|
end
|
data/lib/xsort/version.rb
CHANGED
|
@@ -4,9 +4,9 @@ module Xcodeproj
|
|
|
4
4
|
|
|
5
5
|
class PbxWrite
|
|
6
6
|
|
|
7
|
-
def initialize(path,pbx,
|
|
7
|
+
def initialize(path,pbx, stdout,write)
|
|
8
8
|
@pbx = pbx
|
|
9
|
-
@
|
|
9
|
+
@stdout = stdout
|
|
10
10
|
@path = path
|
|
11
11
|
@write = write
|
|
12
12
|
end
|
|
@@ -42,7 +42,7 @@ module Xcodeproj
|
|
|
42
42
|
end
|
|
43
43
|
end
|
|
44
44
|
|
|
45
|
-
if @
|
|
45
|
+
if @stdout == true
|
|
46
46
|
puts pbxValue
|
|
47
47
|
end
|
|
48
48
|
|
|
@@ -87,9 +87,9 @@ module Xcodeproj
|
|
|
87
87
|
module PbxObject
|
|
88
88
|
class Pbxproj
|
|
89
89
|
|
|
90
|
-
def initialize(path,
|
|
90
|
+
def initialize(path, stdout)
|
|
91
91
|
@path = path
|
|
92
|
-
@
|
|
92
|
+
@stdout = stdout
|
|
93
93
|
@pbxGroups = Array.new
|
|
94
94
|
end
|
|
95
95
|
|
|
@@ -104,7 +104,7 @@ module Xcodeproj
|
|
|
104
104
|
File.open(@path, "r") do |pbx|
|
|
105
105
|
pbx.each_line do |pbx_line|
|
|
106
106
|
|
|
107
|
-
if @
|
|
107
|
+
if @stdout == true
|
|
108
108
|
puts pbx_line
|
|
109
109
|
end
|
|
110
110
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: xsort
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.2.
|
|
4
|
+
version: 1.2.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- keisuke
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-
|
|
11
|
+
date: 2018-11-17 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|