# 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.10'  # Full-stack web application framework.
                      # TODO: Latest version of Rails4 (4.2.10) has security patches
                      #       which need to be applied.

gem 'rake'  # Rake is a Make-like program implemented in Ruby
gem 'rack'  # a modular Ruby webserver interface


# 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 'hashdiff'           # HashDiff is a diff lib to compute the smallest difference between two hashes.
gem 'hashie'             # Your friendly neighborhood hash library.
gem 'paper_trail'        # Track changes to your models.
gem 'paranoia'           # 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
gem 'nested_form_fields' # Helps with creating forms with nested has_many associations
gem 'simple_form'        # Gives extra form component display options
gem 'roo', '2.7.1'       # Provides an interface to spreadsheets of several sorts: https://github.com/roo-rb/roo

# 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.21.0'  # Pg is the Ruby interface to the {PostgreSQL RDBMS}[http://www.postgresql.org/]
                      # CONSTRAINED BY: ActiveRecord 4.2.10

# Redis for caching
gem 'redis-rails'

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

gem 'devise'                      # Flexible authentication solution for Rails with Warden
gem 'cancancan'                   # 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'               # memoize methods invocation


##############################################################################
# Backgroup Job Support Utilities
gem 'activejob'       # 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' # Removes unnecessary whitespaces in attributes. Extension to ActiveRecord or ActiveModel.


##############################################################################
# View Support Utilities

# haml-rails is constrained by rails 4.2.6 and sidekiq
gem 'haml-rails', '~> 0.5.3'    # let your Gemfile do the configuring

# https://github.com/adhocteam/fml.git
# version 3.1.0 is the lates of AdHoc's fml_forms gem
# which is no longer published via rubygems.org
gem 'fml_forms', '3.1.0' # Read FML and create forms; Used by CUI feature set evaluations

# 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'  # A Rails version of jQuery Mask Plugin that make masks on form fields and HTML elements easy

# 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'                  # ZURB Foundation on Sass/Compass
gem 'sass-rails',         '~> 5.0.0'    # Sass adapter for the Rails asset pipeline.
gem 'modernizr-rails'


# File/Data Format Support Utilities
gem 'jbuilder',           '~> 1.2'      # Create JSON structures via a Builder-style DSL
gem 'nokogiri'                          # 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'             # Ruby file upload library
gem 'mini_magick'             # Manipulate images with minimal use of memory via ImageMagick / GraphicsMagick


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

# https://github.com/department-of-veterans-affairs/connect_vbms
# Github shows the latest version of connect_vbms to be 1.0.0
# 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 '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 '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

  gem 'web-console' #Web Console is a debugging tool for your Ruby on Rails applications.
  gem 'rvt' #RVT is a powerful tool. It allows you to execute arbitrary code on the server, so you should be very careful, who you give access to it.

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'       # 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-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_bot_rails",    require: false  # factory_bot_rails provides integration between factory_bot 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
  # SMELL: This gem may not be needed when centralized logging is added
  #        to the architecture.
  gem 'rails_12factor'  # Following best practices from http://12factor.net run a maintainable, clean, and scalable app on Rails
end
