diff --git a/.gitignore b/.gitignore index a320f7b..799118b 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,6 @@ # Ignore .DS_store file .DS_Store + +# Ignore the .env file +/.env diff --git a/Gemfile b/Gemfile index b7c8aca..b4b3209 100644 --- a/Gemfile +++ b/Gemfile @@ -19,4 +19,6 @@ gem "tzinfo-data", platforms: [:mswin, :mingw] gem "capybara" gem "poltergeist" -gem "mini_magick" \ No newline at end of file +gem "mini_magick" + +gem "dotenv" \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock index 57f2186..38df02d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -34,6 +34,7 @@ GEM sass (>= 3.3.0, < 3.5) compass-import-once (1.0.5) sass (>= 3.2, < 3.5) + dotenv (0.9.0) em-websocket (0.5.1) eventmachine (>= 0.12.9) http_parser.rb (~> 0.6.0) @@ -167,6 +168,7 @@ PLATFORMS DEPENDENCIES capybara + dotenv middleman (~> 3.3.10) middleman-deploy (~> 1.0) middleman-google-analytics diff --git a/config.rb b/config.rb index e0711dc..c52562b 100644 --- a/config.rb +++ b/config.rb @@ -1,5 +1,8 @@ require 'lib/screenshot_generator' require 'ostruct' +require 'dotenv' +Dotenv.load + ### # Compass ### @@ -77,7 +80,7 @@ end activate :google_analytics do |ga| # Property ID (default = nil) - ga.tracking_id = 'UA-60794054-1' + ga.tracking_id = ENV['ANALYTICS_ID'] # Tracking in development environment (default = true) ga.development = false