source 'https://rubygems.org'

# Padrino currently not supports Ruby 3.3 yet
ruby '>= 3.3'

# Server requirements
gem 'puma' # or thin

# Optional JSON codec (faster performance)
# gem 'oj'

# Project requirements
gem 'rake'

# Component requirements

# Note if upgrade to use Rails 7.1,  the following code change is rerquired 
#  ActiveRecord::Base.default_timezone= is deprecated and will be removed in Rails 7.1.
#  Use `ActiveRecord.default_timezone=` instead.
# For now, stay with ActiveReocord 7.0

# Warning 7.1.3.4 with this error
#  DEPRECATION WARNING: ActiveRecord::Base.schema_format is deprecated and will be removed in Rails 7.1.
#  Use `ActiveRecord.schema_format` instead.
# NoMethodError: undefined method `schema_format' for ActiveRecord::Base:Class (NoMethodError)

# gem 'activerecord', '~> 7.0.8', :require => 'active_record' # working
# gem 'activerecord', '~> 7.2.2', :require => 'active_record' # working before
gem 'activerecord', '~> 8.1.1', :require => 'active_record' # working before

# tried to enhance record creating on test files for parallel build
gem 'activerecord-import'

# gem 'sqlite3', '~> 1.7' # note: Sqlite3 v2 was released on 2024-05
gem 'sqlite3'

# NOTE: sqlite3 v2 gem is out (https://github.com/sparklemotion/sqlite3-ruby/blob/main/CHANGELOG.md)
# From BuildWise's perspective, a working database  (OS install Sqlite3 DB first) via a Ruby Gem is fine.
# Sqlite3 is from demo mode. You may go stright to use MySQL, in this case, comment out the line 22       

# If production, uncomment below
if RUBY_PLATFORM.include?("darwin") || RUBY_PLATFORM.include?("linux") || ENV["RACK_ENV"] == "production" 
  gem 'mysql2'
end


# Test requirements
gem 'rspec', :group => 'test'
gem 'rack-test', :require => 'rack/test', :group => 'test'

# Padrino Stable Gem
# gem 'i18n' #, '~> 0.9' # v1 does not work padrino-heper-0.14


gem 'padrino', '~> 0.16.0'
# gem "sinatra", '~> 3.2.0'
# gem "rack", '~> 2.2.8'
 
# Or Padrino Edge
# gem 'padrino', :github => 'padrino/padrino-framework'

## NOTE
# Padrino 0.15.3 does not work with Ruby 3.3 version yet. 
#   More info: https://github.com/padrino/padrino-framework/issues/2288

# Or Individual Gems
# %w(core support gen helpers cache mailer admin).each do |g|
#   gem 'padrino-' + g, '0.14.2'
# end

gem 'padrino-cookies'
gem "tilt"

gem "rolify"

gem "bcrypt" # minw32 does not work on windows
gem "builder", "~>3.2.3"
# gem "slack-notifier", "~>2.3.2" # working
gem "slack-notifier", "~>2.4.0"
gem "nokogiri"
gem "coderay"
gem "childprocess", ">3.0"
gem "r18n-core", ">3.2"
gem "ci_reporter"
gem "ci_reporter_rspec"
gem "httparty", "~>0.16.2"
gem "archive-zip", "~>0.12.0"
# gem "rspec_junit_formatter", "~>0.4.1" # working
gem "rspec_junit_formatter", "~>0.6.0"
gem "httpclient"

gem 'roo'
gem 'spreadsheet'
# gem 'httpclient'
# gem 'rest-client' # for webhook notification
gem 'tp_link'

if RUBY_PLATFORM =~ /mingw/
  gem 'ffi'
end

if RUBY_VERSION.to_i > 2
  gem 'rexml'
end


# When running tests in sequential for BuildWise server starting with bundle
#  you need to add all the test libraries here

gem "selenium-webdriver"

# appium tests
gem "appium_lib" 

# syntax frameworks
gem "cucumber"

# test data utilities
gem "faker"
gem "ffaker"

# used ini load_test_helper 
gem "multipart_body"

# for performance testing
gem "mechanize" 
gem "rest-client"

# for calling deployment to remote machine
gem "net-ssh"

gem "ostruct" # mandatory from ruby 3.5 

# and more ...

gem "bigdecimal", "~> 3.3.1"

# Don't use Rack 3 yet because Sinatra 3 depends rack ~>2.2
