mic_monitor_gem 0.3.5 → 0.3.6

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
2
  SHA256:
3
- metadata.gz: 11a25f5f2dbe7a6556914666bf9f9edbac1d76da4b12d259f2612aa0e68a0961
4
- data.tar.gz: fa3fbae548734598b7c446184e311457a2c6c568ade45543d7511b30ec658cb8
3
+ metadata.gz: e9e0473ec1963ee4e599db92c0a8b435ff20fd7752cca355ab230dbd593e6a28
4
+ data.tar.gz: 94eb6415ee30dee2f8685d7540974f1e9f41b7e00e42f85f0ae55af94c6b7502
5
5
  SHA512:
6
- metadata.gz: b4287e81bd8b02ad3c23cea4b5e2ba66cd554b5aa5438fa975015a8e40991b84e9c62bc553cc83693edbc3b1ce2d4f1fcdec5aac56d9aacbdeae5e4100673a91
7
- data.tar.gz: 51f68a53bffc2ed787764eca8d1cb1cde59e727d9e9579c452dd59509a261115f527f965fcea6a880515df33b2a0e94eabf31d113eaef528a4cb8cf56c9d195b
6
+ metadata.gz: 999e146f3a0e816849c235b94cd991cbc061d978353b0d37bc131236035bfd887433c7437185e34c26e9d53821654b51e211702905ab205be1b5c85d7a413706
7
+ data.tar.gz: 8e75865a6a733ef0b2a257a55f6eba895e6f48956fd030029b70c47c7eff24f95794710a580cb3c0cb4c50c7b80d3ec3cba0a27d377a0f84a2a424c8b478c072
@@ -3,26 +3,8 @@ module MicMonitorGem
3
3
  class InstallGenerator < Rails::Generators::Base
4
4
  source_root File.expand_path('templates', __dir__)
5
5
 
6
- GEM_PATH = "#{Rails.root}/config/initializers/mic_monitor_gem.rb"
7
-
8
6
  def create_file_mic_monitor_gem
9
- template 'mic_monitor_gem.rb', GEM_PATH
10
- end
11
-
12
- def add_config_email
13
- append_to_file GEM_PATH do
14
- <<-'RUBY'
15
- if Rails.env.production?
16
- Rails.application.config.middleware.use ExceptionNotification::Rack,
17
- email: {
18
- deliver_with: :deliver, # Rails >= 4.2.1 do not need this option since it defaults to :deliver_now
19
- email_prefix: ENV['EMAIL_PREFIX'],
20
- sender_address: ENV['SENDER_ADDRESS'],
21
- exception_recipients: ENV['EXCEPTION_RECINPIENTS']
22
- }
23
- end
24
- RUBY
25
- end
7
+ template 'mic_monitor_gem.rb', 'config/initializers/mic_monitor_gem.rb'
26
8
  end
27
9
  end
28
10
  end
@@ -0,0 +1,9 @@
1
+ if Rails.env.production?
2
+ Rails.application.config.middleware.use ExceptionNotification::Rack,
3
+ email: {
4
+ deliver_with: :deliver, # Rails >= 4.2.1 do not need this option since it defaults to :deliver_now
5
+ email_prefix: ENV['EMAIL_PREFIX'],
6
+ sender_address: ENV['SENDER_ADDRESS'],
7
+ exception_recipients: ENV['EXCEPTION_RECINPIENTS']
8
+ }
9
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MicMonitorGem
4
- VERSION = "0.3.5"
4
+ VERSION = "0.3.6"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mic_monitor_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.5
4
+ version: 0.3.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - mic-locnv
@@ -21,6 +21,7 @@ files:
21
21
  - app/controller/mic_monitor_gem/ping_controller.rb
22
22
  - config/routes.rb
23
23
  - lib/generators/mic_monitor_gem/install_generator.rb
24
+ - lib/generators/mic_monitor_gem/template/mic_monitor_gem.rb
24
25
  - lib/mic_monitor_gem.rb
25
26
  - lib/mic_monitor_gem/engine.rb
26
27
  - lib/mic_monitor_gem/version.rb