advanced_ruby_command_handler 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7258a083e3ff0eb4b981774ef3176d83e02135956741df2e71d56473dd2e71d
4
- data.tar.gz: 7f20aeb3d26b27a89747185cf50e2b44213f8129307609b71cfa9d767cc97554
3
+ metadata.gz: 97c6a7076b47b7d2dda46986b94f2972363dc81c17c55d619a7d668e8c39df09
4
+ data.tar.gz: 3b6a580272ef1e6f5f86b49719fc50c5616aeb2a729592b913ea45ffb88857d3
5
5
  SHA512:
6
- metadata.gz: 103b9f6247132f13258779835e2ccba10c2426676cdbcc1ec1966110ece0f57efad687e3166b7dbd8d65698371871e73cee955d4b151642d21a02ea964ecbb9c
7
- data.tar.gz: 270e5f60fd5457bed3878a6998ae83f4bee712ddadf7aee7956ef8de9bd1344bbbcdb1214f176da2d5b2d9b635aea863739c12cb501053fad65e951563ad3363
6
+ metadata.gz: e8133e6028b5acb9095b4e48a653db545840091de10e4d0c6af5d390c21f2aab4762b1250a951ebf9f3545b81d31fd7a905a5f7ae39f7edd680780e70b8a7fcc
7
+ data.tar.gz: 52d14801db9f0d424dd18a13b732e16fdcb504131c966b6ce243c12f3f8d4c961da6e5563445b7beda70ab0edfe008d1d75dedffa5795db1176404534287f0cf
@@ -0,0 +1,37 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ main ]
13
+ pull_request:
14
+ branches: [ main ]
15
+
16
+ jobs:
17
+ test:
18
+
19
+ runs-on: ubuntu-latest
20
+ strategy:
21
+ matrix:
22
+ ruby-version: ['2.6', '2.7', '3.0']
23
+
24
+ steps:
25
+ - uses: actions/checkout@v2
26
+ - name: Set up Ruby
27
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
28
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
29
+ # uses: ruby/setup-ruby@v1
30
+ uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e
31
+ with:
32
+ ruby-version: ${{ matrix.ruby-version }}
33
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
34
+ - name: Install dependencies
35
+ run: bundle install
36
+ - name: Run tests
37
+ run: bundle exec rake
@@ -0,0 +1,128 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our
6
+ community a harassment-free experience for everyone, regardless of age, body
7
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
8
+ identity and expression, level of experience, education, socio-economic status,
9
+ nationality, personal appearance, race, religion, or sexual identity
10
+ and orientation.
11
+
12
+ We pledge to act and interact in ways that contribute to an open, welcoming,
13
+ diverse, inclusive, and healthy community.
14
+
15
+ ## Our Standards
16
+
17
+ Examples of behavior that contributes to a positive environment for our
18
+ community include:
19
+
20
+ * Demonstrating empathy and kindness toward other people
21
+ * Being respectful of differing opinions, viewpoints, and experiences
22
+ * Giving and gracefully accepting constructive feedback
23
+ * Accepting responsibility and apologizing to those affected by our mistakes,
24
+ and learning from the experience
25
+ * Focusing on what is best not just for us as individuals, but for the
26
+ overall community
27
+
28
+ Examples of unacceptable behavior include:
29
+
30
+ * The use of sexualized language or imagery, and sexual attention or
31
+ advances of any kind
32
+ * Trolling, insulting or derogatory comments, and personal or political attacks
33
+ * Public or private harassment
34
+ * Publishing others' private information, such as a physical or email
35
+ address, without their explicit permission
36
+ * Other conduct which could reasonably be considered inappropriate in a
37
+ professional setting
38
+
39
+ ## Enforcement Responsibilities
40
+
41
+ Community leaders are responsible for clarifying and enforcing our standards of
42
+ acceptable behavior and will take appropriate and fair corrective action in
43
+ response to any behavior that they deem inappropriate, threatening, offensive,
44
+ or harmful.
45
+
46
+ Community leaders have the right and responsibility to remove, edit, or reject
47
+ comments, commits, code, wiki edits, issues, and other contributions that are
48
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
49
+ decisions when appropriate.
50
+
51
+ ## Scope
52
+
53
+ This Code of Conduct applies within all community spaces, and also applies when
54
+ an individual is officially representing the community in public spaces.
55
+ Examples of representing our community include using an official e-mail address,
56
+ posting via an official social media account, or acting as an appointed
57
+ representative at an online or offline event.
58
+
59
+ ## Enforcement
60
+
61
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
62
+ reported to the community leaders responsible for enforcement at
63
+ .
64
+ All complaints will be reviewed and investigated promptly and fairly.
65
+
66
+ All community leaders are obligated to respect the privacy and security of the
67
+ reporter of any incident.
68
+
69
+ ## Enforcement Guidelines
70
+
71
+ Community leaders will follow these Community Impact Guidelines in determining
72
+ the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ ### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed
77
+ unprofessional or unwelcome in the community.
78
+
79
+ **Consequence**: A private, written warning from community leaders, providing
80
+ clarity around the nature of the violation and an explanation of why the
81
+ behavior was inappropriate. A public apology may be requested.
82
+
83
+ ### 2. Warning
84
+
85
+ **Community Impact**: A violation through a single incident or series
86
+ of actions.
87
+
88
+ **Consequence**: A warning with consequences for continued behavior. No
89
+ interaction with the people involved, including unsolicited interaction with
90
+ those enforcing the Code of Conduct, for a specified period of time. This
91
+ includes avoiding interactions in community spaces as well as external channels
92
+ like social media. Violating these terms may lead to a temporary or
93
+ permanent ban.
94
+
95
+ ### 3. Temporary Ban
96
+
97
+ **Community Impact**: A serious violation of community standards, including
98
+ sustained inappropriate behavior.
99
+
100
+ **Consequence**: A temporary ban from any sort of interaction or public
101
+ communication with the community for a specified period of time. No public or
102
+ private interaction with the people involved, including unsolicited interaction
103
+ with those enforcing the Code of Conduct, is allowed during this period.
104
+ Violating these terms may lead to a permanent ban.
105
+
106
+ ### 4. Permanent Ban
107
+
108
+ **Community Impact**: Demonstrating a pattern of violation of community
109
+ standards, including sustained inappropriate behavior, harassment of an
110
+ individual, or aggression toward or disparagement of classes of individuals.
111
+
112
+ **Consequence**: A permanent ban from any sort of public interaction within
113
+ the community.
114
+
115
+ ## Attribution
116
+
117
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118
+ version 2.0, available at
119
+ https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120
+
121
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct
122
+ enforcement ladder](https://github.com/mozilla/diversity).
123
+
124
+ [homepage]: https://www.contributor-covenant.org
125
+
126
+ For answers to common questions about this code of conduct, see the FAQ at
127
+ https://www.contributor-covenant.org/faq. Translations are available at
128
+ https://www.contributor-covenant.org/translations.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- advanced_ruby_command_handler (0.1.1)
4
+ advanced_ruby_command_handler (0.1.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,3 +1,8 @@
1
+
2
+ [![forthebadge](https://forthebadge.com/images/badges/made-with-ruby.svg)](https://forthebadge.com)
3
+
4
+ [![Les Laboratoires Ruby](https://invidget.switchblade.xyz/4P7XcmbDnt)](https://discord.gg/4P7XcmbDnt)
5
+
1
6
  # AdvancedRubyCommandHandler
2
7
  ## Installation
3
8
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "../../app/utils"
3
+ require_relative "../../utils"
4
4
 
5
5
  module Events
6
6
  def self.message(client)
@@ -13,12 +13,10 @@ module AdvancedRubyCommandHandler
13
13
  events << File.basename(file, ".rb")
14
14
  end
15
15
 
16
- Dir.entries("#{Dir.pwd}/lib/advanced_ruby_command_handler/defaults/events").each do |file|
17
- next if %w(. ..).include?(file)
18
-
16
+ Dir["#{File.dirname(__FILE__)}/defaults/events/*.rb"].each do |file|
19
17
  next if events.include?(File.basename(file, ".rb"))
20
18
 
21
- load "lib/advanced_ruby_command_handler/defaults/events/#{file}"
19
+ require file
22
20
 
23
21
  events << File.basename(file, ".rb")
24
22
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module AdvancedRubyCommandHandler
4
- VERSION = "0.1.2"
4
+ VERSION = "0.1.3"
5
5
  end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Events
4
+ def self.ready(client)
5
+ client.ready do
6
+ client.console_logger.info("Client ready!")
7
+ end
8
+ end
9
+ end
10
+
data/tests/index.rb CHANGED
@@ -2,5 +2,6 @@
2
2
 
3
3
  require_relative "../lib/advanced_ruby_command_handler"
4
4
 
5
+
5
6
  CommandHandler.new(:commands_dir => "tests/commands", :events_dir => "tests/events", :config_file => "tests/config.yml")
6
7
  .run
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: advanced_ruby_command_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - senchuu
@@ -17,14 +17,18 @@ executables: []
17
17
  extensions: []
18
18
  extra_rdoc_files: []
19
19
  files:
20
+ - ".github/workflows/ruby.yml"
20
21
  - ".gitignore"
21
22
  - ".rubocop.yml"
22
23
  - CHANGELOG.md
24
+ - CODE_OF_CONDUCT.md
23
25
  - Gemfile
24
26
  - Gemfile.lock
25
27
  - LICENSE.txt
26
28
  - README.md
27
29
  - Rakefile
30
+ - advanced_ruby_command_handler-0.1.1.gem
31
+ - advanced_ruby_command_handler-0.1.2.gem
28
32
  - advanced_ruby_command_handler.gemspec
29
33
  - bin/console
30
34
  - bin/setup
@@ -33,14 +37,15 @@ files:
33
37
  - lib/advanced_ruby_command_handler/app/client.rb
34
38
  - lib/advanced_ruby_command_handler/app/command.rb
35
39
  - lib/advanced_ruby_command_handler/app/command_handler.rb
40
+ - lib/advanced_ruby_command_handler/app/defaults/events/message.rb
41
+ - lib/advanced_ruby_command_handler/app/defaults/events/ready.rb
36
42
  - lib/advanced_ruby_command_handler/app/event_handler.rb
37
43
  - lib/advanced_ruby_command_handler/app/logger.rb
38
44
  - lib/advanced_ruby_command_handler/app/utils.rb
39
- - lib/advanced_ruby_command_handler/defaults/events/message.rb
40
- - lib/advanced_ruby_command_handler/defaults/events/ready.rb
41
45
  - lib/advanced_ruby_command_handler/version.rb
42
46
  - tests/commands/test/test.rb
43
47
  - tests/config.yml
48
+ - tests/events/ready.rb
44
49
  - tests/index.rb
45
50
  homepage: https://github.com/Senchuu/Advanced-Bot.rb
46
51
  licenses: