xsort 1.4.3 → 1.4.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/.github/workflows/ruby.yml +17 -19
- data/README.md +12 -7
- data/lib/xsort/version.rb +1 -1
- data/lib/xsort/xcodeproj/pbxproj/pbxobject/PbxSort.rb +7 -1
- data/xsort.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 802dbfdabd1922aa35a0c659843cc951a8184984fbd6243df03bde05c79a6faa
|
|
4
|
+
data.tar.gz: d7918a9f86a1e51dc515bc35cfa0c8be726101ad7a828da42f4efbf19047b23d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: fd76f4c4bdc913d7b05bd6dfceeaced0e25a2d180f6497a95121d372938f23d2ab9bf26bdcd4364c3daac37d7003fbb5e6ea40b5c056bd34a217736b0716799d
|
|
7
|
+
data.tar.gz: 69345470f482f426d9cb0df1327ae4c37c6fa74f6a66157c2e61a6a1b27babd0bdb737f83567fcf2dcfd1b5c474a4074908b5277329e68851c8a652aa430998e
|
data/.github/workflows/ruby.yml
CHANGED
|
@@ -15,27 +15,25 @@ on:
|
|
|
15
15
|
|
|
16
16
|
jobs:
|
|
17
17
|
test:
|
|
18
|
-
|
|
19
18
|
runs-on: ubuntu-latest
|
|
19
|
+
|
|
20
20
|
strategy:
|
|
21
21
|
matrix:
|
|
22
|
-
ruby-version: ['2.
|
|
22
|
+
ruby-version: ['2.6.10']
|
|
23
23
|
|
|
24
24
|
steps:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- name: Build gem
|
|
41
|
-
run: gem build xsort.gemspec
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
|
|
27
|
+
- name: Set up Ruby
|
|
28
|
+
uses: ruby/setup-ruby@v1
|
|
29
|
+
with:
|
|
30
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
31
|
+
rubygems: '3.0.3.1'
|
|
32
|
+
bundler: '2.4.22'
|
|
33
|
+
bundler-cache: true
|
|
34
|
+
|
|
35
|
+
- name: Run tests
|
|
36
|
+
run: bundle exec rspec
|
|
37
|
+
|
|
38
|
+
- name: Build gem
|
|
39
|
+
run: gem build xsort.gemspec
|
data/README.md
CHANGED
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
<p align="center">
|
|
2
2
|
|
|
3
|
-
<img src="https://
|
|
3
|
+
<img src="https://user-images.githubusercontent.com/5553852/159388128-8c3178c3-0d2d-462f-880a-f922650af40e.png" width="40%" height="40%">
|
|
4
4
|
|
|
5
|
-
[](https://shichimitoucarashi.com/)
|
|
6
5
|
[](https://www.ruby-lang.org/ja/)
|
|
7
|
-
[](https://github.com/keisukeYamagishi/xsort/blob/master/LICENSE)
|
|
8
7
|
|
|
9
8
|
</p>
|
|
10
9
|
|
|
11
10
|
# Build
|
|
12
11
|
|OS |Result |
|
|
13
12
|
|:---------------|:----------------|
|
|
14
|
-
| ***Linux*** |[](https://github.com/keisukeYamagishi/xsort/actions/workflows/ruby.yml)|
|
|
15
14
|
|
|
16
15
|
## Overview
|
|
17
16
|
|
|
@@ -60,6 +59,12 @@ option:
|
|
|
60
59
|
|
|
61
60
|
King Regards!
|
|
62
61
|
```
|
|
62
|
+
## Test
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
cd ./project-root-path
|
|
66
|
+
rspec
|
|
67
|
+
```
|
|
63
68
|
|
|
64
69
|
# Hot fix ***********************
|
|
65
70
|
#### (☝ ՞ਊ ՞)☝ Wow What's this!!!
|
|
@@ -89,7 +94,7 @@ xsort ./XcodeApps.xcodeproj
|
|
|
89
94
|
|
|
90
95
|
***You can sort them like the following image***
|
|
91
96
|
|
|
92
|
-
<img src="https://
|
|
97
|
+
<img src="https://user-images.githubusercontent.com/5553852/159388217-872e0749-bd86-4f15-b210-efcf29082130.png" width="50%" height="50%">
|
|
93
98
|
|
|
94
99
|
|
|
95
100
|
|
|
@@ -98,7 +103,7 @@ xsort ./XcodeApps.xcodeproj
|
|
|
98
103
|
***⚠️You should make a backup before you use it.⚠️***
|
|
99
104
|
|
|
100
105
|
```
|
|
101
|
-
xsort ./XcodeApps.xcodeproj
|
|
106
|
+
xsort ./XcodeApps.xcodeproj
|
|
102
107
|
```
|
|
103
108
|
or
|
|
104
109
|
|
|
@@ -158,7 +163,7 @@ xsort ../App/App.xcodeproj -r
|
|
|
158
163
|
|
|
159
164
|
```
|
|
160
165
|
->> ./xsort -v
|
|
161
|
-
Version: 1.4.
|
|
166
|
+
Version: 1.4.4
|
|
162
167
|
```
|
|
163
168
|
|
|
164
169
|
## Contributing
|
data/lib/xsort/version.rb
CHANGED
|
@@ -25,7 +25,7 @@ module Xcodeproj
|
|
|
25
25
|
|
|
26
26
|
@pbxs.each{ |pbx|
|
|
27
27
|
sort = pbx.children.sort{|pbx1, pbx2|
|
|
28
|
-
pbx1.name <=> pbx2.name
|
|
28
|
+
natural_sort_key(pbx1.name) <=> natural_sort_key(pbx2.name)
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
child = Array.new
|
|
@@ -75,6 +75,12 @@ module Xcodeproj
|
|
|
75
75
|
}
|
|
76
76
|
return pbx
|
|
77
77
|
end
|
|
78
|
+
|
|
79
|
+
def natural_sort_key(name)
|
|
80
|
+
name.scan(/\d+|\D+/).map do |part|
|
|
81
|
+
part.match?(/\A\d+\z/) ? [0, part.to_i] : [1, part]
|
|
82
|
+
end
|
|
83
|
+
end
|
|
78
84
|
end
|
|
79
85
|
end
|
|
80
86
|
end
|
data/xsort.gemspec
CHANGED
|
@@ -12,8 +12,8 @@ Gem::Specification.new do |spec|
|
|
|
12
12
|
spec.description = %q{Sort the file tree next to Xcode by file name.}
|
|
13
13
|
spec.homepage = "https://github.com/keisukeYamagishi/xsort"
|
|
14
14
|
spec.license = "MIT"
|
|
15
|
-
spec.required_ruby_version = ">= 2.
|
|
16
|
-
spec.required_rubygems_version = ">=
|
|
15
|
+
spec.required_ruby_version = ">= 2.6.10"
|
|
16
|
+
spec.required_rubygems_version = ">= 3.0.3"
|
|
17
17
|
|
|
18
18
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
|
19
19
|
f.match(%r{^(test|spec|features|doc)/})
|
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.4.
|
|
4
|
+
version: 1.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- keisuke
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2026-10-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -91,12 +91,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
91
91
|
requirements:
|
|
92
92
|
- - ">="
|
|
93
93
|
- !ruby/object:Gem::Version
|
|
94
|
-
version: 2.
|
|
94
|
+
version: 2.6.10
|
|
95
95
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
96
|
requirements:
|
|
97
97
|
- - ">="
|
|
98
98
|
- !ruby/object:Gem::Version
|
|
99
|
-
version:
|
|
99
|
+
version: 3.0.3
|
|
100
100
|
requirements: []
|
|
101
101
|
rubygems_version: 3.0.3.1
|
|
102
102
|
signing_key:
|