xsort 1.1.1 → 1.1.2
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/bin/xsort +29 -1
- data/lib/xsort.rb +0 -36
- data/lib/xsort/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 71fab6aedfa35e0c20941c42bde65bd3f62b0e3f
|
|
4
|
+
data.tar.gz: 97490c7261219084072fec5d63de153c60e6bd71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c55fdbbd78e278081e1c8c20f33ce7b5e39925cb78fdc54e24a1f9bc73fa589c305edd7d72b79c84d7f8959352b46c80ee5f9e0cf6bb2a8f107d721c50a832b6
|
|
7
|
+
data.tar.gz: c8c86c46319dca98a4976b6ec2846cc4ceb0ac6290b3f859d12d143a7c35d890fd334bfc74ef7b927e55fda52f7f460af4352216ee814b71d4d7660a1e98b326
|
data/bin/xsort
CHANGED
|
@@ -2,4 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
require "xsort"
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
def execute(option)
|
|
6
|
+
if option.options.length == 0 && option.path.length == 0
|
|
7
|
+
puts "Usage: xsort [-v] [<path>] [-o] "
|
|
8
|
+
puts "These are common detect commands used in various situations:"
|
|
9
|
+
puts "xsort version: #{Xsort::VERSION}"
|
|
10
|
+
puts "option:"
|
|
11
|
+
puts "-v: display xsort version number"
|
|
12
|
+
puts "-o: output result"
|
|
13
|
+
puts "-r: Just extracting output.pbxproj will not write to pbxproj of Xcode project"
|
|
14
|
+
puts "\n"
|
|
15
|
+
puts "Regars !"
|
|
16
|
+
elsif option.options.length == 1 && option.options[0] == "-v"
|
|
17
|
+
puts "Version: #{Xsort::VERSION}"
|
|
18
|
+
elsif option.path.index("project.pbxproj")
|
|
19
|
+
pbx = Xcodeproj::Pbxproj::PbxObject::Pbxproj.new(option.path,option.isOut)
|
|
20
|
+
pbx.parse()
|
|
21
|
+
sort = Xcodeproj::Pbxproj::PbxObject::PbxSort.new(pbx.pbxGroups)
|
|
22
|
+
s = sort.psort
|
|
23
|
+
write = Xcodeproj::Pbxproj::PbxObject::PbxWrite.new(option.path,s,option.isOut, option.notOverWrite)
|
|
24
|
+
write.overWrite
|
|
25
|
+
else
|
|
26
|
+
puts "(*_*).oO not pbxproj file"
|
|
27
|
+
puts "must select pbxproj file"
|
|
28
|
+
puts "($_$).oO omg"
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
execute(Option.new(ARGV))
|
|
33
|
+
|
data/lib/xsort.rb
CHANGED
|
@@ -3,39 +3,3 @@ require "xsort/xcodeproj/pbxproj/pbxobject/PbxSort"
|
|
|
3
3
|
require "xsort/xcodeproj/pbxproj/pbxobject/PbxWrite"
|
|
4
4
|
require "xsort/version"
|
|
5
5
|
require "xsort/option"
|
|
6
|
-
|
|
7
|
-
module Xsort
|
|
8
|
-
class XsortMain
|
|
9
|
-
def initialize (argv)
|
|
10
|
-
@option = Option.new(argv)
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def execute
|
|
14
|
-
if @option.options.length == 0 && @option.path.length == 0
|
|
15
|
-
puts "Usage: xsort [-v] [<path>] [-o] "
|
|
16
|
-
puts "These are common detect commands used in various situations:"
|
|
17
|
-
puts "xsort version: #{Xsort::VERSION}"
|
|
18
|
-
puts "option:"
|
|
19
|
-
puts "-v: display xsort version number"
|
|
20
|
-
puts "-o: output result"
|
|
21
|
-
puts "-r: Just extracting output.pbxproj will not write to pbxproj of Xcode project"
|
|
22
|
-
puts "\n"
|
|
23
|
-
puts "Regars !"
|
|
24
|
-
elsif @option.options.length == 1 && @option.options[0] == "-v"
|
|
25
|
-
puts "Version: #{Xsort::VERSION}"
|
|
26
|
-
elsif @option.path.index("project.pbxproj")
|
|
27
|
-
|
|
28
|
-
pbx = Xcodeproj::Pbxproj::PbxObject::Pbxproj.new(@option.path,@option.isOut)
|
|
29
|
-
pbx.parse()
|
|
30
|
-
sort = Xcodeproj::Pbxproj::PbxObject::PbxSort.new(pbx.pbxGroups)
|
|
31
|
-
s = sort.psort
|
|
32
|
-
write = Xcodeproj::Pbxproj::PbxObject::PbxWrite.new(@option.path,s,@option.isOut, @option.notOverWrite)
|
|
33
|
-
write.overWrite
|
|
34
|
-
else
|
|
35
|
-
puts "(*_*).oO not pbxproj file"
|
|
36
|
-
puts "must select pbxproj file"
|
|
37
|
-
puts "($_$).oO omg"
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
data/lib/xsort/version.rb
CHANGED