Sha256: 378fcff7050f8a4f4e5eea7e752c7b8d0436246cfc1484688275a022b295f5f3

Contents?: true

Size: 365 Bytes

Versions: 8

Compression:

Stored size: 365 Bytes

Contents

if Rails.env.production?
  require 'segment/analytics'

  Analytics = Segment::Analytics.new(
    write_key: ENV['SEGMENT_ANALYTICS_RUBY_KEY'],
    on_error:  proc { |_status, msg| Rails.logger.info msg },
  )
else
  Analytics = Struct.new('Analytics') do
    def self.track(_segment_attributes)
    end
    def self.identify(_segment_attributes)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
voyage-1.44.0.14 lib/voyage/templates/analytics_ruby_initializer.rb
voyage-1.44.0.13 lib/voyage/templates/analytics_ruby_initializer.rb
voyage-1.44.0.11 lib/voyage/templates/analytics_ruby_initializer.rb
voyage-1.44.0.12 lib/voyage/templates/analytics_ruby_initializer.rb
voyage-1.44.0.10 lib/voyage/templates/analytics_ruby_initializer.rb
voyage-1.44.0.9 lib/voyage/templates/analytics_ruby_initializer.rb
voyage-1.44.0.8 lib/voyage/templates/analytics_ruby_initializer.rb
voyage-1.44.0.7 lib/voyage/templates/analytics_ruby_initializer.rb