protonbot 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CORE_PLUGIN.md +0 -2
- data/README.md +1 -1
- data/lib/protonbot/log.rb +7 -4
- data/lib/protonbot/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a30a48ec608d31c88360a74c7919c9113fcdc73
|
4
|
+
data.tar.gz: 534d6aafe5cf60fedff4555b9864182c8621b48f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9d4eb5ce92f4a200c3c8006e05a7df37a57d77dcc3d073bab19c3871195d00472f46e46d2839271c78500ede57a866cfb27090ee12d0821dcc4d46e6e54c3035
|
7
|
+
data.tar.gz: 43fdca12aee2507e47a2691beb04a15ed77bd76a31f4ae56a692157c8d51757b56e7c8cbad6b2349a1e54116f23cba00c5a5e4d9c323523117473eb2733bdac5
|
data/CORE_PLUGIN.md
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
Finish this, write other stuff, allow requesting multiple permissions, fix YARD, and after - publish gem.
|
2
|
-
|
3
1
|
# Core Plugin
|
4
2
|
Core plugin implements features which are essential for bot to exist: hooks (including ping-response), command engine, permission system, help system etc.
|
5
3
|
|
data/README.md
CHANGED
@@ -68,7 +68,7 @@ After you have started your bot, you need to gain permissions.
|
|
68
68
|
|
69
69
|
After checking out the repo, run `bundler` to install dependencies. `bottest` directory is .gitignored, so you can make test bot there.
|
70
70
|
|
71
|
-
To install this gem onto your local machine, run `bundler exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundler exec rake release
|
71
|
+
To install this gem onto your local machine, run `bundler exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundler exec rake release\[origin\]`, 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).
|
72
72
|
|
73
73
|
## Contributing
|
74
74
|
|
data/lib/protonbot/log.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# @!attribute [rw] logging
|
5
5
|
# @return [Bool] If false, does not write messages.
|
6
6
|
class ProtonBot::Log
|
7
|
-
attr_accessor :levels, :logging
|
7
|
+
attr_accessor :levels, :logging, :log_info
|
8
8
|
|
9
9
|
def initialize
|
10
10
|
@pastel = Pastel.new
|
@@ -17,6 +17,7 @@ class ProtonBot::Log
|
|
17
17
|
@levels = DEFAULT_SCHEME
|
18
18
|
|
19
19
|
@logging = true
|
20
|
+
@log_info = false
|
20
21
|
|
21
22
|
@stop = false
|
22
23
|
|
@@ -35,9 +36,11 @@ class ProtonBot::Log
|
|
35
36
|
# @param msg [String]
|
36
37
|
# @param nam [String] Name
|
37
38
|
def info(msg, nam = 'log')
|
38
|
-
|
39
|
-
|
40
|
-
|
39
|
+
if @log_info
|
40
|
+
dat = gsub(msg.to_s, :info, nam)
|
41
|
+
@queue << dat
|
42
|
+
@pastel.strip(dat)
|
43
|
+
end
|
41
44
|
end
|
42
45
|
|
43
46
|
# @param msg [String]
|
data/lib/protonbot/version.rb
CHANGED