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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/bin/xsort +29 -1
  3. data/lib/xsort.rb +0 -36
  4. data/lib/xsort/version.rb +1 -1
  5. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 016d810140b6aa286cef1606a51b430d518dbcb0
4
- data.tar.gz: efbb9156694554ae5a879e3734b3fa3b9aa6d53f
3
+ metadata.gz: 71fab6aedfa35e0c20941c42bde65bd3f62b0e3f
4
+ data.tar.gz: 97490c7261219084072fec5d63de153c60e6bd71
5
5
  SHA512:
6
- metadata.gz: 969f20b66e176005d2a235a4af568e245e65e1c0a4382f5e3c99e5b3b6626daeb98e116ea4043e1f9d05bbc63dd064129616b5240a86f7484f5648b7bc6bde04
7
- data.tar.gz: 297adc7d09e80d76149727a2bf3b7d65fbd532ea9914073654f0f02fd53f64293e7558ad6db326d671b1ef8be3e84aad79a3426794d43869708476db556531ef
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
- Xsort::XsortMain.new(ARGV).execute
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
+
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Xsort
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
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.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - keisuke