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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b455b9b751b1d9c8bbb7f9d4a5fdcbe771a5ab5f
4
- data.tar.gz: 77134d7577f7c4a0fa051dc0813f1534c255f112
3
+ metadata.gz: 8c40d2c455e205214241c8062857a4b2b0330737
4
+ data.tar.gz: 3ce334aa69503adc6c96cd073d30c0c04d0a7212
5
5
  SHA512:
6
- metadata.gz: 74d8952183440bc5c6ecc32a6db798141470f09e665b243614b3ab8fb2d2fba22024624587f1162d9df39a6cde535626b1f3f6243e2e01423472024e6bd9dcde
7
- data.tar.gz: 51d466a3e369eabf4c87254afd1dff0792f0af5bf37f178c46e755e37a8230fa8312d16fe36d0a0482093d56146dce6d3d0bd8ada006e7000684e1e25bf7cf67
6
+ metadata.gz: da7b68bfddb6f8643edbe99f4560bb0e08fe68121b76c75d74268140e66aca40f0cb2da38749d50ebcf467fc6554a1a4666813a577e66e886508c3e3a06f6de3
7
+ data.tar.gz: 50401858c762ac2dfd4ca6ae00f66f272ec3c103e678c70e4defe08cfad59ea7cdf9da479fb91e06bce18abbd9314f87c3a7498f16e8ddde81f386ed28838644
data/README.md CHANGED
@@ -1,4 +1,5 @@
1
- # xsort
1
+
2
+ <img src="https://github.com/keisukeYamagishi/xsort/blob/master/doc/xsort.png">
2
3
 
3
4
  [![](https://img.shields.io/badge/Twitter-O--Liker%20Error-blue.svg)](https://twitter.com/O_Linker_Error)
4
5
  [![](https://img.shields.io/badge/Language-Ruby-red.svg)](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.1.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.1
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).sort
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"
@@ -1,9 +1,9 @@
1
1
  class Option
2
2
 
3
3
  def initialize(argv)
4
- @isOut = false
4
+ @stdout = false
5
5
  argvs = Array.new
6
- @notOverWrite = false
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
- @isOut = true
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 isOut
50
- @isOut
49
+ def stdout
50
+ @stdout
51
51
  end
52
52
 
53
- def notOverWrite
54
- @notOverWrite
53
+ def notOverwrite
54
+ @notOverwrite
55
55
  end
56
56
 
57
57
  end
@@ -1,16 +1,17 @@
1
1
  module Xsort
2
2
  class Sortproj
3
3
 
4
- def initialize (option)
5
- @option = option
4
+ def initialize (path)
5
+ @path = path
6
6
  end
7
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)
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
@@ -1,3 +1,3 @@
1
1
  module Xsort
2
- VERSION = "1.2.3"
2
+ VERSION = "1.2.4"
3
3
  end
@@ -4,9 +4,9 @@ module Xcodeproj
4
4
 
5
5
  class PbxWrite
6
6
 
7
- def initialize(path,pbx, out,write)
7
+ def initialize(path,pbx, stdout,write)
8
8
  @pbx = pbx
9
- @isOut = out
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 @isOut == true
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, out)
90
+ def initialize(path, stdout)
91
91
  @path = path
92
- @isOut = out
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 @isOut == true
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.3
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-09-30 00:00:00.000000000 Z
11
+ date: 2018-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler