pack_stats 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,155 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `parse_packwerk` gem.
5
+ # Please instead update this file by running `bin/tapioca gem parse_packwerk`.
6
+
7
+ module ParsePackwerk
8
+ class << self
9
+ sig { returns(T::Array[::ParsePackwerk::Package]) }
10
+ def all; end
11
+
12
+ sig { void }
13
+ def bust_cache!; end
14
+
15
+ sig { params(name: ::String).returns(T.nilable(::ParsePackwerk::Package)) }
16
+ def find(name); end
17
+
18
+ sig { params(file_path: T.any(::Pathname, ::String)).returns(::ParsePackwerk::Package) }
19
+ def package_from_path(file_path); end
20
+
21
+ sig { params(package: ::ParsePackwerk::Package).void }
22
+ def write_package_yml!(package); end
23
+
24
+ sig { returns(::ParsePackwerk::Configuration) }
25
+ def yml; end
26
+
27
+ private
28
+
29
+ sig { returns(T::Hash[::String, ::ParsePackwerk::Package]) }
30
+ def packages_by_name; end
31
+ end
32
+ end
33
+
34
+ class ParsePackwerk::Configuration < ::T::Struct
35
+ const :exclude, T::Array[::String]
36
+ const :package_paths, T::Array[::String]
37
+
38
+ class << self
39
+ sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
40
+ def excludes(config_hash); end
41
+
42
+ sig { returns(::ParsePackwerk::Configuration) }
43
+ def fetch; end
44
+
45
+ def inherited(s); end
46
+
47
+ sig { params(config_hash: T::Hash[T.untyped, T.untyped]).returns(T::Array[::String]) }
48
+ def package_paths(config_hash); end
49
+ end
50
+ end
51
+
52
+ ParsePackwerk::DEFAULT_EXCLUDE_GLOBS = T.let(T.unsafe(nil), Array)
53
+ ParsePackwerk::DEFAULT_PACKAGE_PATHS = T.let(T.unsafe(nil), Array)
54
+ ParsePackwerk::DEFAULT_PUBLIC_PATH = T.let(T.unsafe(nil), String)
55
+ ParsePackwerk::DEPENDENCIES = T.let(T.unsafe(nil), String)
56
+ ParsePackwerk::DEPRECATED_REFERENCES_YML_NAME = T.let(T.unsafe(nil), String)
57
+
58
+ class ParsePackwerk::DeprecatedReferences < ::T::Struct
59
+ const :pathname, ::Pathname
60
+ const :violations, T::Array[::ParsePackwerk::Violation]
61
+
62
+ class << self
63
+ sig { params(package: ::ParsePackwerk::Package).returns(::ParsePackwerk::DeprecatedReferences) }
64
+ def for(package); end
65
+
66
+ sig { params(pathname: ::Pathname).returns(::ParsePackwerk::DeprecatedReferences) }
67
+ def from(pathname); end
68
+
69
+ def inherited(s); end
70
+ end
71
+ end
72
+
73
+ ParsePackwerk::ENFORCE_DEPENDENCIES = T.let(T.unsafe(nil), String)
74
+ ParsePackwerk::ENFORCE_PRIVACY = T.let(T.unsafe(nil), String)
75
+ ParsePackwerk::METADATA = T.let(T.unsafe(nil), String)
76
+ ParsePackwerk::MetadataYmlType = T.type_alias { T::Hash[T.untyped, T.untyped] }
77
+
78
+ class ParsePackwerk::MissingConfiguration < ::StandardError
79
+ sig { params(packwerk_file_name: ::Pathname).void }
80
+ def initialize(packwerk_file_name); end
81
+ end
82
+
83
+ ParsePackwerk::PACKAGE_YML_NAME = T.let(T.unsafe(nil), String)
84
+ ParsePackwerk::PACKWERK_YML_NAME = T.let(T.unsafe(nil), String)
85
+ ParsePackwerk::PUBLIC_PATH = T.let(T.unsafe(nil), String)
86
+
87
+ class ParsePackwerk::Package < ::T::Struct
88
+ const :dependencies, T::Array[::String]
89
+ const :enforce_dependencies, T::Boolean
90
+ const :enforce_privacy, T::Boolean
91
+ const :metadata, T::Hash[T.untyped, T.untyped]
92
+ const :name, ::String
93
+ const :public_path, ::String, default: T.unsafe(nil)
94
+
95
+ sig { returns(::Pathname) }
96
+ def directory; end
97
+
98
+ sig { returns(T::Boolean) }
99
+ def enforces_dependencies?; end
100
+
101
+ sig { returns(T::Boolean) }
102
+ def enforces_privacy?; end
103
+
104
+ sig { returns(::Pathname) }
105
+ def public_directory; end
106
+
107
+ sig { returns(T::Array[::ParsePackwerk::Violation]) }
108
+ def violations; end
109
+
110
+ sig { returns(::Pathname) }
111
+ def yml; end
112
+
113
+ class << self
114
+ sig { params(pathname: ::Pathname).returns(::ParsePackwerk::Package) }
115
+ def from(pathname); end
116
+
117
+ def inherited(s); end
118
+ end
119
+ end
120
+
121
+ class ParsePackwerk::PackageSet
122
+ class << self
123
+ sig do
124
+ params(
125
+ package_pathspec: T::Array[::String],
126
+ exclude_pathspec: T::Array[::String]
127
+ ).returns(T::Array[::ParsePackwerk::Package])
128
+ end
129
+ def from(package_pathspec:, exclude_pathspec:); end
130
+
131
+ private
132
+
133
+ sig { params(globs: T::Array[::String], path: ::Pathname).returns(T::Boolean) }
134
+ def exclude_path?(globs, path); end
135
+ end
136
+ end
137
+
138
+ ParsePackwerk::ROOT_PACKAGE_NAME = T.let(T.unsafe(nil), String)
139
+
140
+ class ParsePackwerk::Violation < ::T::Struct
141
+ const :class_name, ::String
142
+ const :files, T::Array[::String]
143
+ const :to_package_name, ::String
144
+ const :type, ::String
145
+
146
+ sig { returns(T::Boolean) }
147
+ def dependency?; end
148
+
149
+ sig { returns(T::Boolean) }
150
+ def privacy?; end
151
+
152
+ class << self
153
+ def inherited(s); end
154
+ end
155
+ end
@@ -0,0 +1,13 @@
1
+ # DO NOT EDIT MANUALLY
2
+ # This is an autogenerated file for types exported from the `rspec` gem.
3
+ # Please instead update this file by running `bin/tapioca sync`.
4
+
5
+ # typed: true
6
+
7
+ module RSpec
8
+ end
9
+
10
+ module RSpec
11
+ module Matchers
12
+ end
13
+ end
@@ -0,0 +1,141 @@
1
+ # typed: true
2
+
3
+ # DO NOT EDIT MANUALLY
4
+ # This is an autogenerated file for types exported from the `rubocop-packs` gem.
5
+ # Please instead update this file by running `bin/tapioca gem rubocop-packs`.
6
+
7
+ module RuboCop; end
8
+ module RuboCop::Cop; end
9
+ module RuboCop::Cop::Packs; end
10
+
11
+ class RuboCop::Cop::Packs::RootNamespaceIsPackName::DesiredZeitwerkApi
12
+ sig do
13
+ params(
14
+ relative_filename: ::String,
15
+ package_for_path: ::ParsePackwerk::Package
16
+ ).returns(T.nilable(::RuboCop::Cop::Packs::RootNamespaceIsPackName::DesiredZeitwerkApi::NamespaceContext))
17
+ end
18
+ def for_file(relative_filename, package_for_path); end
19
+
20
+ sig { params(pack: ::ParsePackwerk::Package).returns(::String) }
21
+ def get_pack_based_namespace(pack); end
22
+
23
+ private
24
+
25
+ sig { params(remaining_file_path: ::String, package_name: ::String).returns(::String) }
26
+ def get_actual_namespace(remaining_file_path, package_name); end
27
+
28
+ sig { params(pack: ::ParsePackwerk::Package).returns(::String) }
29
+ def get_package_last_name(pack); end
30
+
31
+ sig { returns(::Pathname) }
32
+ def root_pathname; end
33
+ end
34
+
35
+ class RuboCop::Cop::Packs::RootNamespaceIsPackName::DesiredZeitwerkApi::NamespaceContext < ::T::Struct
36
+ const :current_fully_qualified_constant, ::String
37
+ const :current_namespace, ::String
38
+ const :expected_filepath, ::String
39
+ const :expected_namespace, ::String
40
+
41
+ class << self
42
+ def inherited(s); end
43
+ end
44
+ end
45
+
46
+ module RuboCop::Cop::PackwerkLite; end
47
+ class RuboCop::Cop::PackwerkLite::ConstantResolver; end
48
+
49
+ module RuboCop::Packs
50
+ class << self
51
+ sig { params(packs: T::Array[::ParsePackwerk::Package]).void }
52
+ def auto_generate_rubocop_todo(packs:); end
53
+
54
+ sig { void }
55
+ def bust_cache!; end
56
+
57
+ sig { returns(::RuboCop::Packs::Private::Configuration) }
58
+ def config; end
59
+
60
+ sig { params(blk: T.proc.params(arg0: ::RuboCop::Packs::Private::Configuration).void).void }
61
+ def configure(&blk); end
62
+
63
+ sig { params(rule: ::String).returns(T::Set[::String]) }
64
+ def exclude_for_rule(rule); end
65
+
66
+ sig { params(root_pathname: ::String).returns(::String) }
67
+ def pack_based_rubocop_config(root_pathname: T.unsafe(nil)); end
68
+
69
+ sig { params(packs: T::Array[::ParsePackwerk::Package]).void }
70
+ def set_default_rubocop_yml(packs:); end
71
+
72
+ sig { returns(T::Array[::String]) }
73
+ def validate; end
74
+ end
75
+ end
76
+
77
+ RuboCop::Packs::CONFIG = T.let(T.unsafe(nil), Hash)
78
+ RuboCop::Packs::CONFIG_DEFAULT = T.let(T.unsafe(nil), Pathname)
79
+ class RuboCop::Packs::Error < ::StandardError; end
80
+
81
+ module RuboCop::Packs::Inject
82
+ class << self
83
+ sig { void }
84
+ def defaults!; end
85
+ end
86
+ end
87
+
88
+ RuboCop::Packs::PACK_LEVEL_RUBOCOP_TODO_YML = T.let(T.unsafe(nil), String)
89
+ RuboCop::Packs::PACK_LEVEL_RUBOCOP_YML = T.let(T.unsafe(nil), String)
90
+ RuboCop::Packs::PROJECT_ROOT = T.let(T.unsafe(nil), Pathname)
91
+
92
+ module RuboCop::Packs::Private
93
+ class << self
94
+ sig { void }
95
+ def bust_cache!; end
96
+
97
+ sig { params(rule: ::String).returns(T::Set[::String]) }
98
+ def exclude_for_rule(rule); end
99
+
100
+ sig { void }
101
+ def load_client_configuration; end
102
+
103
+ sig { returns(T::Array[T::Hash[T.untyped, T.untyped]]) }
104
+ def rubocop_todo_ymls; end
105
+
106
+ sig { params(package: ::ParsePackwerk::Package).returns(T::Array[::String]) }
107
+ def validate_failure_mode_strict(package); end
108
+
109
+ sig { params(package: ::ParsePackwerk::Package).returns(T::Array[::String]) }
110
+ def validate_rubocop_todo_yml(package); end
111
+
112
+ sig { params(package: ::ParsePackwerk::Package).returns(T::Array[::String]) }
113
+ def validate_rubocop_yml(package); end
114
+ end
115
+ end
116
+
117
+ class RuboCop::Packs::Private::Configuration
118
+ sig { void }
119
+ def initialize; end
120
+
121
+ sig { void }
122
+ def bust_cache!; end
123
+
124
+ sig { returns(T::Array[::String]) }
125
+ def globally_permitted_namespaces; end
126
+
127
+ def globally_permitted_namespaces=(_arg0); end
128
+
129
+ sig { returns(T::Array[::String]) }
130
+ def permitted_pack_level_cops; end
131
+
132
+ def permitted_pack_level_cops=(_arg0); end
133
+
134
+ sig { returns(T::Array[::String]) }
135
+ def required_pack_level_cops; end
136
+
137
+ def required_pack_level_cops=(_arg0); end
138
+ end
139
+
140
+ module RuboCop::PackwerkLite; end
141
+ class RuboCop::PackwerkLite::Error < ::StandardError; end
@@ -0,0 +1,5 @@
1
+ # This file is autogenerated. Do not edit it by hand. Regenerate it with:
2
+ # srb rbi todo
3
+
4
+ # typed: strong
5
+ module ::RSpecTempfiles; end
metadata ADDED
@@ -0,0 +1,228 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: pack_stats
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Gusto Engineers
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2022-12-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: code_teams
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: code_ownership
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: dogapi
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: parse_packwerk
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sorbet-runtime
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rubocop-packs
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: rake
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: pry
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '3.0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '3.0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: sorbet
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: tapioca
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ description: A gem to collect statistics about modularization progress in a Rails
168
+ application using packwerk.
169
+ email:
170
+ - dev@gusto.com
171
+ executables: []
172
+ extensions: []
173
+ extra_rdoc_files: []
174
+ files:
175
+ - README.md
176
+ - lib/pack_stats.rb
177
+ - lib/pack_stats/gauge_metric.rb
178
+ - lib/pack_stats/private.rb
179
+ - lib/pack_stats/private/datadog_reporter.rb
180
+ - lib/pack_stats/private/metrics.rb
181
+ - lib/pack_stats/private/metrics/files.rb
182
+ - lib/pack_stats/private/metrics/nested_packs.rb
183
+ - lib/pack_stats/private/metrics/packages.rb
184
+ - lib/pack_stats/private/metrics/packages_by_team.rb
185
+ - lib/pack_stats/private/metrics/packwerk_checker_usage.rb
186
+ - lib/pack_stats/private/metrics/public_usage.rb
187
+ - lib/pack_stats/private/metrics/rubocop_usage.rb
188
+ - lib/pack_stats/private/source_code_file.rb
189
+ - lib/pack_stats/tag.rb
190
+ - lib/pack_stats/tags.rb
191
+ - sorbet/config
192
+ - sorbet/rbi/gems/code_ownership@1.28.0.rbi
193
+ - sorbet/rbi/gems/code_teams@1.0.0.rbi
194
+ - sorbet/rbi/gems/dogapi@1.45.0.rbi
195
+ - sorbet/rbi/gems/manual.rbi
196
+ - sorbet/rbi/gems/parse_packwerk@0.14.0.rbi
197
+ - sorbet/rbi/gems/rspec@3.10.0.rbi
198
+ - sorbet/rbi/gems/rubocop-packs@0.0.20.rbi
199
+ - sorbet/rbi/todo.rbi
200
+ homepage: https://github.com/rubyatscale/pack_stats
201
+ licenses:
202
+ - MIT
203
+ metadata:
204
+ homepage_uri: https://github.com/rubyatscale/pack_stats
205
+ source_code_uri: https://github.com/rubyatscale/pack_stats
206
+ changelog_uri: https://github.com/rubyatscale/pack_stats/releases
207
+ allowed_push_host: https://rubygems.org
208
+ post_install_message:
209
+ rdoc_options: []
210
+ require_paths:
211
+ - lib
212
+ required_ruby_version: !ruby/object:Gem::Requirement
213
+ requirements:
214
+ - - ">="
215
+ - !ruby/object:Gem::Version
216
+ version: 2.6.0
217
+ required_rubygems_version: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - ">="
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
222
+ requirements: []
223
+ rubygems_version: 3.1.6
224
+ signing_key:
225
+ specification_version: 4
226
+ summary: A gem to collect statistics about modularization progress in a Rails application
227
+ using packwerk.
228
+ test_files: []