rails_logs_intruder 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: 8f147bcef6b08728f4c5212dd8b295dd650ef65a6d9509780923b9530b8c80b2
4
+ data.tar.gz: af79f3a7f3cea9af8650ef93b0d33e4579100768121b43b978047678834ca5ef
5
+ SHA512:
6
+ metadata.gz: c60d870db2ef8c2ab25022c7d12b9446749914d6f0eedff86179d017ddb0e633d73bbe4a0df1d782a808fb20add4eba9d350b45c72458fcc5de480a5cce35925
7
+ data.tar.gz: 6ef37ed875c498966106df613650a241410a430956161ff7f509e6183eba2ccc4ba4eeead84bce2f7cdbb28c9974e8e28734fb9eef92d356ec93fe04d613e898
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,22 @@
1
+ require:
2
+ - rubocop-rake
3
+ - rubocop-rspec
4
+
5
+ AllCops:
6
+ NewCops: enable
7
+ TargetRubyVersion: 3.2
8
+
9
+ Style/StringLiterals:
10
+ Enabled: true
11
+ EnforcedStyle: double_quotes
12
+
13
+ Style/StringLiteralsInInterpolation:
14
+ Enabled: true
15
+ EnforcedStyle: double_quotes
16
+
17
+ Layout/LineLength:
18
+ Max: 120
19
+
20
+ RSpec/ExampleLength:
21
+ Max: 8
22
+ Enabled: true
data/Gemfile ADDED
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in rails_logs_intruder.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+ gem "rubocop", "~> 1.21"
12
+ gem "rubocop-rake", "~> 0.6"
13
+ gem "rubocop-rspec", "~> 2.25"
data/Gemfile.lock ADDED
@@ -0,0 +1,73 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ rails_logs_intruder (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ diff-lcs (1.5.0)
11
+ json (2.6.3)
12
+ language_server-protocol (3.17.0.3)
13
+ parallel (1.23.0)
14
+ parser (3.2.2.4)
15
+ ast (~> 2.4.1)
16
+ racc
17
+ racc (1.7.3)
18
+ rainbow (3.1.1)
19
+ rake (13.0.6)
20
+ regexp_parser (2.8.2)
21
+ rexml (3.2.6)
22
+ rspec (3.12.0)
23
+ rspec-core (~> 3.12.0)
24
+ rspec-expectations (~> 3.12.0)
25
+ rspec-mocks (~> 3.12.0)
26
+ rspec-core (3.12.2)
27
+ rspec-support (~> 3.12.0)
28
+ rspec-expectations (3.12.3)
29
+ diff-lcs (>= 1.2.0, < 2.0)
30
+ rspec-support (~> 3.12.0)
31
+ rspec-mocks (3.12.6)
32
+ diff-lcs (>= 1.2.0, < 2.0)
33
+ rspec-support (~> 3.12.0)
34
+ rspec-support (3.12.1)
35
+ rubocop (1.57.2)
36
+ json (~> 2.3)
37
+ language_server-protocol (>= 3.17.0)
38
+ parallel (~> 1.10)
39
+ parser (>= 3.2.2.4)
40
+ rainbow (>= 2.2.2, < 4.0)
41
+ regexp_parser (>= 1.8, < 3.0)
42
+ rexml (>= 3.2.5, < 4.0)
43
+ rubocop-ast (>= 1.28.1, < 2.0)
44
+ ruby-progressbar (~> 1.7)
45
+ unicode-display_width (>= 2.4.0, < 3.0)
46
+ rubocop-ast (1.30.0)
47
+ parser (>= 3.2.1.0)
48
+ rubocop-capybara (2.19.0)
49
+ rubocop (~> 1.41)
50
+ rubocop-factory_bot (2.24.0)
51
+ rubocop (~> 1.33)
52
+ rubocop-rake (0.6.0)
53
+ rubocop (~> 1.0)
54
+ rubocop-rspec (2.25.0)
55
+ rubocop (~> 1.40)
56
+ rubocop-capybara (~> 2.17)
57
+ rubocop-factory_bot (~> 2.22)
58
+ ruby-progressbar (1.13.0)
59
+ unicode-display_width (2.5.0)
60
+
61
+ PLATFORMS
62
+ x86_64-linux
63
+
64
+ DEPENDENCIES
65
+ rails_logs_intruder!
66
+ rake (~> 13.0)
67
+ rspec (~> 3.0)
68
+ rubocop (~> 1.21)
69
+ rubocop-rake (~> 0.6)
70
+ rubocop-rspec (~> 2.25)
71
+
72
+ BUNDLED WITH
73
+ 2.4.10
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Mykola Litynskyi
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
13
+ all 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
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,55 @@
1
+ # RailsLogsIntruder
2
+
3
+ Very simple ruby gem that outputs your (or default one) text into Rails' logs
4
+
5
+ ## Usage example
6
+
7
+ $ rails s
8
+ => Booting Puma
9
+ => Rails 7.0.8 application starting in development
10
+ => Run `bin/rails server --help` for more startup options
11
+
12
+ ██╗ ██╗███████╗██╗ ██╗ ██████╗ ████████╗██╗ ██╗███████╗██████╗ ███████╗
13
+ ██║ ██║██╔════╝██║ ██║ ██╔═══██╗ ╚══██╔══╝██║ ██║██╔════╝██╔══██╗██╔════╝
14
+ ███████║█████╗ ██║ ██║ ██║ ██║ ██║ ███████║█████╗ ██████╔╝█████╗
15
+ ██╔══██║██╔══╝ ██║ ██║ ██║ ██║ ██║ ██╔══██║██╔══╝ ██╔══██╗██╔══╝
16
+ ██║ ██║███████╗███████╗███████╗╚██████╔╝ ██║ ██║ ██║███████╗██║ ██║███████╗
17
+ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝
18
+
19
+
20
+ ## Installation
21
+
22
+ Install the gem and add to the application's Gemfile by executing:
23
+
24
+ $ bundle add rails_logs_intruder
25
+
26
+ Or you can manually add the gem to the application's Gemfile:
27
+
28
+ gem 'rails_logs_intruder', '~> 0.1.0'
29
+
30
+ If bundler is not being used to manage dependencies, install the gem by executing:
31
+
32
+ $ gem install rails_logs_intruder
33
+
34
+ ## Usage
35
+
36
+ To use the gem in your Rails application, create in `config/initializers` `rails_logs_intruder.rb` file with such contents:
37
+
38
+ RailsLogsIntruder.configure do |config|
39
+ config.default_message = <your_default_message>
40
+ end
41
+
42
+
43
+ After that, add this to `config/application.rb`:
44
+
45
+ config.after_initialize do
46
+ RailsLogsIntruder.put_message
47
+ end
48
+
49
+ You can pass to `RailsLogsIntruder.put_message` your custom message or leave empty for default.
50
+
51
+ ## Development
52
+
53
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
54
+
55
+ 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).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RailsLogsIntruder
4
+ VERSION = "0.1.1"
5
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "rails_logs_intruder/version"
4
+
5
+ # Module to output to Rails logs user's or default text
6
+ module RailsLogsIntruder
7
+ class << self
8
+ attr_accessor :configuration
9
+ end
10
+
11
+ def self.configure
12
+ self.configuration ||= Configuration.new
13
+ yield(configuration)
14
+ end
15
+
16
+ def self.put_message(message = nil)
17
+ message ||= self.configuration.default_message
18
+ puts message
19
+ end
20
+
21
+ # Class for RailsLogsIntruder configuration
22
+ class Configuration
23
+ attr_accessor :default_message
24
+
25
+ def initialize
26
+ @default_message = "
27
+ ██╗ ██╗███████╗██╗ ██╗ ██████╗ ████████╗██╗ ██╗███████╗██████╗ ███████╗
28
+ ██║ ██║██╔════╝██║ ██║ ██╔═══██╗ ╚══██╔══╝██║ ██║██╔════╝██╔══██╗██╔════╝
29
+ ███████║█████╗ ██║ ██║ ██║ ██║ ██║ ███████║█████╗ ██████╔╝█████╗
30
+ ██╔══██║██╔══╝ ██║ ██║ ██║ ██║ ██║ ██╔══██║██╔══╝ ██╔══██╗██╔══╝
31
+ ██║ ██║███████╗███████╗███████╗╚██████╔╝ ██║ ██║ ██║███████╗██║ ██║███████╗
32
+ ╚═╝ ╚═╝╚══════╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝╚══════╝
33
+ "
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,36 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/rails_logs_intruder/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "rails_logs_intruder"
7
+ spec.version = RailsLogsIntruder::VERSION
8
+ spec.authors = ["Mykola Litynskyi"]
9
+ spec.email = ["udevedu@skiff.com"]
10
+
11
+ spec.summary = "Gem that outputs your text into Rails logs"
12
+ spec.homepage = "https://github.com/linxola/rails_logs_intruder"
13
+ spec.license = "MIT"
14
+ spec.required_ruby_version = ">= 3.2"
15
+
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+ spec.metadata["source_code_uri"] = "https://github.com/linxola/rails_logs_intruder"
18
+ spec.metadata["rubygems_mfa_required"] = "true"
19
+
20
+ # Specify which files should be added to the gem when it is released.
21
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
22
+ spec.files = Dir.chdir(__dir__) do
23
+ `git ls-files -z`.split("\x0").reject do |f|
24
+ (File.expand_path(f) == __FILE__) || f.start_with?(*%w[bin/ test/ spec/ features/ .git .circleci appveyor])
25
+ end
26
+ end
27
+ spec.bindir = "exe"
28
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
29
+ spec.require_paths = ["lib"]
30
+
31
+ # Uncomment to register a new dependency of your gem
32
+ # spec.add_dependency "example-gem", "~> 1.0"
33
+
34
+ # For more information and examples about making a new gem, check out our
35
+ # guide at: https://bundler.io/guides/creating_gem.html
36
+ end
metadata ADDED
@@ -0,0 +1,56 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails_logs_intruder
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Mykola Litynskyi
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2023-11-27 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ - udevedu@skiff.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".rspec"
21
+ - ".rubocop.yml"
22
+ - Gemfile
23
+ - Gemfile.lock
24
+ - LICENSE.txt
25
+ - README.md
26
+ - Rakefile
27
+ - lib/rails_logs_intruder.rb
28
+ - lib/rails_logs_intruder/version.rb
29
+ - rails_logs_intruder.gemspec
30
+ homepage: https://github.com/linxola/rails_logs_intruder
31
+ licenses:
32
+ - MIT
33
+ metadata:
34
+ homepage_uri: https://github.com/linxola/rails_logs_intruder
35
+ source_code_uri: https://github.com/linxola/rails_logs_intruder
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: '3.2'
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.4.22
53
+ signing_key:
54
+ specification_version: 4
55
+ summary: Gem that outputs your text into Rails logs
56
+ test_files: []