# Gemfile
# Web-application: DEAP/CUI/CPP a.k.a. DrTuborTax

source 'https://rubygems.org'

# TODO: Document each version constrained gem w/r/t why its version is constrained.

##############################################################################
# MVC framework
gem 'rails', '4.2.3'  # Full-stack web application framework.
                      # TODO: Latest version of Rails4 (4.2.7.1) has security patches
                      #       which need to be applied.

gem 'rake', '11.3.0'  # Rake is a Make-like program implemented in Ruby
gem 'rack', '1.6.8'   # constrained by later version conflict with ActionPack v4.2.3


# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]

# System Support Utilities
gem 'daemons'                # A toolkit to create and control daemons in different ways
gem 'dotenv-rails'           # Autoload dotenv in Rails.
gem 'smarter_csv'            # Ruby Gem for smarter importing of CSV Files (and CSV-like files),
                             # with lots of optional features, e.g. chunked processing for huge CSV files
gem 'activerecord-import'    # performs bulk inserts using ActiveRecord
#gem 'superlogger', '~> 0.2.1'      # Machine-readable logging for Rails
# Application Feature-set Extensions
gem 'pointless_feedback', '4.0.5'  # Simple Rails Engine to allow users to submit feedback
                                   # CONSTRAINED: because we make custom modifications to
                                   #              views and models to support external notifications.
#
gem 'hipchat'                      # Ruby library to interact with HipChat
gem 'paranoia', '~> 2.2'           # hides deleted data by setting a deleted_at field to the current time
gem 'require_all'                  # A wonderfully simple way to load your code
gem 'seed_dump'                    # {Seed Dumper for Rails}
gem 'sidekiq'                      # Simple, efficient background processing for Ruby
gem 'sidekiq-scheduler'            # Light weight job scheduling extension for Sidekiq
gem 'slack-notify'                 # Send notifications to a Slack channel
gem 'slacken'                      # Translate HTML sources to markup texts for slack
gem 'spreadsheet'                  # The Spreadsheet Library is designed to read and write Spreadsheet Documents

# Application/Web Server
gem 'puma' # Puma is a simple, fast, threaded, and highly concurrent HTTP 1.1 server for Ruby/Rack applications

# ORM for PostgreSQL database
gem 'pg', '~> 0.19'    # Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]

##############################################################################
# User Authentication and Authorization

gem 'hashie',         '~> 3.4.6'  # Your friendly neighborhood hash library.
                                  # NOTE: hashie is a dependency of omniauth.  The latest
                                  #       version causes a warning to appear on the console.
                                  #       pmniauth mainters are aware of the problem and are
                                  #       in the process of fixing it.

gem 'devise',         '~> 3.4.1'  # Flexible authentication solution for Rails with Warden
gem 'cancancan',      '~> 1.10'   # Simple authorization solution for Rails.
gem 'omniauth-saml'               # A generic SAML strategy for OmniAuth.


##############################################################################
# ID.me authentication and SAML handshaking

gem 'ruby-saml', '~> 1.4.0'  # SAML Ruby Tookit
gem 'memoist', '0.15.0'      # memoize methods invocation


##############################################################################
# Backgroup Job Support Utilities
gem 'activejob',                  '4.2.3'     # Job framework with pluggable queues.
gem 'sanitize_email'                          # Email Condom for your Ruby Server
gem 'turnout'                                 # To support maintenance mode


##############################################################################
# Model Support Utilities
gem 'auto_strip_attributes', '~> 2.0'   # Removes unnecessary whitespaces in attributes. Extension to ActiveRecord or ActiveModel.


##############################################################################
# View Support Utilities
gem 'haml-rails', '~> 0.5.3'  # let your Gemfile do the configuring
gem 'fml_forms',  '3.1.0'     # Read FML and create forms


# Javascript Support Utilities
gem 'browser-timezone-rails'                      # Sets the browser timezone within rails
gem 'jquery-datatables-rails',        '~> 3.4.0'  # jquery datatables for rails
gem 'jquery-rails',                   '~> 4.2.2'  # Use jQuery with Rails 3+
gem 'jquery-timepicker-addon-rails',  '~> 1.4.1'  # Use jquery-ui-timepicker-addon with Rails 3/4
gem 'jquery-ui-rails',                '6.0.1'     # jQuery UI packaged for the Rails asset pipeline
gem 'jquery_mask_rails',              '~> 0.1.0'

# pulling datetimepicker gem from rails-assets repo, as per readmne file:
# https://github.com/Envek/jquery-datetimepicker-rails
source 'https://rails-assets.org' do
  gem 'rails-assets-datetimepicker', '2.5.4'      # jQuery UI datepicker + timepicking functionality
end
gem 'momentjs-rails'                              # date formatter gem

gem 'therubyracer', '~> 0.12.1', platforms: :ruby # Embed the V8 JavaScript interpreter into Ruby
gem 'uglifier',                       '>= 1.3.0'  # Ruby wrapper for UglifyJS JavaScript compressor


# Stylesheet Support Utilities
gem 'compass'                           # A Real Stylesheet Framework
gem 'font-awesome-rails', '~> 4.7.0'    # Icon package
gem 'foundation-rails',   '~> 5.5.0'    # ZURB Foundation on Sass/Compass
gem 'sass-rails',         '~> 4.0.2'    # Sass adapter for the Rails asset pipeline.


# File/Data Format Support Utilities
gem 'jbuilder',           '~> 1.2'      # Create JSON structures via a Builder-style DSL
gem 'nokogiri',           '~> 1.6.0'    # Nokogiri (鋸) is an HTML, XML, SAX, and Reader parser
gem 'wicked_pdf',         '~> 0.11.0'   # PDF generator (from HTML) gem for Ruby on Rails
gem 'wkhtmltopdf-binary', '~> 0.9.9.3'  # Provides binaries for WKHTMLTOPDF project in an easily accessible package.


##############################################################################
# File Upload Support Utilities
gem 'carrierwave', '~>1.0'    # Ruby file upload library
gem 'mini_magick'             # Manipulate images with minimal use of memory via ImageMagick / GraphicsMagick


##############################################################################
# Web-services Support Utilities

gem "connect_vbms", '0.0.2'     # Connect to VBMS with ease
gem 'faraday'                   # HTTP/REST API client library.
gem 'httpi',        '~> 2.4.0'  # Common interface for Ruby's HTTP libraries
gem 'savon',        '~> 2.11.0' # To integrate with SOAP based web-services

#
##    The following gems are conditional based upon the RAILS_ENV
##    and/or the platform on which the application is running.
###
#######################################################################

group :doc do
  # bundle exec rake doc:rails generates the API under doc/api.
  gem 'sdoc', require: false  # rdoc html with javascript search index.
end


#######################################################################
group :development do
  gem 'annotate'          # Annotates Rails Models, routes, fixtures, and others based on the database schema.
  gem 'did_you_mean', '1.0.2'     # "Did you mean?" experience in Ruby
                                  # NOTE: The latest version is Ruby v2.4 specific. v1.0.2 is the
                                  #       last version that works with Ruby v2.3.3
#
  gem 'bullet'            # help to kill N+1 queries and unused eager loading.
  gem 'debug_me'          # A tool to print the labeled value of variables.
  gem "ffaker"            # Faster Faker, generates dummy data.
  gem 'launchy'           # Launchy is helper class for launching cross-platform applications in a fire and forget manner.
  gem 'letter_opener'     # Preview mail in browser instead of sending.
  gem 'libxml-ruby'       # Ruby Bindings for LibXML2
#
  gem 'rainbow', '2.1.0'  # Colorize printed text on ANSI terminals
                          # NOTE: This gem is a dependency of the static code analyzers.
                          #       Its latest versions caused problem in the Docker VM.  This
                          #       version (2.1.0) was able to be loaded without error.
#
  gem 'guard'             # Guard keeps an eye on your file modifications
  gem 'guard-brakeman'    # Guard gem for Brakeman
  gem 'guard-puma'        # Restart puma when files change
  gem 'guard-rubocop'     # Guard gem for rubocop
  gem 'guard-rspec'       # Guard gem for RSpec
  gem 'guard-rubycritic'  # Guard gem for rubycritic
#
  gem 'brakeman',             require: false  # Security vulnerability scanner for Ruby on Rails.
  gem 'bundler-audit',        require: false  # Patch-level verification for Bundler
  gem 'rails_best_practices', require: false  # a code metric tool for rails codes.
  gem 'rubocop',              require: false  # Automatic Ruby code style checking tool.
  gem 'rubocop-rspec',        require: false  # Code style checking for RSpec files
  gem 'rubycritic',           require: false  # Ruby static code analyzer.

#
# NOTE: graphviz is required by rails-erd.
#       On a Mac do:  brew install graphviz
#       On other platforms use their typical package manager e.g. yum or apt-get
  gem 'rails-erd',            require: false  # Entity-relationship diagram for your Rails models.
  gem 'cli_helper',           require: false  # An encapsulation of an integration of slop, nenv, inifile and configatron.
  gem 'tty-table',            require: false  # A flexible and intuitive table generator

end # group :development do

#######################################################################
group :development, :test do
  gem 'awesome_print'           # Pretty print Ruby objects with proper indentation and colors
  gem 'database_cleaner'        # Strategies for cleaning databases.  Can be used to ensure a clean state for testing.
  gem 'quiet_assets'            # Turns off Rails asset pipeline log.
  gem 'qunit-rails'             # QUnit for Rails.
  gem 'rspec-rails', '~> 3.0.0' # rspec-rails-3.0.2
#
# Used in test/stress/jmeter*
# Requires the Apache jMeter system
# On Mac: brew install jmeter
# On other platforms use their typical package manager e.g. yum or apt-get
  gem 'ruby-jmeter',            require: false  # Ruby based DSL for writing JMeter test plans
  gem 'descriptive_statistics', require: false  # Descriptive Statistics
  gem 'newrelic_rpm'                            # New Relic Ruby Agent
  gem 'newrelic-faraday'                        # Faraday instrumentation for Newrelic.
  gem 'newrelic-redis'                          # Redis instrumentation for Newrelic.
#
  gem 'better_errors'           # Better error page for Rails and other Rack apps
  gem 'binding_of_caller'       # Retrieve the binding of a method's caller. Can also retrieve bindings even further up the stack.
#
  gem 'pry'                     # An IRB alternative and runtime developer console
  gem 'pry-remote'              # Allows remote usage of pry. Helpful for debugging on servers like puma.
  gem 'pry-rails'               # Use Pry as your rails console
  gem 'pry-byebug'              # Fast debugging with Pry.
  gem 'byebug'                  # Ruby 2.0 fast debugger - base + CLI
#
  gem 'capybara'  # Capybara aims to simplify the process of integration testing Rack applications, such as Rails, Sinatra or Merb

# NOTE: This gem causes problems on non-Mac workstations.  Also causes a ping-pong effect with our checked in
#       Gemfile.lock file between commits from Mac workstations and commits from lesser desired workstations.
#??? gem 'capybara-webkit' if 'Darwin' == ENV['_system_type']  # Headless Webkit driver for Capybara
#
  gem 'simplecov',      require: false   # Code coverage for Ruby 1.9+ with a powerful configuration library and automatic merging of coverage across test suites
  gem 'simplecov-json', require: false   # JSON formatter for SimpleCov code coverage tool for ruby 1.9+
  gem 'simplecov-rcov', require: false   # Rcov style formatter for SimpleCov
#
  gem 'irbtools',       require: false   # Irbtools happy IRB.
  gem 'irbtools-more',  require: false   # irbtools-more adds bond and looksee to IRB.
#
  gem 'terminal-size',  require: false   # A tiny gem to accomplish a simple task: Determining the terminal size.
  gem 'word_wrapper',   require: false   # Pure ruby word wrapping
#
  gem 'factory_girl_rails',   require: false  # factory_girl_rails provides integration between factory_girl and rails 3
  gem 'rspec-sidekiq',        require: false  # RSpec for Sidekiq
  gem 'shoulda-matchers',     require: false  # RSpec one-liners that test common Rails functionality.
  gem 'test_after_commit',    require: false  # makes after_commit callbacks testable in Rails 3+ with transactional_fixtures
  gem 'webmock',              require: false  # Library for stubbing HTTP requests in Ruby.
#
end # group :development, :test do


#######################################################################
group :test do
end


#######################################################################
group :production do
  gem 'rails_12factor', '~> 0.0.3'  # Following best practices from http://12factor.net run a maintainable, clean, and scalable app on Rails
end
