not_helpers 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: e9abd3220095c353e6686f8296c801a58ef07be67db114ad8ae5447d419b62ef
4
+ data.tar.gz: 0202d7c82ac05a064f82b85c4f6ddb838cc8cf19b04bfc6dd9581f677661bc38
5
+ SHA512:
6
+ metadata.gz: 97e916381110edc5ae771a1186bd2aaf5f10818258888121b582eecdf144f7f2e9fd3864c13701f5604c68be1ac4d243dedde21b444a4da2c082d97bf386ad09
7
+ data.tar.gz: 2829b0775e13dcf06f9b4ce199d085688ba922339c6a63bf949e5ad2602bbad4b7f33bf2966dd23b36bf674e0f80a27ec1157a9766f2b27457be5227c478a828
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2021 Leo Policastro
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # NotHelpers
2
+
3
+ NotHelpers is a **simple** Ruby gem that provides methods to make your life just a little bit easier.
4
+
5
+ ## Installation
6
+ Add this line to your application's Gemfile:
7
+
8
+ ```ruby
9
+ gem 'not_helpers'
10
+ ```
11
+
12
+ And then execute:
13
+ ```bash
14
+ $ bundle install
15
+ ```
16
+
17
+ Or install it yourself as:
18
+ ```bash
19
+ $ gem install not_helpers
20
+ ```
21
+
22
+ ## Usage
23
+ NotHelpers gives you access to the following methods.
24
+
25
+ 1. `not_nil?`
26
+ 2. `not_blank?`
27
+ 3. `not_empty?`
28
+ 4. `not_present?`
29
+
30
+ [What's the difference between these four?](https://medium.com/le-wagon/how-to-use-nil-blank-present-exists-in-rails-5-fe03e78ab979)
31
+
32
+ ## Contributing
33
+ I made this Gem mainly to learn how to make gems for Rails apps. If anyone has other helper methods that should be here please make a PR.
34
+
35
+ ## License
36
+ 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,18 @@
1
+ require "bundler/setup"
2
+
3
+ APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4
+ load "rails/tasks/engine.rake"
5
+
6
+ load "rails/tasks/statistics.rake"
7
+
8
+ require "bundler/gem_tasks"
9
+
10
+ require "rake/testtask"
11
+
12
+ Rake::TestTask.new(:test) do |t|
13
+ t.libs << 'test'
14
+ t.pattern = 'test/**/*_test.rb'
15
+ t.verbose = false
16
+ end
17
+
18
+ task default: :test
@@ -0,0 +1 @@
1
+ //= link_directory ../stylesheets/not_helpers .css
@@ -0,0 +1,15 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the bottom of the
9
+ * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS
10
+ * files in this directory. Styles in this file should be added after the last require_* statement.
11
+ * It is generally better to create a new file per style scope.
12
+ *
13
+ *= require_tree .
14
+ *= require_self
15
+ */
@@ -0,0 +1,4 @@
1
+ module NotHelpers
2
+ class ApplicationController < ActionController::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module NotHelpers
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module NotHelpers
2
+ class ApplicationJob < ActiveJob::Base
3
+ end
4
+ end
@@ -0,0 +1,6 @@
1
+ module NotHelpers
2
+ class ApplicationMailer < ActionMailer::Base
3
+ default from: 'from@example.com'
4
+ layout 'mailer'
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module NotHelpers
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+ end
5
+ end
@@ -0,0 +1,15 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Not helpers</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+
8
+ <%= stylesheet_link_tag "not_helpers/application", media: "all" %>
9
+ </head>
10
+ <body>
11
+
12
+ <%= yield %>
13
+
14
+ </body>
15
+ </html>
@@ -0,0 +1,17 @@
1
+ class Object
2
+ def not_nil?
3
+ !nil?
4
+ end
5
+
6
+ def not_blank?
7
+ !blank?
8
+ end
9
+
10
+ def not_empty?
11
+ !empty?
12
+ end
13
+
14
+ def not_present?
15
+ !present?
16
+ end
17
+ end
data/config/routes.rb ADDED
@@ -0,0 +1,2 @@
1
+ NotHelpers::Engine.routes.draw do
2
+ end
@@ -0,0 +1,5 @@
1
+ module NotHelpers
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace NotHelpers
4
+ end
5
+ end
@@ -0,0 +1,3 @@
1
+ module NotHelpers
2
+ VERSION = '0.1.1'
3
+ end
@@ -0,0 +1,6 @@
1
+ require "not_helpers/version"
2
+ require "not_helpers/engine"
3
+
4
+ module NotHelpers
5
+ # Your code goes here...
6
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :not_helpers do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: not_helpers
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Leo Policastro
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2021-08-25 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 6.1.4
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 6.1.4.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: 6.1.4
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 6.1.4.1
33
+ description: NotHelpers is a simple Ruby gem that provides helper methods to make
34
+ your life just a little bit easier.
35
+ email:
36
+ - leo@leopolicastro.com
37
+ executables: []
38
+ extensions: []
39
+ extra_rdoc_files: []
40
+ files:
41
+ - MIT-LICENSE
42
+ - README.md
43
+ - Rakefile
44
+ - app/assets/config/not_helpers_manifest.js
45
+ - app/assets/stylesheets/not_helpers/application.css
46
+ - app/controllers/not_helpers/application_controller.rb
47
+ - app/helpers/not_helpers/application_helper.rb
48
+ - app/jobs/not_helpers/application_job.rb
49
+ - app/mailers/not_helpers/application_mailer.rb
50
+ - app/models/not_helpers/application_record.rb
51
+ - app/views/layouts/not_helpers/application.html.erb
52
+ - config/initializers/super_helpful.rb
53
+ - config/routes.rb
54
+ - lib/not_helpers.rb
55
+ - lib/not_helpers/engine.rb
56
+ - lib/not_helpers/version.rb
57
+ - lib/tasks/not_helpers_tasks.rake
58
+ homepage: https://github.com/leopolicastro/not_helpers
59
+ licenses:
60
+ - MIT
61
+ metadata:
62
+ homepage_uri: https://github.com/leopolicastro/not_helpers
63
+ source_code_uri: https://github.com/leopolicastro/not_helpers
64
+ changelog_uri: https://github.com/leopolicastro/not_helpers
65
+ post_install_message:
66
+ rdoc_options: []
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ requirements: []
80
+ rubygems_version: 3.2.22
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: Provides simple methods.
84
+ test_files: []