xsort 1.2.2 → 1.2.3
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 +5 -5
- data/bin/xsort +19 -24
- data/lib/xsort.rb +1 -0
- data/lib/xsort/sortproj.rb +17 -0
- data/lib/xsort/version.rb +1 -1
- data/lib/xsort/xcodeproj/pbxproj/pbxobject/PbxWrite.rb +3 -3
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: b455b9b751b1d9c8bbb7f9d4a5fdcbe771a5ab5f
|
|
4
|
+
data.tar.gz: 77134d7577f7c4a0fa051dc0813f1534c255f112
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 74d8952183440bc5c6ecc32a6db798141470f09e665b243614b3ab8fb2d2fba22024624587f1162d9df39a6cde535626b1f3f6243e2e01423472024e6bd9dcde
|
|
7
|
+
data.tar.gz: 51d466a3e369eabf4c87254afd1dff0792f0af5bf37f178c46e755e37a8230fa8312d16fe36d0a0482093d56146dce6d3d0bd8ada006e7000684e1e25bf7cf67
|
data/bin/xsort
CHANGED
|
@@ -2,32 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
require "xsort"
|
|
4
4
|
|
|
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"
|
|
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
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"
|
|
14
|
+
puts "\n"
|
|
15
|
+
puts "Regars !"
|
|
16
|
+
elsif option.options.length == 1 && option.options[0] == "-v"
|
|
17
17
|
puts "Version: #{Xsort::VERSION}"
|
|
18
|
-
elsif option.path.index("project.pbxproj")
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
18
|
+
elsif option.path.index("project.pbxproj")
|
|
19
|
+
# excute Xsort
|
|
20
|
+
Xsort::Sortproj.new(option).sort
|
|
25
21
|
else
|
|
26
|
-
puts "(*_*).oO not pbxproj file"
|
|
27
|
-
puts "must select pbxproj file"
|
|
28
|
-
puts "($_$).oO omg"
|
|
29
|
-
end
|
|
30
|
-
end
|
|
22
|
+
puts "(*_*).oO not pbxproj file"
|
|
23
|
+
puts "must select pbxproj file"
|
|
24
|
+
puts "($_$).oO omg"
|
|
25
|
+
end
|
|
26
|
+
end
|
|
31
27
|
|
|
32
28
|
execute(Option.new(ARGV))
|
|
33
|
-
|
data/lib/xsort.rb
CHANGED
|
@@ -2,5 +2,6 @@ require "xsort/xcodeproj/pbxproj/pbxobject/Pbxproj"
|
|
|
2
2
|
require "xsort/xcodeproj/pbxproj/pbxobject/PbxSort"
|
|
3
3
|
require "xsort/xcodeproj/pbxproj/pbxobject/PbxWrite"
|
|
4
4
|
require "xsort/xcodeproj/pbxproj/pbxobject/Emurate"
|
|
5
|
+
require "xsort/sortproj"
|
|
5
6
|
require "xsort/version"
|
|
6
7
|
require "xsort/option"
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Xsort
|
|
2
|
+
class Sortproj
|
|
3
|
+
|
|
4
|
+
def initialize (option)
|
|
5
|
+
@option = option
|
|
6
|
+
end
|
|
7
|
+
|
|
8
|
+
def sort
|
|
9
|
+
pbx = Xcodeproj::Pbxproj::PbxObject::Pbxproj.new(@option.path,@option.isOut)
|
|
10
|
+
pbx.parse
|
|
11
|
+
sort = Xcodeproj::Pbxproj::PbxObject::PbxSort.new(pbx.pbxGroups)
|
|
12
|
+
s = sort.psort
|
|
13
|
+
write = Xcodeproj::Pbxproj::PbxObject::PbxWrite.new(@option.path,s,@option.isOut, @option.notOverWrite)
|
|
14
|
+
write.overWrite
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
data/lib/xsort/version.rb
CHANGED
|
@@ -50,14 +50,14 @@ module Xcodeproj
|
|
|
50
50
|
|
|
51
51
|
rescue IOError => ioerr
|
|
52
52
|
isSuccess = false
|
|
53
|
-
puts "Error #{ioerr.message}"
|
|
53
|
+
puts "Error \e[31m#{ioerr.message}\e[0m"
|
|
54
54
|
rescue SystemCallError => sysCallErr
|
|
55
55
|
isSuccess = false
|
|
56
|
-
puts "Failuer
|
|
56
|
+
puts "Failuer! reason: \n\e[31m#{sysCallErr.message}\e[0m"
|
|
57
57
|
puts "The entered path is invalid."
|
|
58
58
|
end
|
|
59
59
|
if isSuccess == true
|
|
60
|
-
puts "
|
|
60
|
+
puts "\e[36mXsort Successful (☝ ՞ਊ ՞)☝!!!\e[0m"
|
|
61
61
|
end
|
|
62
62
|
end
|
|
63
63
|
|
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.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- keisuke
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-09-
|
|
11
|
+
date: 2018-09-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -71,6 +71,7 @@ files:
|
|
|
71
71
|
- bin/xsort
|
|
72
72
|
- lib/xsort.rb
|
|
73
73
|
- lib/xsort/option.rb
|
|
74
|
+
- lib/xsort/sortproj.rb
|
|
74
75
|
- lib/xsort/version.rb
|
|
75
76
|
- lib/xsort/xcodeproj/pbxproj/pbxobject/Emurate.rb
|
|
76
77
|
- lib/xsort/xcodeproj/pbxproj/pbxobject/PbxSort.rb
|
|
@@ -97,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
97
98
|
version: '0'
|
|
98
99
|
requirements: []
|
|
99
100
|
rubyforge_project:
|
|
100
|
-
rubygems_version: 2.
|
|
101
|
+
rubygems_version: 2.5.2
|
|
101
102
|
signing_key:
|
|
102
103
|
specification_version: 4
|
|
103
104
|
summary: Sort by file.
|