not_helpers 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/README.md +36 -0
- data/Rakefile +18 -0
- data/app/assets/config/not_helpers_manifest.js +1 -0
- data/app/assets/stylesheets/not_helpers/application.css +15 -0
- data/app/controllers/not_helpers/application_controller.rb +4 -0
- data/app/helpers/not_helpers/application_helper.rb +4 -0
- data/app/jobs/not_helpers/application_job.rb +4 -0
- data/app/mailers/not_helpers/application_mailer.rb +6 -0
- data/app/models/not_helpers/application_record.rb +5 -0
- data/app/views/layouts/not_helpers/application.html.erb +15 -0
- data/config/initializers/super_helpful.rb +17 -0
- data/config/routes.rb +2 -0
- data/lib/not_helpers/engine.rb +5 -0
- data/lib/not_helpers/version.rb +3 -0
- data/lib/not_helpers.rb +6 -0
- data/lib/tasks/not_helpers_tasks.rake +4 -0
- metadata +84 -0
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
|
+
*/
|
data/config/routes.rb
ADDED
data/lib/not_helpers.rb
ADDED
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: []
|