Sha256: 72ae063b8b06b8c2a85e7c221a0ae25ccb95292ac901c98bad12c28e20e5ffd5

Contents?: true

Size: 928 Bytes

Versions: 12

Compression:

Stored size: 928 Bytes

Contents

require 'pantograph/boolean'

require_relative 'analytics/analytics_session'

module PantographCore
  ROOT = Pathname.new(File.expand_path('../../..', __FILE__))
  Boolean = Pantograph::Boolean

  # Session is used to report usage metrics.
  # If you opt out, we will not send anything.
  # You can confirm this by observing how we use the environment variable: PANTOGRAPH_OPT_OUT_USAGE
  # Specifically, in AnalyticsSession.finalize_session
  # Learn more at https://johnknapprs.github.io/pantograph/#metrics
  def self.session
    @session ||= AnalyticsSession.new
  end

  def self.reset_session
    @session = nil
  end

  # A directory that's being used to user-wide pantograph configs
  # This directory is also used for the bundled pantograph
  def self.pantograph_user_dir
    path = File.expand_path(File.join(Dir.home, ".pantograph"))
    FileUtils.mkdir_p(path) unless File.directory?(path)
    return path
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pantograph-0.1.20 pantograph_core/lib/pantograph_core/module.rb
pantograph-0.1.19 pantograph_core/lib/pantograph_core/module.rb
pantograph-0.1.17 pantograph_core/lib/pantograph_core/module.rb
pantograph-0.1.16 pantograph_core/lib/pantograph_core/module.rb
pantograph-0.1.15 pantograph_core/lib/pantograph_core/module.rb
pantograph-0.1.14 pantograph_core/lib/pantograph_core/module.rb
pantograph-0.1.13 pantograph_core/lib/pantograph_core/module.rb
pantograph-0.1.12 pantograph_core/lib/pantograph_core/module.rb
pantograph-0.1.10 pantograph_core/lib/pantograph_core/module.rb
pantograph-0.1.8 pantograph_core/lib/pantograph_core/module.rb
pantograph-0.1.7 pantograph_core/lib/pantograph_core/module.rb
pantograph-0.1.6 pantograph_core/lib/pantograph_core/module.rb