byebye_pp 0.1.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 87c897319481bc600c1d4c254d3f17c8b1bcad01abee0ab3bc4ac0b767d5a1a4
4
+ data.tar.gz: e8f6c21b0b7f38c66e6bd741f92851fbb3589f45d7ca7892c1ea74a1348678e1
5
+ SHA512:
6
+ metadata.gz: 61d8e7782c67c6c6f7b1c5b0b6fdb687b9fd8e05b4e993358b0e1149a17e9ef304304e15a05309b4a73f23b177047109b726742b9628db2f79a9b3f69097c5e8
7
+ data.tar.gz: 208850656245d064a9978b93d0da27c95bb54da402e1d1971105a636fc51e25b900163e59bb19f9546af58eb7c2b013d09dd0a6ec6787e8e5411c4413e4f6a06
data/.rubocop.yml ADDED
@@ -0,0 +1,356 @@
1
+ require:
2
+ - rubocop-rspec
3
+
4
+ AllCops:
5
+ TargetRubyVersion: 2.6
6
+ SuggestExtensions: false
7
+ NewCops: enable
8
+
9
+ Layout/BeginEndAlignment:
10
+ Enabled: true
11
+
12
+ # Align `when` with `end`.
13
+ Layout/CaseIndentation:
14
+ Enabled: true
15
+ EnforcedStyle: end
16
+
17
+ Layout/DefEndAlignment:
18
+ Enabled: true
19
+
20
+ Layout/EmptyLineAfterGuardClause:
21
+ Enabled: true
22
+
23
+ Layout/EmptyLineBetweenDefs:
24
+ Enabled: true
25
+
26
+ Layout/EmptyLines:
27
+ Enabled: true
28
+
29
+ # Ruby coding rule of ESM, inc.
30
+ Layout/EmptyLinesAroundAccessModifier:
31
+ Enabled: true
32
+ EnforcedStyle: around
33
+
34
+ Layout/EmptyLinesAroundExceptionHandlingKeywords:
35
+ Enabled: true
36
+
37
+ Layout/ExtraSpacing:
38
+ Enabled: true
39
+
40
+ Layout/HeredocIndentation:
41
+ Enabled: true
42
+
43
+ # Ruby coding rule of ESM, inc.
44
+ Layout/IndentationConsistency:
45
+ Enabled: true
46
+ EnforcedStyle: normal
47
+
48
+ Layout/SpaceAroundBlockParameters:
49
+ Enabled: true
50
+
51
+ Layout/SpaceBeforeBrackets:
52
+ Enabled: true
53
+
54
+ Layout/SpaceInLambdaLiteral:
55
+ Enabled: true
56
+
57
+ Layout/SpaceInsideArrayLiteralBrackets:
58
+ Enabled: true
59
+
60
+ Layout/SpaceInsideBlockBraces:
61
+ Enabled: true
62
+ SpaceBeforeBlockParameters: true
63
+ EnforcedStyleForEmptyBraces: no_space
64
+
65
+ # Ruby coding rule of ESM, inc.
66
+ Layout/SpaceInsideHashLiteralBraces:
67
+ Enabled: true
68
+ EnforcedStyle: no_space
69
+
70
+ Layout/SpaceInsidePercentLiteralDelimiters:
71
+ Enabled: true
72
+
73
+ Layout/SpaceInsideRangeLiteral:
74
+ Enabled: true
75
+
76
+ Layout/SpaceInsideStringInterpolation:
77
+ Enabled: true
78
+
79
+ Lint/Debugger:
80
+ Enabled: true
81
+ DebuggerMethods:
82
+ # Groups are available so that a specific group can be disabled in
83
+ # a user's configuration, but are otherwise not significant.
84
+ Kernel:
85
+ - binding.irb
86
+ - p # `p` is an extended config.
87
+ Byebug:
88
+ - byebug
89
+ - remote_byebug
90
+ - Kernel.byebug
91
+ - Kernel.remote_byebug
92
+ Capybara:
93
+ - save_and_open_page
94
+ - save_and_open_screenshot
95
+ PP:
96
+ - PP.pp # `PP.pp` is an extended config.
97
+ - pp # `pp` is an extended config.
98
+ Pry:
99
+ - binding.pry
100
+ - binding.remote_pry
101
+ - binding.pry_remote
102
+ - Pry.rescue
103
+ Rails:
104
+ - debugger
105
+ - Kernel.debugger
106
+ WebConsole:
107
+ - binding.console
108
+
109
+ Lint/IneffectiveAccessModifier:
110
+ Enabled: true
111
+
112
+ Lint/NonAtomicFileOperation:
113
+ Enabled: true
114
+
115
+ Lint/OrderedMagicComments:
116
+ Enabled: true
117
+
118
+ Lint/ParenthesesAsGroupedExpression:
119
+ Enabled: true
120
+
121
+ Lint/RedundantStringCoercion:
122
+ Enabled: true
123
+
124
+ Lint/RefinementImportMethods:
125
+ Enabled: true
126
+
127
+ Lint/SendWithMixinArgument:
128
+ Enabled: true
129
+
130
+ Lint/ShadowedArgument:
131
+ Enabled: true
132
+
133
+ Lint/Syntax:
134
+ Enabled: true
135
+
136
+ Lint/UselessAccessModifier:
137
+ Enabled: true
138
+
139
+ Lint/Void:
140
+ Enabled: true
141
+
142
+ Naming/MemoizedInstanceVariableName:
143
+ Enabled: true
144
+
145
+ Naming/PredicateName:
146
+ Enabled: true
147
+
148
+ Style/CommentAnnotation:
149
+ Enabled: true
150
+
151
+ Style/Documentation:
152
+ Enabled: false
153
+
154
+ Style/EmptyElse:
155
+ Enabled: true
156
+ EnforcedStyle: empty
157
+ AllowComments: true
158
+
159
+ Style/EmptyLambdaParameter:
160
+ Enabled: true
161
+
162
+ Style/FileRead:
163
+ Enabled: true
164
+
165
+ Style/FileWrite:
166
+ Enabled: true
167
+
168
+ Style/FrozenStringLiteralComment:
169
+ Enabled: true
170
+
171
+ Style/HashSyntax:
172
+ Enabled: true
173
+
174
+ Style/IfWithBooleanLiteralBranches:
175
+ Enabled: true
176
+
177
+ Style/InverseMethods:
178
+ Enabled: true
179
+
180
+ Style/MapToSet:
181
+ Enabled: true
182
+
183
+ Style/MethodCallWithoutArgsParentheses:
184
+ Enabled: true
185
+
186
+ Style/MultilineIfThen:
187
+ Enabled: true
188
+
189
+ Style/MultilineTernaryOperator:
190
+ Enabled: true
191
+
192
+ Style/MultilineWhenThen:
193
+ Enabled: true
194
+
195
+ Style/NegatedIf:
196
+ Enabled: true
197
+
198
+ Style/NestedTernaryOperator:
199
+ Enabled: true
200
+
201
+ Style/PercentLiteralDelimiters:
202
+ Enabled: true
203
+ PreferredDelimiters:
204
+ default: ()
205
+ '%i': '()'
206
+ '%I': '()'
207
+ '%r': '||'
208
+ '%w': '()'
209
+ '%W': '()'
210
+
211
+ Style/RedundantArgument:
212
+ Enabled: true
213
+
214
+ Style/RedundantArrayConstructor:
215
+ Enabled: true
216
+
217
+ Style/RedundantBegin:
218
+ Enabled: true
219
+
220
+ Style/RedundantConstantBase:
221
+ Enabled: true
222
+
223
+ Style/RedundantEach:
224
+ Enabled: true
225
+
226
+ Style/RedundantDoubleSplatHashBraces:
227
+ Enabled: true
228
+
229
+ Style/RedundantFilterChain:
230
+ Enabled: true
231
+
232
+ Style/RedundantHeredocDelimiterQuotes:
233
+ Enabled: true
234
+
235
+ Style/RedundantInitialize:
236
+ Enabled: true
237
+
238
+ Style/RedundantParentheses:
239
+ Enabled: true
240
+
241
+ Style/RedundantRegexpArgument:
242
+ Enabled: true
243
+
244
+ Style/RedundantRegexpConstructor:
245
+ Enabled: true
246
+
247
+ Style/RedundantSort:
248
+ Enabled: true
249
+
250
+ Style/SafeNavigation:
251
+ Enabled: true
252
+
253
+ Style/SelectByRegexp:
254
+ Enabled: true
255
+
256
+ Style/SlicingWithRange:
257
+ Enabled: true
258
+
259
+ Style/StringChars:
260
+ Enabled: true
261
+
262
+ # Ruby coding rule of ESM, inc.
263
+ Style/StringLiterals:
264
+ Enabled: true
265
+ EnforcedStyle: single_quotes
266
+
267
+ Style/SymbolProc:
268
+ Enabled: true
269
+ AllowMethodsWithArguments: true
270
+
271
+ Style/TrailingCommaInArguments:
272
+ Enabled: true
273
+
274
+ Style/TrailingCommaInArrayLiteral:
275
+ Enabled: true
276
+
277
+ Style/TrailingCommaInHashLiteral:
278
+ Enabled: true
279
+
280
+ Style/YAMLFileRead:
281
+ Enabled: true
282
+
283
+ RSpec/BeEq:
284
+ Enabled: true
285
+
286
+ RSpec/BeNil:
287
+ Enabled: true
288
+
289
+ RSpec/EmptyLineAfterExample:
290
+ Enabled: true
291
+
292
+ RSpec/EmptyLineAfterExampleGroup:
293
+ Enabled: true
294
+
295
+ RSpec/EmptyLineAfterFinalLet:
296
+ Enabled: true
297
+
298
+ RSpec/EmptyLineAfterHook:
299
+ Enabled: true
300
+
301
+ RSpec/EmptyLineAfterSubject:
302
+ Enabled: true
303
+
304
+ RSpec/ExpectChange:
305
+ Enabled: true
306
+ EnforcedStyle: block
307
+
308
+ RSpec/ExcessiveDocstringSpacing:
309
+ Enabled: true
310
+
311
+ RSpec/Focus:
312
+ Enabled: true
313
+ # Prevents autocorrectoin when developing on LSP.
314
+ AutoCorrect: false
315
+
316
+ RSpec/ImplicitBlockExpectation:
317
+ Enabled: true
318
+
319
+ RSpec/ImplicitExpect:
320
+ Enabled: true
321
+
322
+ RSpec/PredicateMatcher:
323
+ Enabled: true
324
+
325
+ RSpec/RepeatedExampleGroupDescription:
326
+ Enabled: true
327
+
328
+ RSpec/SpecFilePathFormat:
329
+ Enabled: true
330
+
331
+ RSpec/SpecFilePathSuffix:
332
+ Enabled: true
333
+
334
+ RSpec/UnspecifiedException:
335
+ Enabled: true
336
+
337
+ # Copyright (c) 2023 ESM, Inc
338
+
339
+ # Permission is hereby granted, free of charge, to any person obtaining
340
+ # a copy of this software and associated documentation files (the
341
+ # "Software"), to deal in the Software without restriction, including
342
+ # without limitation the rights to use, copy, modify, merge, publish,
343
+ # distribute, sublicense, and/or sell copies of the Software, and to
344
+ # permit persons to whom the Software is furnished to do so, subject to
345
+ # the following conditions:
346
+
347
+ # The above copyright notice and this permission notice shall be
348
+ # included in all copies or substantial portions of the Software.
349
+
350
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
351
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
352
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
353
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
354
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
355
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
356
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2023-11-08
4
+
5
+ - Initial release
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 Fu-ga
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,74 @@
1
+ # ByebyePp
2
+
3
+ ByeByePp is gem for debug.
4
+
5
+ Are you writing code like the following for debug? If so, this gem will help.
6
+
7
+ ```ruby
8
+ a = 'This is A.'
9
+ b = 10
10
+ c = %w[one two three]
11
+
12
+ pp '=' * 40
13
+ pp a.class
14
+ pp a.inspect
15
+
16
+ pp '=' * 40
17
+ pp b.class
18
+ pp b.inspect
19
+
20
+ .
21
+ .
22
+ ```
23
+
24
+ ## Installation
25
+
26
+ Install the `byebye_pp` gem. `$ gem install byebye_pp` from the command line, or add a line in your Gemfile.
27
+
28
+ ```sh
29
+ $ gem byebye_pp
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ All that remains is to pass the debugging target to the `bbpp` method.
35
+
36
+ ```ruby
37
+ require 'byebye_pp'
38
+
39
+ a = 'This is A.'
40
+ b = 10
41
+ c = %w[one two three]
42
+
43
+ bbpp a
44
+ bbpp b
45
+ bbpp c
46
+ ```
47
+
48
+ The following output is obtained by `#bbpp`.
49
+
50
+ ```sh
51
+ ========================================
52
+ class: String
53
+ inspect: "This is A."
54
+ ========================================
55
+ class: Integer
56
+ inspect: 10
57
+ ========================================
58
+ class: Array
59
+ inspect: ["one", "two", "three"]
60
+ ```
61
+
62
+ ## Development
63
+
64
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
65
+
66
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
67
+
68
+ ## Contributing
69
+
70
+ Bug reports and pull requests are welcome on GitHub at https://github.com/fugakkbn/byebye_pp.
71
+
72
+ ## License
73
+
74
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rake/testtask'
5
+
6
+ Rake::TestTask.new(:test) do |t|
7
+ t.libs << 'test'
8
+ t.libs << 'lib'
9
+ t.test_files = FileList['test/**/test_*.rb']
10
+ end
11
+
12
+ require 'rubocop/rake_task'
13
+
14
+ RuboCop::RakeTask.new
15
+
16
+ task default: %i(test rubocop)
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ByebyePp
4
+ VERSION = '0.1.1'
5
+ end
data/lib/byebye_pp.rb ADDED
@@ -0,0 +1,17 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'byebye_pp/version'
4
+
5
+ module ByebyePp
6
+ def bbpp(obj)
7
+ text = <<~TEXT
8
+ #{'=' * 40}
9
+ class: #{obj.class}
10
+ inspect: #{obj.inspect}
11
+ TEXT
12
+
13
+ puts text
14
+ end
15
+ end
16
+
17
+ Kernel.include ByebyePp
data/sig/byebye_pp.rbs ADDED
@@ -0,0 +1,4 @@
1
+ module ByebyePp
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,56 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: byebye_pp
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - fugakkbn
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-11-12 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: Output the separator line, the variable name of the object and inspections
14
+ are output.
15
+ email:
16
+ - aax.chiri@gmail.com
17
+ executables: []
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ".rubocop.yml"
22
+ - CHANGELOG.md
23
+ - LICENSE
24
+ - README.md
25
+ - Rakefile
26
+ - lib/byebye_pp.rb
27
+ - lib/byebye_pp/version.rb
28
+ - sig/byebye_pp.rbs
29
+ homepage: https://github.com/fugakkbn/byebye_pp
30
+ licenses:
31
+ - MIT
32
+ metadata:
33
+ homepage_uri: https://github.com/fugakkbn/byebye_pp
34
+ source_code_uri: https://github.com/fugakkbn/byebye_pp
35
+ changelog_uri: https://github.com/fugakkbn/byebye_pp/blob/main/CHANGELOG.md
36
+ rubygems_mfa_required: 'true'
37
+ post_install_message:
38
+ rdoc_options: []
39
+ require_paths:
40
+ - lib
41
+ required_ruby_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: '2.6'
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
47
+ requirements:
48
+ - - ">="
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ requirements: []
52
+ rubygems_version: 3.5.0.dev
53
+ signing_key:
54
+ specification_version: 4
55
+ summary: byebye_pp makes stdout easier to read.
56
+ test_files: []