Skip to content

Commit

Permalink
KBP-128 #time 20m - Integrate rollbar GEM
Browse files Browse the repository at this point in the history
  • Loading branch information
hamdibayhan committed Oct 6, 2017
1 parent 08199a0 commit 6142c7a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 2 deletions.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@ cybele project_name
When the initialization is completed, there will be some required settings.

* Set .env.local variables
* Set access_token in config/initializers/rollbar.rb
* Set ENV['ROLLBAR_ACCESS_TOKEN'] for Rollbar.
* If Sidekiq will be use, you must open sidekiq option in config/initializers/rollbar.rb like the following:
```ruby
config.use_sidekiq 'queue' => 'default'
```
* If you don't want to use Rollbar in development environment, you can disable for development environment in
in config/initializers/rollbar.rb
* Set default values for is_active, time_zone variable using in User and Admin model migrations db/migrate/*.rb
* Change username and password in config/settings.yml
* In public folder run this command ln -s ../VERSION.txt VERSION.txt
Expand Down
4 changes: 4 additions & 0 deletions lib/cybele/app_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ def fill_settings_yml
prepend_file 'config/settings.yml', config
end

def generate_rollbar
generate 'rollbar'
end

private

def configure_environment(rails_env, config)
Expand Down
5 changes: 5 additions & 0 deletions lib/cybele/generators/app_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,11 @@ def fill_settings_yml
build :fill_settings_yml
end

def setup_rollbar
say 'Generate rollbar', :green
build :generate_rollbar
end

def goodbye
say 'Congratulations! That\'s all...', :green
end
Expand Down
5 changes: 4 additions & 1 deletion templates/cybele_Gemfile.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@
gem 'recipient_interceptor', '~> 0.1.2'

# RailsConfig helps you easily manage environment specific Rails settings in an easy and usable manner
gem 'config', '~> 1.5'
gem 'config', '~> 1.5'

# Rollbar is an error tracking service.
gem 'rollbar', '~> 2.15', '>= 2.15.4'

0 comments on commit 6142c7a

Please sign in to comment.