fui 0.6.0 → 0.7.0
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/CHANGELOG.md +12 -0
- data/CONTRIBUTING.md +3 -4
- data/LICENSE.md +3 -16
- data/README.md +9 -11
- data/RELEASING.md +18 -42
- data/lib/fui/finder.rb +3 -5
- data/lib/fui/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3b2fed3007eea591e143ba3feb0510c01aa6c95b03d002c64c9b14774cc075d2
|
|
4
|
+
data.tar.gz: 41c89d4dfe79c209d4dd92c9b5fad7fea4a72afc8b7c13f1a1bd2238d02f3f96
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 30cb12a339d0c0a0dfb2d4808ede925eaacdf466d200006f61c58ed0c0d70e3bd0148efa61e8d8bdea94e0a21855113ebc7aa51f70f24d6f442ab18477993373
|
|
7
|
+
data.tar.gz: cbf0cd4dddfc554350a53587b56a5681891994912c5eaa1eca965190ad00d3c2c122c4a08bf999111e3e648a437fd536c7a88c42302034ac6d96d85ec8cb8571
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
### 0.7.0 (2026/11/25)
|
|
2
|
+
|
|
3
|
+
* [#53](https://github.com/dblock/fui/pull/53): Test on Ruby 2.7, 3.4, and 4.0 with a `matrix.entry` matrix and current GitHub Actions - [@dblock](https://github.com/dblock).
|
|
4
|
+
* [#54](https://github.com/dblock/fui/pull/54): Lint Markdown, YAML, and spelling with rubocop-md, rubocop-prose, rubocop-spellcheck, and rubocop-yaml in a separate Lint workflow, and clean up documentation - [@dblock](https://github.com/dblock).
|
|
5
|
+
* [#55](https://github.com/dblock/fui/pull/55): Run CI pushes only on the default branch, cancel superseded pull request runs, and bound job times - [@dblock](https://github.com/dblock).
|
|
6
|
+
* [#56](https://github.com/dblock/fui/pull/56): Update Danger to the danger/danger-pr-comment 0.3.0 workflows and gem - [@dblock](https://github.com/dblock).
|
|
7
|
+
* [#62](https://github.com/dblock/fui/pull/62): Pin the danger/danger-pr-comment 0.3.0 workflows by commit, skip empty Danger comments, and cancel superseded Danger runs - [@dblock](https://github.com/dblock).
|
|
8
|
+
* [#58](https://github.com/dblock/fui/pull/58): Find imports without a space or with extra spaces, such as `#import"header.h"` - [@dblock](https://github.com/dblock).
|
|
9
|
+
* [#59](https://github.com/dblock/fui/pull/59): Find headers referenced with `#include`, including from `.c`, `.cc`, and `.cpp` files - [@dblock](https://github.com/dblock).
|
|
10
|
+
* [#60](https://github.com/dblock/fui/pull/60): Find imports whose case differs from the header file name, such as `#import "myclass.h"` for `MyClass.h` - [@dblock](https://github.com/dblock).
|
|
11
|
+
* [#63](https://github.com/dblock/fui/pull/63): Release with ruby-gem-release through a manually dispatched GitHub Actions workflow and RubyGems Trusted Publishing - [@dblock](https://github.com/dblock).
|
|
12
|
+
|
|
1
13
|
### 0.6.0 (2026/04/12)
|
|
2
14
|
|
|
3
15
|
* [#45](https://github.com/dblock/fui/pull/45): Migrated from Travis CI to GitHub Actions with danger-pr-comment workflow - [@dblock](https://github.com/dblock).
|
data/CONTRIBUTING.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
Contributing
|
|
2
|
-
============
|
|
1
|
+
# Contributing
|
|
3
2
|
|
|
4
3
|
You're encouraged to contribute to this gem.
|
|
5
4
|
|
|
6
5
|
* Fork this project.
|
|
7
6
|
* Make changes, write tests.
|
|
8
|
-
*
|
|
7
|
+
* Run `bundle exec rake` to lint the code and documentation and run the tests.
|
|
8
|
+
* Update [CHANGELOG](CHANGELOG.md).
|
|
9
9
|
* Make a pull request, bonus points for topic branches.
|
|
10
|
-
|
data/LICENSE.md
CHANGED
|
@@ -2,21 +2,8 @@ MIT License
|
|
|
2
2
|
|
|
3
3
|
Copyright (c) 2014-2018 Daniel Doubrovkine.
|
|
4
4
|
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
-
a copy of this software and associated documentation files (the
|
|
7
|
-
"Software"), to deal in the Software without restriction, including
|
|
8
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
-
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
-
the following conditions:
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
12
6
|
|
|
13
|
-
The above copyright notice and this permission notice shall be
|
|
14
|
-
included in all copies or substantial portions of the Software.
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
15
8
|
|
|
16
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
Fui
|
|
2
|
-
==========
|
|
1
|
+
# Fui
|
|
3
2
|
|
|
4
|
-
[](https://badge.fury.io/rb/fui)
|
|
5
|
-
[](https://github.com/dblock/fui/actions/workflows/test.yml)
|
|
3
|
+
[](https://badge.fury.io/rb/fui) [](https://github.com/dblock/fui/actions/workflows/test.yml) [](https://github.com/dblock/fui/actions/workflows/lint.yml)
|
|
6
4
|
|
|
7
5
|
Find unused Objective-C imports.
|
|
8
6
|
|
|
@@ -15,8 +13,8 @@ Find unused Objective-C imports.
|
|
|
15
13
|
- [Usage](#usage)
|
|
16
14
|
- [Get Help](#get-help)
|
|
17
15
|
- [Find Unused Classes in the Current Directory](#find-unused-classes-in-the-current-directory)
|
|
18
|
-
- [Find Unused Classes in
|
|
19
|
-
- [Skip Interface Builder (
|
|
16
|
+
- [Find Unused Classes in Any Path](#find-unused-classes-in-any-path)
|
|
17
|
+
- [Skip Interface Builder (XIB) Files](#skip-interface-builder-xib-files)
|
|
20
18
|
- [Ignore Local Imports](#ignore-local-imports)
|
|
21
19
|
- [Ignore Global Imports](#ignore-global-imports)
|
|
22
20
|
- [Ignore a Path](#ignore-a-path)
|
|
@@ -46,13 +44,13 @@ fui find
|
|
|
46
44
|
|
|
47
45
|
The `find` command lists all header (`.h`) files that are not imported anywhere in the project, and exits with the number of such files found.
|
|
48
46
|
|
|
49
|
-
### Find Unused Classes in
|
|
47
|
+
### Find Unused Classes in Any Path
|
|
50
48
|
|
|
51
49
|
```sh
|
|
52
50
|
fui --path=~/source/project/Name find
|
|
53
51
|
```
|
|
54
52
|
|
|
55
|
-
### Skip Interface Builder (
|
|
53
|
+
### Skip Interface Builder (XIB) Files
|
|
56
54
|
|
|
57
55
|
Running `fui` with `-x` (or `--ignore-xib-files`) will, for example, mark `Foo.h` as unused when `Foo.xib` holds a reference to the `Foo` class and no other references to Foo.h exist.
|
|
58
56
|
|
|
@@ -62,7 +60,7 @@ fui -x --path=~/source/project/Name find
|
|
|
62
60
|
|
|
63
61
|
### Ignore Local Imports
|
|
64
62
|
|
|
65
|
-
Running `fui` with `-l` (or `--ignore-local-imports`) will, for example, mark `Foo.h` as unused when `Bar.h` contains a local (quotation syntax) import of `Foo.h` (
|
|
63
|
+
Running `fui` with `-l` (or `--ignore-local-imports`) will, for example, mark `Foo.h` as unused when `Bar.h` contains a local (quotation syntax) import of `Foo.h` (e.g. `#import Foo.h`).
|
|
66
64
|
|
|
67
65
|
```sh
|
|
68
66
|
fui -l --path=~/source/project/Name find
|
|
@@ -70,7 +68,7 @@ fui -l --path=~/source/project/Name find
|
|
|
70
68
|
|
|
71
69
|
### Ignore Global Imports
|
|
72
70
|
|
|
73
|
-
Running `fui` with `-g` (or `--ignore-global-imports`) will, for example, mark `Foo.h` as unused when `Bar.h` contains a global (bracket syntax) import of `Foo.h` (
|
|
71
|
+
Running `fui` with `-g` (or `--ignore-global-imports`) will, for example, mark `Foo.h` as unused when `Bar.h` contains a global (bracket syntax) import of `Foo.h` (e.g. `#import <Framework/Foo.h>`).
|
|
74
72
|
|
|
75
73
|
```sh
|
|
76
74
|
fui -g --path=~/source/project/Name find
|
|
@@ -104,7 +102,7 @@ Use [xcfui](https://github.com/jcavar/xcfui) for integration with Xcode.
|
|
|
104
102
|
|
|
105
103
|
## Contributing
|
|
106
104
|
|
|
107
|
-
There
|
|
105
|
+
There are [a few feature requests and known issues](https://github.com/dblock/fui/issues). Please contribute! See [CONTRIBUTING](CONTRIBUTING.md).
|
|
108
106
|
|
|
109
107
|
## Copyright and License
|
|
110
108
|
|
data/RELEASING.md
CHANGED
|
@@ -1,61 +1,37 @@
|
|
|
1
|
-
# Releasing
|
|
1
|
+
# Releasing Fui
|
|
2
2
|
|
|
3
3
|
There are no hard rules about when to release fui. Release bug fixes frequently, features not so frequently, and breaking changes rarely.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Releases use [ruby-gem-release](https://github.com/dblock/ruby-gem-release) 0.9.0 through a manually dispatched [Release workflow](.github/workflows/release.yml). Keep the `ruby-gem-release` gem in [Gemfile](Gemfile) and the reusable workflow in `release.yml` pinned to the same version. The workflow publishes through RubyGems Trusted Publishing, so no RubyGems API key or one-time password is needed. It only runs from `master` in `dblock/fui`. The local Bundler `rake release`, `release:rubygem_push`, and `release:source_control_push` tasks are disabled.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## One-Time Setup
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
bundle install
|
|
11
|
-
rake
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
Check that the last build succeeded in [GitHub Actions](https://github.com/dblock/fui/actions).
|
|
15
|
-
|
|
16
|
-
Change "Next" in [CHANGELOG.md](CHANGELOG.md) to the current date.
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
### 0.4.0 (2016/5/14)
|
|
20
|
-
```
|
|
9
|
+
The [trusted publisher for fui](https://rubygems.org/gems/fui/trusted_publishers) is configured as a GitHub Actions publisher with repository owner `dblock`, repository `fui`, workflow filename `release.yml`, environment `release`, and the separate workflow repository owner `dblock` and repository `ruby-gem-release`.
|
|
21
10
|
|
|
22
|
-
|
|
11
|
+
GitHub creates the `release` environment in `dblock/fui` on the first dispatch. Restrict its deployment branches to `master`, and add required reviewers to require maintainer approval before publication. Allow GitHub Actions to push release commits and `v*` tags to `master`. See the upstream [setup and permissions guidance](https://github.com/dblock/ruby-gem-release/blob/v0.9.0/RELEASING.md#one-time-setup).
|
|
23
12
|
|
|
24
|
-
|
|
13
|
+
Verify the setup without publishing with a [dry run](https://github.com/dblock/ruby-gem-release/blob/v0.9.0/docs/actions/release.md#dry-run), which never edits files, builds, pushes, or publishes:
|
|
25
14
|
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
git commit -m "Preparing for release, 0.4.0."
|
|
29
|
-
git push origin master
|
|
15
|
+
```sh
|
|
16
|
+
gh workflow run release.yml --repo dblock/fui --ref master -f dry-run=true
|
|
30
17
|
```
|
|
31
18
|
|
|
32
|
-
|
|
19
|
+
## Prepare
|
|
33
20
|
|
|
34
|
-
|
|
35
|
-
$ rake release
|
|
21
|
+
Start with a clean, up-to-date `master` and verify that the latest [CI checks](https://github.com/dblock/fui/actions) pass for all supported Ruby versions. Follow semantic versioning: patch for fixes, minor for backward-compatible features, major for breaking changes. Check `VERSION` in [lib/fui/version.rb](lib/fui/version.rb) and the matching `(Next)` heading in [CHANGELOG.md](CHANGELOG.md), and change both in a pull request if needed, or pass a `version` override when dispatching.
|
|
36
22
|
|
|
37
|
-
|
|
38
|
-
Tagged v0.4.0.
|
|
39
|
-
Pushed git commits and tags.
|
|
40
|
-
Pushed fui 0.4.0 to rubygems.org.
|
|
41
|
-
```
|
|
23
|
+
The workflow dates the `(Next)` heading using `YYYY/MM/DD` and removes the `* Your contribution here.` placeholder; a section without notes cannot be released.
|
|
42
24
|
|
|
43
|
-
|
|
25
|
+
Release automation requires MRI Ruby 3.3 or newer; the release dependency and tasks are skipped on older Ruby versions and JRuby. Release specs in [spec/release](spec/release) run the actual release tasks against a local fixture with the [ruby-gem-release RSpec helpers](https://github.com/dblock/ruby-gem-release/blob/v0.9.0/docs/testing.md), without contacting RubyGems or GitHub.
|
|
44
26
|
|
|
45
|
-
|
|
27
|
+
## Publish
|
|
46
28
|
|
|
29
|
+
```sh
|
|
30
|
+
gh workflow run release.yml --repo dblock/fui --ref master
|
|
47
31
|
```
|
|
48
|
-
### 0.4.1 (Next)
|
|
49
32
|
|
|
50
|
-
|
|
51
|
-
```
|
|
33
|
+
Pass `-f version=x.y.z` to release a different version. Dispatching starts a real release; do not merge into `master` while it runs. The workflow prepares the release commit, runs lint and specs on Ruby 3.3, builds the gem, preserves recovery artifacts, publishes to RubyGems, pushes the release commit and `v` tag, and creates a GitHub Release with the changelog notes and the gem attached. It then increments the patch version, adds a new `(Next)` section, and pushes the next development commit. Verify the published version on [RubyGems](https://rubygems.org/gems/fui), the tag, the [GitHub Release](https://github.com/dblock/fui/releases), and the next development commit.
|
|
52
34
|
|
|
53
|
-
|
|
35
|
+
## Recover a Partial Release
|
|
54
36
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
```
|
|
58
|
-
git add CHANGELOG.md lib/fui/version.rb
|
|
59
|
-
git commit -m "Preparing for next development iteration, 0.4.1."
|
|
60
|
-
git push origin master
|
|
61
|
-
```
|
|
37
|
+
Inspect the failed run, RubyGems, remote commits and tags, and the GitHub Release before retrying. Publication may have succeeded even if a later step failed. Never move a published tag or republish a version with different contents. Use the run's retained recovery artifacts and the upstream [recovery instructions](https://github.com/dblock/ruby-gem-release/blob/v0.9.0/docs/actions/release.md#recovery-artifacts).
|
data/lib/fui/finder.rb
CHANGED
|
@@ -34,7 +34,7 @@ module Fui
|
|
|
34
34
|
references[header] = []
|
|
35
35
|
end
|
|
36
36
|
Find.find(path) do |path|
|
|
37
|
-
if ['.m', '.mm', '.h', '.pch'].include?(File.extname(path))
|
|
37
|
+
if ['.m', '.mm', '.h', '.pch', '.c', '.cc', '.cpp'].include?(File.extname(path))
|
|
38
38
|
process_code references, path, &block
|
|
39
39
|
elsif ['.storyboard', '.xib'].include?(File.extname(path))
|
|
40
40
|
process_xml references, path, &block
|
|
@@ -72,15 +72,13 @@ module Fui
|
|
|
72
72
|
def local_imported(file_contents, header)
|
|
73
73
|
return false if options['ignore-local-imports']
|
|
74
74
|
|
|
75
|
-
file_contents.
|
|
75
|
+
file_contents.match?(/#\s*(?:import|include)\s*"#{Regexp.quote(header.filename)}"/i)
|
|
76
76
|
end
|
|
77
77
|
|
|
78
78
|
def global_imported(file_contents, header)
|
|
79
79
|
return false if options['ignore-global-imports']
|
|
80
80
|
|
|
81
|
-
|
|
82
|
-
regex = '(#import\s{1}<.+\/' + escaped_header + '>)'
|
|
83
|
-
file_contents.match(regex)
|
|
81
|
+
file_contents.match?(%r{#\s*(?:import|include)\s*<.+/#{Regexp.quote(header.filename)}>}i)
|
|
84
82
|
end
|
|
85
83
|
|
|
86
84
|
def process_code(references, path)
|
data/lib/fui/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: fui
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.7.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Daniel Doubrovkine
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-
|
|
11
|
+
date: 2026-11-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gli
|
|
@@ -61,7 +61,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
61
61
|
- !ruby/object:Gem::Version
|
|
62
62
|
version: 1.3.6
|
|
63
63
|
requirements: []
|
|
64
|
-
rubygems_version: 3.5.
|
|
64
|
+
rubygems_version: 3.5.22
|
|
65
65
|
signing_key:
|
|
66
66
|
specification_version: 4
|
|
67
67
|
summary: Find unused Objective-C imports.
|