flutter_rb 0.8.3 → 1.0.1
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/CODE_OF_CONDUCT.md +76 -0
- data/COMMIT_CONVENTION.md +58 -0
- data/LICENSE +1 -1
- data/README.md +39 -46
- data/bin/frb +1 -1
- data/lib/checkstyle_report/checkstyle_report.rb +8 -8
- data/lib/flutter_rb/checks/check.rb +4 -4
- data/lib/flutter_rb/checks/plugin_podspec_check.rb +1 -1
- data/lib/flutter_rb/checks/plugin_pubspec_check.rb +1 -1
- data/lib/flutter_rb.rb +5 -3
- metadata +11 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8564b7cdf9819a28ea1ca5c145f9dcb813556575998924fb9b6cc8db5224ca77
|
4
|
+
data.tar.gz: 51b4cc3dd7dbf3b0d0e7a653f29defc47293b685c3de05f6e5a99ce846df9e41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7b595e1256a18e7f74d5d273054f7608dae0c3674bd0467db4108fb4ef7c8936248cd3daf610ac5e11242fe169d97085bd008fee98bb5dca2a2461a72a7f01cc
|
7
|
+
data.tar.gz: 7b12583d8fad4af058cde7c45e560141a9f74db75fe215f70b57ebe3a0584a7979471a7b68680f7ded6ebdd469cbf4421cfb4822e8d9af29d18fe08f2638fef1
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, sex characteristics, gender identity and expression,
|
9
|
+
level of experience, education, socio-economic status, nationality, personal
|
10
|
+
appearance, race, religion, or sexual identity and orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at jaman.smlnsk@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
|
72
|
+
|
73
|
+
[homepage]: https://www.contributor-covenant.org
|
74
|
+
|
75
|
+
For answers to common questions about this code of conduct, see
|
76
|
+
https://www.contributor-covenant.org/faq
|
@@ -0,0 +1,58 @@
|
|
1
|
+
# Commit Convention
|
2
|
+
|
3
|
+
## How to work with a project
|
4
|
+
|
5
|
+
### As a repository maintainer
|
6
|
+
|
7
|
+
#### New update
|
8
|
+
|
9
|
+
1. clone a project from a repository to local workspace;
|
10
|
+
2. create a new branch for an update;
|
11
|
+
3. complete the update;
|
12
|
+
4. perform a Code Review;
|
13
|
+
5. merge your branch with `master`;
|
14
|
+
6. delete your branch.
|
15
|
+
|
16
|
+
#### Notes
|
17
|
+
|
18
|
+
1. always delete development branches;
|
19
|
+
2. always push squashed commit to `master`.
|
20
|
+
|
21
|
+
### As a contributor
|
22
|
+
|
23
|
+
1. clone a project from a repository to local workspace;
|
24
|
+
2. create a new branch for an update;
|
25
|
+
3. complete the update;
|
26
|
+
4. perform a Code Review;
|
27
|
+
5. create a Pull Request to the original repository.
|
28
|
+
|
29
|
+
## Branches
|
30
|
+
|
31
|
+
### In projects using next types of branches
|
32
|
+
|
33
|
+
* `master` - master branch. Contains a production version of the project. Don't push working changes to `master`!
|
34
|
+
* `version` - branch for a specific version.
|
35
|
+
* `issue` - branch for a specific issue.
|
36
|
+
|
37
|
+
## Commit message structure
|
38
|
+
|
39
|
+
### Template
|
40
|
+
|
41
|
+
```text
|
42
|
+
[DATE] [VERSION]: [MESSAGE]
|
43
|
+
```
|
44
|
+
|
45
|
+
### Example
|
46
|
+
|
47
|
+
```text
|
48
|
+
2019-05-12 v. 2.1.3: fixed bugs in History screen
|
49
|
+
```
|
50
|
+
|
51
|
+
#### Commit body sections order
|
52
|
+
|
53
|
+
1. `added` - what was added in the commit;
|
54
|
+
2. `closed` - what issues closed in the commit;
|
55
|
+
3. `fixed` - what was fixed in the commit;
|
56
|
+
4. `updated` - what was updated in the commit;
|
57
|
+
5. `deleted` - what was deleted in the commit;
|
58
|
+
6. `refactored` - what was refactored in the commit.
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
<img src="media/logo/ic_lib.png" height="100px">
|
1
|
+
<img src="media/logo/ic_lib.png" height="100px" alt="Project's logo">
|
2
2
|
|
3
3
|
# flutter_rb
|
4
4
|
|
5
5
|
[](https://github.com/flutter-rb/flutter-rb/actions?branch=master)
|
6
|
-
[](https://codebeat.co/projects/github-com-
|
6
|
+
[](https://codebeat.co/projects/github-com-flutter-rb-flutter-rb-master)
|
7
7
|
[](https://badge.fury.io/rb/flutter_rb)
|
8
8
|
|
9
9
|
## About
|
@@ -14,41 +14,41 @@ A tool for checking a Flutter plugin structure.
|
|
14
14
|
|
15
15
|
#### Levels
|
16
16
|
|
17
|
-
Each issue has a `level` parameter that describes
|
17
|
+
Each issue has a `level` parameter that describes its significant importance.
|
18
18
|
|
19
|
-
| Level
|
20
|
-
|
21
|
-
| `NORMAL`
|
22
|
-
| `WARNING` | Issue is not serious and
|
23
|
-
| `ERROR`
|
19
|
+
| Level | Description |
|
20
|
+
|-----------|----------------------------------------------|
|
21
|
+
| `NORMAL` | Issue not found |
|
22
|
+
| `WARNING` | Issue is not serious and can't break a build |
|
23
|
+
| `ERROR` | Issue is critical and can break a build |
|
24
24
|
|
25
25
|
#### Flutter
|
26
26
|
|
27
|
-
| Check
|
28
|
-
|
29
|
-
| `PluginDirectoriesCheck`
|
30
|
-
| `PluginPubspecNameCheck`
|
31
|
-
| `PluginPubspecDescriptionCheck`
|
32
|
-
| `PluginPubspecVersionCheck`
|
33
|
-
| `PluginPubspecAuthorCheck`
|
34
|
-
| `PluginPubspecHomepageCheck`
|
35
|
-
| `PluginPubspecEffectiveDartCheck` | Check Flutter plugin Effective Dart depencency in pubspec file. Exists or not
|
27
|
+
| Check | Description | Level |
|
28
|
+
|-----------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|
|
29
|
+
| `PluginDirectoriesCheck` | Check plugin directories structure in pubspec file. Example: if a Flutter plugin has only Android specific code but not contains iOS folder with description, then iOS build fails | `ERROR` |
|
30
|
+
| `PluginPubspecNameCheck` | Check plugin name in pubspec file. Exists or not | `ERROR` |
|
31
|
+
| `PluginPubspecDescriptionCheck` | Check plugin description in pubspec file. Exists or not | `WARNING` |
|
32
|
+
| `PluginPubspecVersionCheck` | Check plugin version in pubspec. Exists or not | `ERROR` |
|
33
|
+
| `PluginPubspecAuthorCheck` | Check plugin author in pubspec. Exists or not. `author` section deprecated in `pubspec.yaml` | `WARNING` |
|
34
|
+
| `PluginPubspecHomepageCheck` | Check plugin homepage in pubspec. Exists or not | `ERROR` |
|
35
|
+
| `PluginPubspecEffectiveDartCheck` | Check Flutter plugin Effective Dart depencency in pubspec file. Exists or not | `ERROR` |
|
36
36
|
|
37
37
|
#### Android
|
38
38
|
|
39
|
-
| Check
|
40
|
-
|
41
|
-
| `PluginGradleAndroidPackageCheck` | Validate that \android\ package not exists in Gradle project config (build.gradle file)
|
42
|
-
| `PluginGradleVersionCheck`
|
39
|
+
| Check | Description | Level |
|
40
|
+
|-----------------------------------|-------------------------------------------------------------------------------------------------------------------------------|-----------|
|
41
|
+
| `PluginGradleAndroidPackageCheck` | Validate that \android\ package not exists in Gradle project config (build.gradle file) | `ERROR` |
|
42
|
+
| `PluginGradleVersionCheck` | Check plugin version in Gradle project config (build.gradle file). Version must be the same as plugin version in pubspec file | `WARNING` |
|
43
43
|
|
44
44
|
#### iOS
|
45
45
|
|
46
|
-
| Check
|
47
|
-
|
48
|
-
| `PluginPodspecNameCheck`
|
49
|
-
| `PluginPodspecVersionCheck` | Check plugin version in podspec file. Exists or not
|
50
|
-
| `PluginPodspecAuthorsCheck` | Check plugin's authors in podspec file. Exists or not
|
51
|
-
| `PluginPodspecSourceCheck`
|
46
|
+
| Check | Description | Level |
|
47
|
+
|-----------------------------|------------------------------------------------------------------------------------------------------------------------------|-----------|
|
48
|
+
| `PluginPodspecNameCheck` | Check plugin name in podspec file. Exists or not | `WARNING` |
|
49
|
+
| `PluginPodspecVersionCheck` | Check plugin version in podspec file. Exists or not | `WARNING` |
|
50
|
+
| `PluginPodspecAuthorsCheck` | Check plugin's authors in podspec file. Exists or not | `ERROR` |
|
51
|
+
| `PluginPodspecSourceCheck` | Check plugin iOS source path in podspec file. If Flutter plugin cannot contains iOS specific code, source path must be `'.'` | `ERROR` |
|
52
52
|
|
53
53
|
## How to use
|
54
54
|
|
@@ -58,36 +58,29 @@ You should add [flutter-rb-gradle-plugin](https://github.com/flutter-rb/flutter-
|
|
58
58
|
|
59
59
|
### Download gem from RubyGems
|
60
60
|
|
61
|
-
Install gem:
|
62
|
-
|
63
61
|
```shell
|
64
|
-
gem
|
62
|
+
$ gem i flutter_rb
|
65
63
|
```
|
66
64
|
|
67
65
|
Then run from a Flutter plugin's project folder:
|
68
66
|
|
69
67
|
```shell
|
70
|
-
frb
|
68
|
+
$ frb
|
71
69
|
```
|
72
70
|
|
73
71
|
### As local installed gem
|
74
72
|
|
75
|
-
Build gem from sources:
|
76
|
-
|
77
|
-
```shell
|
78
|
-
gem build flutter_rb.gemspec
|
79
|
-
```
|
80
|
-
|
81
|
-
Install gem:
|
73
|
+
Build and install gem from sources:
|
82
74
|
|
83
75
|
```shell
|
84
|
-
gem
|
76
|
+
$ gem build flutter_rb.gemspec
|
77
|
+
$ gem i flutter_rb
|
85
78
|
```
|
86
79
|
|
87
80
|
Then run from a Flutter plugin's project folder:
|
88
81
|
|
89
82
|
```shell
|
90
|
-
frb
|
83
|
+
$ frb
|
91
84
|
```
|
92
85
|
|
93
86
|
### As local executable
|
@@ -95,14 +88,14 @@ frb
|
|
95
88
|
Add `project_folder/bin` (where `project_folder` is path to project on your machine) to `PATH` variable in your environment. Then updated environment and run from a Flutter plugin's project folder:
|
96
89
|
|
97
90
|
```shell
|
98
|
-
local_frb
|
91
|
+
$ local_frb
|
99
92
|
```
|
100
93
|
|
101
94
|
### Arguments
|
102
95
|
|
103
|
-
| Argument
|
104
|
-
|
105
|
-
| `--help`
|
96
|
+
| Argument | Description |
|
97
|
+
|-----------------------|--------------------------------------|
|
98
|
+
| `--help` | Print help info |
|
106
99
|
| `--checkstyle-report` | Generate report in Checkstyle format |
|
107
100
|
|
108
101
|
|
@@ -131,10 +124,10 @@ Tool can make report in Checkstyle format. To enable this feature, pass `--check
|
|
131
124
|
|
132
125
|
## How to contribute
|
133
126
|
|
134
|
-
Read [Commit Convention](
|
127
|
+
Read [Commit Convention](./COMMIT_CONVENTION.md). Make sure your build is green before you contribute your pull request. Then:
|
135
128
|
|
136
129
|
```shell
|
137
|
-
bundle exec rake
|
130
|
+
$ bundle exec rake
|
138
131
|
```
|
139
132
|
|
140
133
|
If you don't see any error messages, submit your pull request.
|
data/bin/frb
CHANGED
@@ -27,7 +27,7 @@ module CheckstyleReport
|
|
27
27
|
checks.each do |check|
|
28
28
|
checkstyle_file = checkstyle_files[check.source]
|
29
29
|
checkstyle_files[check.source] = [] if checkstyle_file.nil?
|
30
|
-
checkstyle_files[check.source] += [check] if check.
|
30
|
+
checkstyle_files[check.source] += [check] if check.severity != CheckstyleError::SEVERITY_NORMAL
|
31
31
|
end
|
32
32
|
checkstyle_files
|
33
33
|
end
|
@@ -44,7 +44,7 @@ module CheckstyleReport
|
|
44
44
|
xml.error(
|
45
45
|
line: error.line,
|
46
46
|
column: error.column,
|
47
|
-
|
47
|
+
severity: error.severity,
|
48
48
|
message: error.message,
|
49
49
|
source: error.source
|
50
50
|
)
|
@@ -63,20 +63,20 @@ module CheckstyleReport
|
|
63
63
|
|
64
64
|
# Checkstyle error representation
|
65
65
|
class CheckstyleError
|
66
|
-
|
67
|
-
|
68
|
-
|
66
|
+
SEVERITY_NORMAL = 'normal'.freeze
|
67
|
+
SEVERITY_WARNING = 'warning'.freeze
|
68
|
+
SEVERITY_ERROR = 'error'.freeze
|
69
69
|
|
70
70
|
# rubocop:disable Metrics/ParameterLists
|
71
71
|
def initialize(
|
72
|
-
|
72
|
+
severity,
|
73
73
|
message,
|
74
74
|
source,
|
75
75
|
line,
|
76
76
|
column,
|
77
77
|
name
|
78
78
|
)
|
79
|
-
@
|
79
|
+
@severity = severity
|
80
80
|
@message = message
|
81
81
|
@source = source
|
82
82
|
@line = line
|
@@ -85,6 +85,6 @@ module CheckstyleReport
|
|
85
85
|
end
|
86
86
|
# rubocop:enable Metrics/ParameterLists
|
87
87
|
|
88
|
-
attr_reader :
|
88
|
+
attr_reader :severity, :message, :source, :line, :column, :name
|
89
89
|
end
|
90
90
|
end
|
@@ -3,14 +3,14 @@ module FlutterRb
|
|
3
3
|
# Class provides default methods structure
|
4
4
|
# All methods using for create reports
|
5
5
|
class Check
|
6
|
-
|
6
|
+
UNIMPLEMENTED_ERROR = 'Error: missing method'.freeze
|
7
7
|
|
8
8
|
def name
|
9
|
-
raise
|
9
|
+
raise UNIMPLEMENTED_ERROR
|
10
10
|
end
|
11
11
|
|
12
12
|
def summary
|
13
|
-
raise
|
13
|
+
raise UNIMPLEMENTED_ERROR
|
14
14
|
end
|
15
15
|
|
16
16
|
def description
|
@@ -18,7 +18,7 @@ module FlutterRb
|
|
18
18
|
end
|
19
19
|
|
20
20
|
def check
|
21
|
-
raise
|
21
|
+
raise UNIMPLEMENTED_ERROR
|
22
22
|
end
|
23
23
|
end
|
24
24
|
end
|
data/lib/flutter_rb.rb
CHANGED
@@ -82,11 +82,13 @@ module FlutterRb
|
|
82
82
|
def level_for_report(check_report_status)
|
83
83
|
case check_report_status
|
84
84
|
when CheckReportStatus::NORMAL
|
85
|
-
CheckstyleReport::CheckstyleError::
|
85
|
+
CheckstyleReport::CheckstyleError::SEVERITY_NORMAL
|
86
86
|
when CheckReportStatus::WARNING
|
87
|
-
CheckstyleReport::CheckstyleError::
|
87
|
+
CheckstyleReport::CheckstyleError::SEVERITY_WARNING
|
88
88
|
when CheckReportStatus::ERROR
|
89
|
-
CheckstyleReport::CheckstyleError::
|
89
|
+
CheckstyleReport::CheckstyleError::SEVERITY_ERROR
|
90
|
+
else
|
91
|
+
throw 'Unknown CheckReportStatus'
|
90
92
|
end
|
91
93
|
end
|
92
94
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flutter_rb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Artem Fomchenkov
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|
@@ -94,7 +94,7 @@ dependencies:
|
|
94
94
|
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '1.7'
|
97
|
-
description:
|
97
|
+
description:
|
98
98
|
email: artem.fomchenkov@outlook.com
|
99
99
|
executables:
|
100
100
|
- frb
|
@@ -102,6 +102,8 @@ extensions: []
|
|
102
102
|
extra_rdoc_files:
|
103
103
|
- README.md
|
104
104
|
files:
|
105
|
+
- CODE_OF_CONDUCT.md
|
106
|
+
- COMMIT_CONVENTION.md
|
105
107
|
- LICENSE
|
106
108
|
- README.md
|
107
109
|
- bin/frb
|
@@ -124,11 +126,11 @@ files:
|
|
124
126
|
- lib/flutter_rb/project/specs/ios/ios_folder.rb
|
125
127
|
- lib/flutter_rb/project/specs/ios/podspec.rb
|
126
128
|
- lib/flutter_rb/report/check_report.rb
|
127
|
-
homepage:
|
129
|
+
homepage: https://github.com/flutter-rb/flutter-rb
|
128
130
|
licenses:
|
129
131
|
- MIT
|
130
132
|
metadata: {}
|
131
|
-
post_install_message:
|
133
|
+
post_install_message:
|
132
134
|
rdoc_options: []
|
133
135
|
require_paths:
|
134
136
|
- lib
|
@@ -137,15 +139,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
137
139
|
requirements:
|
138
140
|
- - ">="
|
139
141
|
- !ruby/object:Gem::Version
|
140
|
-
version:
|
142
|
+
version: '3.0'
|
141
143
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
144
|
requirements:
|
143
145
|
- - ">="
|
144
146
|
- !ruby/object:Gem::Version
|
145
147
|
version: '0'
|
146
148
|
requirements: []
|
147
|
-
rubygems_version: 3.
|
148
|
-
signing_key:
|
149
|
+
rubygems_version: 3.4.10
|
150
|
+
signing_key:
|
149
151
|
specification_version: 4
|
150
152
|
summary: A Ruby tool for checking a Flutter plugin structure
|
151
153
|
test_files: []
|