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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8798ebf3ececa61884bab0ede207df073f0d9f1d468ab2b015c905515dfdf5e2
4
- data.tar.gz: d7b4f06a3167eb2c19a0d37708e29a27ac28423885036acacf183becfd2ce8cb
3
+ metadata.gz: 802dbfdabd1922aa35a0c659843cc951a8184984fbd6243df03bde05c79a6faa
4
+ data.tar.gz: d7918a9f86a1e51dc515bc35cfa0c8be726101ad7a828da42f4efbf19047b23d
5
5
  SHA512:
6
- metadata.gz: 8e0a3a05204b7548fae03ba61932fe9d99bab3965117d32d01350eaeeda37c5e1cfe42c00edeb75a4977de8f2c7f3c982eaee441e08c9943d88b6c93f6801b37
7
- data.tar.gz: 9d243c11b665d211d186d68b4c77f2a05d6e6ba8911788994047565b093e8e1279756525b49c815847b8e4b55ec3c3c68f9d2bcd6ae5451f222f774773453faa
6
+ metadata.gz: fd76f4c4bdc913d7b05bd6dfceeaced0e25a2d180f6497a95121d372938f23d2ab9bf26bdcd4364c3daac37d7003fbb5e6ea40b5c056bd34a217736b0716799d
7
+ data.tar.gz: 69345470f482f426d9cb0df1327ae4c37c6fa74f6a66157c2e61a6a1b27babd0bdb737f83567fcf2dcfd1b5c474a4074908b5277329e68851c8a652aa430998e
@@ -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.3', '2.6']
22
+ ruby-version: ['2.6.10']
23
23
 
24
24
  steps:
25
- - uses: actions/checkout@v2
26
- - name: Set up Ruby
27
- # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
28
- # change this to (see https://github.com/ruby/setup-ruby#versioning):
29
- # uses: ruby/setup-ruby@v1
30
- uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
31
- with:
32
- ruby-version: ${{ matrix.ruby-version }}
33
- bundler-cache: true # runs 'bundle install' and caches installed gems automatically
34
- - name: install bundler
35
- run: gem install bundler
36
- - name: bundle install
37
- run: bundle install
38
- - name: Run tests
39
- run: bundle exec rspec
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://github.com/keisukeYamagishi/xsort/blob/master/doc/xsort.png" width="40%" height="40%">
3
+ <img src="https://user-images.githubusercontent.com/5553852/159388128-8c3178c3-0d2d-462f-880a-f922650af40e.png" width="40%" height="40%">
4
4
 
5
- [![](https://img.shields.io/badge/HP-shichimitoucarashi-00acee)](https://shichimitoucarashi.com/)
6
5
  [![](https://img.shields.io/badge/Language-Ruby-red.svg)](https://www.ruby-lang.org/ja/)
7
- [![](https://img.shields.io/apm/l/vim-mode.svg)](https://github.com/keisukeYamagishi/xsort/blob/master/LICENSE)
6
+ [![](https://img.shields.io/badge/LICENSE-MIT-green)](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*** |[![Build Status](https://travis-ci.org/keisukeYamagishi/xsort.svg?branch=master)](https://travis-ci.org/keisukeYamagishi/xsort)
13
+ | ***Linux*** |[![Ruby](https://github.com/keisukeYamagishi/xsort/actions/workflows/ruby.yml/badge.svg)](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://github.com/keisukeYamagishi/xsort/blob/master/doc/result.png" width="50%" height="50%">
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.0
166
+ Version: 1.4.4
162
167
  ```
163
168
 
164
169
  ## Contributing
data/lib/xsort/version.rb CHANGED
@@ -10,5 +10,5 @@
10
10
  #===------------------------------------------------------------------(☝ ՞ਊ ՞)☝/
11
11
 
12
12
  module Xsort
13
- VERSION = "1.4.3"
13
+ VERSION = "1.4.4"
14
14
  end
@@ -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.3.7"
16
- spec.required_rubygems_version = ">= 2.5.2.3"
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.3
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: 2022-03-20 00:00:00.000000000 Z
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.3.7
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: 2.5.2.3
99
+ version: 3.0.3
100
100
  requirements: []
101
101
  rubygems_version: 3.0.3.1
102
102
  signing_key: