Sha256: c47bc59dc6ecdb67349aa20e8764afa1db04e16e7d10096b697923e8dfd8e49a

Contents?: true

Size: 540 Bytes

Versions: 8

Compression:

Stored size: 540 Bytes

Contents

module Pah
  module Templates
    class Rollbar < Pah::Template
      def call
        system 'bundle exec rails generate rollbar -q'

        search = <<HEREDOC
  # Here we'll disable in 'test':
  if Rails.env.test?
    config.enabled = false
  end
HEREDOC

        replace = '  config.enabled = Rails.env.production? || Rails.env.staging?'

        gsub_file 'config/initializers/rollbar.rb', search, replace

        git add: 'config/initializers/rollbar.rb'
        git_commit 'Add rollbar initialize file.'
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pah-0.0.28 lib/pah/templates/rollbar.rb
pah-0.0.27 lib/pah/templates/rollbar.rb
pah-0.0.26 lib/pah/templates/rollbar.rb
pah-0.0.25 lib/pah/templates/rollbar.rb
pah-0.0.24 lib/pah/templates/rollbar.rb
pah-0.0.23 lib/pah/templates/rollbar.rb
pah-0.0.22 lib/pah/templates/rollbar.rb
pah-0.0.21 lib/pah/templates/rollbar.rb