Skip to content

Commit 6142c7a

Browse files
author
hamdibayhan
committed
KBP-128 #time 20m - Integrate rollbar GEM
1 parent 08199a0 commit 6142c7a

File tree

4 files changed

+20
-2
lines changed

4 files changed

+20
-2
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ cybele project_name
2828
When the initialization is completed, there will be some required settings.
2929

3030
* Set .env.local variables
31-
* Set access_token in config/initializers/rollbar.rb
31+
* Set ENV['ROLLBAR_ACCESS_TOKEN'] for Rollbar.
32+
* If Sidekiq will be use, you must open sidekiq option in config/initializers/rollbar.rb like the following:
33+
```ruby
34+
config.use_sidekiq 'queue' => 'default'
35+
```
36+
* If you don't want to use Rollbar in development environment, you can disable for development environment in
37+
in config/initializers/rollbar.rb
3238
* Set default values for is_active, time_zone variable using in User and Admin model migrations db/migrate/*.rb
3339
* Change username and password in config/settings.yml
3440
* In public folder run this command ln -s ../VERSION.txt VERSION.txt

lib/cybele/app_builder.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ def fill_settings_yml
9494
prepend_file 'config/settings.yml', config
9595
end
9696

97+
def generate_rollbar
98+
generate 'rollbar'
99+
end
100+
97101
private
98102

99103
def configure_environment(rails_env, config)

lib/cybele/generators/app_generator.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,11 @@ def fill_settings_yml
120120
build :fill_settings_yml
121121
end
122122

123+
def setup_rollbar
124+
say 'Generate rollbar', :green
125+
build :generate_rollbar
126+
end
127+
123128
def goodbye
124129
say 'Congratulations! That\'s all...', :green
125130
end

templates/cybele_Gemfile.erb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@
33
gem 'recipient_interceptor', '~> 0.1.2'
44

55
# RailsConfig helps you easily manage environment specific Rails settings in an easy and usable manner
6-
gem 'config', '~> 1.5'
6+
gem 'config', '~> 1.5'
7+
8+
# Rollbar is an error tracking service.
9+
gem 'rollbar', '~> 2.15', '>= 2.15.4'

0 commit comments

Comments
 (0)