summon_bot 1.0.4 → 1.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 5d5b98f06bcb7e7d315f6dc42f9bd2cd78572f64
4
- data.tar.gz: 75459c00d8fb566ccf74182efe6af6bbbfc0885e
2
+ SHA256:
3
+ metadata.gz: 3d74519c5fe87bf3570c50064e1c4113196d1d8d599c7d301f49b6ae93b297bc
4
+ data.tar.gz: 778bd7621e021432d6675f89e055812512125b16c4b935e81699704aed62bb0c
5
5
  SHA512:
6
- metadata.gz: 31d9683bad9ef012f4c7b3671a51abcb13ef5b54b4fd4bf40a9c0b9a8522552b1335782bacd2f73d75079cec3ab1e1288f9219cc94e0b221d4b781f55f0d92b6
7
- data.tar.gz: 6d69a1c25d0991ed92442d795297394ba2add4b51cb9bb3aa7f8c8bcc75756e5edbf7bd1473a8d7aeb397b421f1eeabeecb85f7ad4dbdefc8ea06271ef8aafc8
6
+ metadata.gz: d2cd8cac7ae7ae2ad8c483c8fd97bfba679e402b48b9cc72fca37cf98e5128fd789550a217cdcb5346ec460bd1115745198ad76660f98d3a3bb53d2d33edfa99
7
+ data.tar.gz: 1bf082a3c64f2fb92414cdbca9b32c5734cae88523a1dbd7b44a1341535f9698ca830e186dd653b5e7fc944eb36b594d1652263c54dc471e57a60775c14039fc
data/README.md CHANGED
@@ -51,7 +51,7 @@ SummonBot::Slack.instance_eval { @notifier_class = SummonBot::DummyNotifier }
51
51
  ## Test command.
52
52
 
53
53
  ```
54
- RAILS_ENV=test bers
54
+ RAILS_ENV=test bundle exec rspec
55
55
  ```
56
56
 
57
57
  ## License
@@ -2,12 +2,13 @@ require 'rails'
2
2
  require 'slack-notifier'
3
3
 
4
4
  module SummonBot
5
+ class EnvNotFoundError < StandardError; end
5
6
  class Slack
6
7
  PREFIX = 'SUMMON_BOT_SLACK__'
7
8
  class << self
8
9
  def method_missing(name)
9
10
  bot_names = ENV.keys.select { |k, _| k.include? PREFIX }.map { |k| k.gsub(Regexp.new("^#{PREFIX}"), '').downcase.to_sym }
10
- fail NoMethodError unless bot_names.include? name
11
+ fail EnvNotFoundError, "Not found ENV: #{PREFIX}#{name.upcase}. Please check/set ENV." unless bot_names.include? name
11
12
  bot = notifier_class.new(ENV["#{PREFIX}#{name.upcase}"])
12
13
 
13
14
  def bot.speak(message, options = {})
@@ -1,3 +1,3 @@
1
1
  module SummonBot
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: summon_bot
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - nyaahara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-01 00:00:00.000000000 Z
11
+ date: 2020-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -101,8 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
101
  - !ruby/object:Gem::Version
102
102
  version: '0'
103
103
  requirements: []
104
- rubyforge_project:
105
- rubygems_version: 2.6.13
104
+ rubygems_version: 3.0.3
106
105
  signing_key:
107
106
  specification_version: 4
108
107
  summary: SummonBot can summon slack bot only define your environment.