ped 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: d94d3b39ccc7bb6bd482b67e5fe5db1321837743545010ab7667822ca7909533
4
+ data.tar.gz: 1714d0b305c57b3af42fcf3b3035c9a147a5dd5b89ec594116f87ccb057382e4
5
+ SHA512:
6
+ metadata.gz: 47add42ab996e0902d1b45a7fd0b6967c555e183312323af993828fcb5d17afc8bd0ddbc306c4d8d1904fba6c3fd5e7ee4abcd5d951eeb4eb580689996b0401f
7
+ data.tar.gz: 6de115dcf87c7cebbbdd3f9e4ecec3c99c1bbe592d8edf5975d733cbef026b210c8ba69ef07a3e94c0cd7c398ed5b26e336aaebeaed4f46efb8b0cd91403ee40
@@ -0,0 +1,11 @@
1
+ # Tell us about your environment
2
+
3
+ **Ruby Version:**
4
+
5
+ **Ped Version:**
6
+
7
+ ## What did you do?
8
+
9
+ ## What did you expect to happen?
10
+
11
+ ## What actually happened?
@@ -0,0 +1,57 @@
1
+ name: Lint Docs
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ paths:
8
+ - "*.md"
9
+ - "**/*.md"
10
+ pull_request:
11
+ paths:
12
+ - "*.md"
13
+ - "**/*.md"
14
+
15
+ jobs:
16
+ markdownlint:
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v2
20
+ - uses: ruby/setup-ruby@v1
21
+ with:
22
+ ruby-version: 2.7
23
+ - name: Run Markdown linter
24
+ run: |
25
+ gem install mdl
26
+ mdl README.md .github/*.md
27
+ rubocop:
28
+ runs-on: ubuntu-latest
29
+ steps:
30
+ - uses: actions/checkout@v2
31
+ - uses: ruby/setup-ruby@v1
32
+ with:
33
+ ruby-version: 2.7
34
+ - name: Lint Markdown files with RuboCop
35
+ run: |
36
+ gem install bundler
37
+ bundle install --gemfile gemfiles/rubocop.gemfile --jobs 4 --retry 3
38
+ bundle exec --gemfile gemfiles/rubocop.gemfile rubocop -c .rubocop-md.yml
39
+ forspell:
40
+ runs-on: ubuntu-latest
41
+ steps:
42
+ - uses: actions/checkout@v2
43
+ - name: Install Hunspell
44
+ run: |
45
+ sudo apt-get install hunspell
46
+ - uses: ruby/setup-ruby@v1
47
+ with:
48
+ ruby-version: 2.7
49
+ - name: Cache installed gems
50
+ uses: actions/cache@v1
51
+ with:
52
+ path: /home/runner/.rubies/ruby-2.7.0/lib/ruby/gems/2.7.0
53
+ key: gems-cache-${{ runner.os }}
54
+ - name: Install Forspell
55
+ run: gem install forspell
56
+ - name: Run Forspell
57
+ run: forspell *.md .github/*.md
@@ -0,0 +1,51 @@
1
+ name: Build
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+
9
+ jobs:
10
+ rspec:
11
+ runs-on: ubuntu-latest
12
+ env:
13
+ BUNDLE_JOBS: 4
14
+ BUNDLE_RETRY: 3
15
+ CI: true
16
+ strategy:
17
+ fail-fast: false
18
+ matrix:
19
+ ruby: ["2.7"]
20
+ gemfile: [
21
+ "gemfiles/rails61.gemfile"
22
+ ]
23
+ fx: ["false"]
24
+ include:
25
+ - ruby: "3.0"
26
+ fx: "false"
27
+ - ruby: "2.7"
28
+ fx: "false"
29
+ - ruby: "2.6"
30
+ fx: "false"
31
+ steps:
32
+ - uses: actions/checkout@v2
33
+ - uses: actions/cache@v1
34
+ with:
35
+ path: /home/runner/bundle
36
+ key: bundle-${{ matrix.ruby }}-${{ hashFiles('**/*.gemspec') }}
37
+ restore-keys: |
38
+ bundle-${{ matrix.ruby }}-
39
+ - uses: ruby/setup-ruby@v1
40
+ with:
41
+ ruby-version: ${{ matrix.ruby }}
42
+ - name: Bundle install
43
+ run: |
44
+ bundle config path /home/runner/bundle
45
+ bundle install
46
+ bundle update
47
+ - name: Run RSpec
48
+ env:
49
+ USE_FX: ${{ matrix.fx }}
50
+ run: |
51
+ bundle exec rspec -f d --force-color
@@ -0,0 +1,21 @@
1
+ name: Rubocop
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - master
7
+ pull_request:
8
+
9
+ jobs:
10
+ rubocop:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v2
14
+ - uses: ruby/setup-ruby@v1
15
+ with:
16
+ ruby-version: 2.7
17
+ - name: RuboCop
18
+ run: |
19
+ gem install bundler
20
+ bundle install --gemfile gemfiles/rubocop.gemfile --jobs 4 --retry 3
21
+ bundle exec --gemfile gemfiles/rubocop.gemfile rubocop
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.mdlrc ADDED
@@ -0,0 +1 @@
1
+ rules "~MD013", "~MD026", "~MD029", "~MD034", "~MD041"
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
@@ -0,0 +1,20 @@
1
+ inherit_from: ".rubocop.yml"
2
+
3
+ require:
4
+ - rubocop-md
5
+
6
+
7
+ AllCops:
8
+ Include:
9
+ - '**/*.md'
10
+
11
+ Lint/Void:
12
+ Exclude:
13
+ - '**/*.md'
14
+
15
+ Lint/DuplicateMethods:
16
+ Exclude:
17
+ - '**/*.md'
18
+
19
+ Layout/SpaceInsideHashLiteralBraces:
20
+ EnforcedStyle: space
@@ -0,0 +1,27 @@
1
+ inherit_gem:
2
+ jetrockets-standard: config/gems.yml
3
+
4
+ AllCops:
5
+ Exclude:
6
+ - 'bin/*'
7
+ - 'tmp/**/*'
8
+ - 'docs/**/*'
9
+ - 'Gemfile'
10
+ - 'vendor/**/*'
11
+ - 'gemfiles/**/*'
12
+ DisplayCopNames: true
13
+ TargetRubyVersion: 2.6
14
+
15
+ Style/TrailingCommaInArrayLiteral:
16
+ EnforcedStyleForMultiline: no_comma
17
+
18
+ Style/TrailingCommaInHashLiteral:
19
+ EnforcedStyleForMultiline: no_comma
20
+
21
+ Layout/ParameterAlignment:
22
+ EnforcedStyle: with_first_parameter
23
+
24
+ # See https://github.com/rubocop-hq/rubocop/issues/4222
25
+ Lint/AmbiguousBlockAssociation:
26
+ Exclude:
27
+ - 'spec/**/*'
@@ -0,0 +1 @@
1
+ 2.7.2
@@ -0,0 +1,6 @@
1
+ ---
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.7.2
6
+ before_install: gem install bundler -v 2.1.4
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at igor.alexandrov@gmail.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
data/Gemfile ADDED
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ # Specify your gem's dependencies in ped.gemspec
6
+ gemspec
7
+
8
+ gem 'rake', '~> 12.0'
9
+ gem 'rspec', '~> 3.0'
@@ -0,0 +1,34 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ ped (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ diff-lcs (1.4.4)
10
+ rake (12.3.3)
11
+ rspec (3.10.0)
12
+ rspec-core (~> 3.10.0)
13
+ rspec-expectations (~> 3.10.0)
14
+ rspec-mocks (~> 3.10.0)
15
+ rspec-core (3.10.1)
16
+ rspec-support (~> 3.10.0)
17
+ rspec-expectations (3.10.1)
18
+ diff-lcs (>= 1.2.0, < 2.0)
19
+ rspec-support (~> 3.10.0)
20
+ rspec-mocks (3.10.1)
21
+ diff-lcs (>= 1.2.0, < 2.0)
22
+ rspec-support (~> 3.10.0)
23
+ rspec-support (3.10.1)
24
+
25
+ PLATFORMS
26
+ ruby
27
+
28
+ DEPENDENCIES
29
+ ped!
30
+ rake (~> 12.0)
31
+ rspec (~> 3.0)
32
+
33
+ BUNDLED WITH
34
+ 2.1.4
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Igor Alexandrov
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.
@@ -0,0 +1,48 @@
1
+ # PED
2
+
3
+ PED – check you email domain over list of Public Email Domains.
4
+ Based on data from this GIST [https://gist.github.com/tbrianjones/5992856](https://gist.github.com/tbrianjones/5992856).
5
+
6
+ ## Installation
7
+
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem 'ped'
12
+ ```
13
+
14
+ And then execute:
15
+
16
+ $ bundle install
17
+
18
+ Or install it yourself as:
19
+
20
+ $ gem install ped
21
+
22
+ ## Usage
23
+
24
+ ```ruby
25
+ Ped.public_email_domain?('gmail.com')
26
+ #=> true
27
+
28
+ Ped.public_email_domain?('jetrockets.pro')
29
+ #=> false
30
+ ```
31
+
32
+ ## Development
33
+
34
+ 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.
35
+
36
+ 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
37
+
38
+ ## Contributing
39
+
40
+ Bug reports and pull requests are welcome on GitHub at https://github.com/igor-alexandrov/ped. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/igor-alexandrov/ped/blob/master/CODE_OF_CONDUCT.md).
41
+
42
+ ## License
43
+
44
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
45
+
46
+ ## Code of Conduct
47
+
48
+ Everyone interacting in the Ped project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/ped/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,8 @@
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
+ task default: :spec
@@ -0,0 +1,15 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
5
+ require 'ped'
6
+
7
+ # You can add fixtures and/or initialization code here to make experimenting
8
+ # with your gem easier. You can also use a different console, if you like.
9
+
10
+ # (If you use this, don't forget to add pry to your Gemfile!)
11
+ # require "pry"
12
+ # Pry.start
13
+
14
+ require 'irb'
15
+ IRB.start(__FILE__)