Skip to content

Commit

Permalink
Merge pull request #312 from NREL/ruby-integration-tests
Browse files Browse the repository at this point in the history
Rails upgrade, Ember.js upgrade, Bootstrap upgrade, and test suite unification
  • Loading branch information
GUI authored Dec 8, 2016
2 parents 568f4b1 + b026e42 commit e9ccb78
Show file tree
Hide file tree
Showing 1,044 changed files with 40,630 additions and 51,444 deletions.
6 changes: 2 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,8 @@
/build/package/verify/.rnd
/deploy/.env
/log/*
/test/node_modules
/test/config/.overrides.yml
/test/log/*
/test/tmp/*
/test/reports
/test/tmp
/ci_cache
/vendor
/website/build
Expand Down
182 changes: 182 additions & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
AllCops:
TargetRubyVersion: 2.3
Exclude:
- bin/**/*
- tmp/**/*
- vendor/**/*

Rails:
Enabled: true

Lint/AssignmentInCondition:
AllowSafeAssignment: false

Lint/LiteralInInterpolation:
Enabled: false

Lint/UnusedBlockArgument:
Enabled: false

Lint/UnusedMethodArgument:
Enabled: false

Metrics/AbcSize:
Enabled: false

Metrics/BlockLength:
Enabled: false

Metrics/BlockNesting:
Enabled: false

Metrics/ClassLength:
Enabled: false

Metrics/CyclomaticComplexity:
Enabled: false

Metrics/LineLength:
Enabled: false

Metrics/MethodLength:
Enabled: false

Metrics/ModuleLength:
Enabled: false

Metrics/PerceivedComplexity:
Enabled: false

Performance/RedundantMerge:
Enabled: false

Style/AlignHash:
Enabled: false

Style/AlignParameters:
Enabled: false

Style/AsciiComments:
Enabled: false

Style/BracesAroundHashParameters:
Enabled: false

Style/ClassAndModuleChildren:
Enabled: false

Style/ClassCheck:
Enabled: false

Style/CollectionMethods:
PreferredMethods:
find: 'detect'

Style/ConditionalAssignment:
Enabled: false

Style/Documentation:
Enabled: false

Style/EachWithObject:
Enabled: false

Style/EmptyElse:
EnforcedStyle: empty

Style/EmptyMethod:
Enabled: false

Style/Encoding:
Enabled: false

Style/FrozenStringLiteralComment:
Enabled: false

Style/GuardClause:
Enabled: false

Style/HashSyntax:
EnforcedStyle: hash_rockets

Style/IfInsideElse:
Enabled: false

Style/IfUnlessModifier:
Enabled: false

Style/IndentArray:
EnforcedStyle: consistent

Style/IndentHash:
EnforcedStyle: consistent

Style/Lambda:
Enabled: false

Style/NegatedIf:
Enabled: false

Style/Next:
Enabled: false

Style/NumericLiterals:
Enabled: false

Style/NumericPredicate:
Enabled: false

Style/OneLineConditional:
Enabled: false

Style/ParenthesesAroundCondition:
Enabled: false

Style/RaiseArgs:
Enabled: false

Style/RedundantSelf:
Enabled: false

Style/RegexpLiteral:
Enabled: false

Style/SignalException:
Enabled: false

Style/SpaceAroundKeyword:
Enabled: false

Style/StringLiterals:
Enabled: false

Style/StringLiteralsInInterpolation:
Enabled: false

Style/SymbolProc:
Enabled: false

Style/TrailingCommaInArguments:
EnforcedStyleForMultiline: comma

Style/TrailingCommaInLiteral:
EnforcedStyleForMultiline: comma

Style/WhileUntilModifier:
Enabled: false

Style/WordArray:
Enabled: false

Rails/Delegate:
Enabled: false

Rails/FindBy:
Enabled: false

Rails/HasAndBelongsToMany:
Enabled: false

Rails/Output:
Exclude:
- db/migrate/**
40 changes: 11 additions & 29 deletions Berksfile.lock
Original file line number Diff line number Diff line change
@@ -1,49 +1,31 @@
DEPENDENCIES
api-umbrella
git: https://github.com/NREL/api-umbrella-cookbook.git
revision: 46e8637cdd591abfa74aef5c9ffbcda69ff888a5
revision: 04238ed07c24af20b0de0603cb076c002b5b2baa

GRAPH
api-umbrella (0.7.1)
build-essential (>= 0.0.0)
nodejs (>= 0.0.0)
phantomjs (>= 0.0.0)
sudo (>= 0.0.0)
ulimit (>= 0.0.0)
yum (>= 0.0.0)
yum-epel (>= 0.0.0)
apt (4.0.2)
compat_resource (>= 12.10)
ark (2.0.0)
build-essential (>= 0.0.0)
seven_zip (>= 0.0.0)
windows (>= 0.0.0)
build-essential (6.0.5)
build-essential (7.0.2)
compat_resource (>= 12.14)
mingw (>= 1.1)
seven_zip (>= 0.0.0)
chocolatey (1.0.3)
windows (>= 1.38)
compat_resource (12.14.3)
homebrew (2.1.2)
build-essential (>= 2.1.2)
compat_resource (12.16.2)
mingw (1.2.4)
compat_resource (>= 0.0.0)
seven_zip (>= 0.0.0)
nodejs (2.4.4)
apt (>= 0.0.0)
ark (>= 0.0.0)
build-essential (>= 0.0.0)
homebrew (>= 0.0.0)
yum-epel (>= 0.0.0)
phantomjs (1.0.3)
build-essential (>= 0.0.0)
chocolatey (>= 0.0.0)
ohai (4.2.2)
compat_resource (>= 12.14)
seven_zip (2.0.2)
windows (>= 1.2.2)
sudo (3.0.0)
sudo (3.1.0)
ulimit (0.4.0)
windows (2.0.2)
yum (4.0.0)
yum-epel (1.0.1)
yum (>= 3.6)
windows (2.1.1)
ohai (>= 4.0.0)
yum (4.1.0)
yum-epel (2.0.0)
compat_resource (>= 12.14.6)
22 changes: 10 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ set(VENDOR_DIR ${WORK_DIR}/vendor)
set(VENDOR_LUA_DIR ${VENDOR_DIR}/share/lua/5.1)
set(LUAROCKS_CMD env LUA_PATH=${STAGE_EMBEDDED_DIR}/openresty/luajit/share/lua/5.1/?.lua$<SEMICOLON>${STAGE_EMBEDDED_DIR}/openresty/luajit/share/lua/5.1/?/init.lua$<SEMICOLON>$<SEMICOLON> ${STAGE_EMBEDDED_DIR}/bin/luarocks)

# Where to install development-only dependencies.
set(DEV_INSTALL_PREFIX ${WORK_DIR}/dev-env)
set(DEV_VENDOR_DIR ${DEV_INSTALL_PREFIX}/vendor)

# Where to install test-only dependencies.
set(TEST_INSTALL_PREFIX ${WORK_DIR}/test-env)
set(TEST_VENDOR_DIR ${TEST_INSTALL_PREFIX}/vendor)
Expand All @@ -59,6 +63,7 @@ pkg_search_module(LIBFFI REQUIRED libffi)
require_program(rsync)

include(${CMAKE_SOURCE_DIR}/build/cmake/versions.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/dev/nodejs.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/elasticsearch.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/libcidr.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/libgeoip.cmake)
Expand All @@ -72,8 +77,6 @@ include(${CMAKE_SOURCE_DIR}/build/cmake/ruby.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/rsyslog.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/trafficserver.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/static-site.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/core-lua-deps.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/core-web-app.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/core.cmake)
if(ENABLE_HADOOP_ANALYTICS)
include(${CMAKE_SOURCE_DIR}/build/cmake/hadoop-analytics/flume.cmake)
Expand All @@ -86,14 +89,14 @@ endif()
# Testing
#
if(ENABLE_TEST_DEPENDENCIES)
include(${CMAKE_SOURCE_DIR}/build/cmake/test/unbound.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/test/mongo-orchestration.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/test/lua-deps.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/test/mailhog.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/test/mongo-orchestration.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/test/phantomjs.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/test/shellcheck.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/test/unbound.cmake)
endif()
include(${CMAKE_SOURCE_DIR}/build/cmake/test/lint.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/test/test-proxy.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/test/test-web-app.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/test/bundle.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/test/test.cmake)

#
Expand All @@ -111,8 +114,3 @@ include(${CMAKE_SOURCE_DIR}/build/cmake/package.cmake)
#
include(${CMAKE_SOURCE_DIR}/build/cmake/clean-download-archives.cmake)
include(${CMAKE_SOURCE_DIR}/build/cmake/distclean.cmake)

#
# Outdated Dependencies Check
#
include(${CMAKE_SOURCE_DIR}/build/cmake/outdated.cmake)
84 changes: 84 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
source "https://rubygems.org"

gem "rake", "~> 11.3.0"

# Tests
gem "minitest", "~> 5.10.1"

# More test outputs
gem "minitest-reporters", "~> 1.1.13"

# For an "after_all" callback.
gem "minitest-hooks", "~> 1.4.0"

# Test metadata for CI environment.
gem "minitest-ci", "~> 3.1.0"

# Ruby lint/style checker
gem "rubocop", "~> 0.46.0", :require => false

# Running background processes
gem "childprocess", "~> 0.5.9"

# Making HTTP requests
gem "typhoeus", "~> 1.1.2"

# JSON parsing
gem "multi_json", "~> 1.12.1"
gem "oj", "~> 2.18.0"

# Database libraries
gem "mongoid", "~> 6.0.3"
gem "elasticsearch", "~> 2.0.0"
gem "elasticsearch-persistence", "~> 0.1.9"

# Factories for test database data
gem "factory_girl", "~> 4.7.0"

# Deleting database data between tests.
gem "database_cleaner", "~> 1.5.3"

# Programmatically generate Rails session cookies.
gem "rails_compatible_cookies_utils", "~> 0.1.0"

# Localization tests
gem "i18n", "~> 0.7.0"

# URL parsing/generation
gem "addressable", "~> 2.5.0"

# Browser/JavaScript integration tests
gem "capybara", "~> 2.10.2"
# Use fork to fix failure messages:
# https://github.com/wojtekmach/minitest-capybara/pull/17
gem "minitest-capybara", "~> 0.8.2", :git => "https://github.com/GUI/minitest-capybara.git"

# Webkit-based driver for capybara
gem "poltergeist", "~> 1.11.0"

# Take screenshots on capybara test failures
gem "capybara-screenshot", "~> 1.0.14"

# HTML or XML parsing
gem "nokogiri", "~> 1.6.8"

# Useful additions
gem "activesupport", "~> 5.0.0"

# Path-based setting of hashes
gem "lazyhash", "~> 0.1.1"

# Generating fake strings and data.
gem "faker", "~> 1.6.6"

# Concurrency helpers.
gem "concurrent-ruby", "~> 1.0.2"

# Time zone randomization for tests.
gem "zonebie", "~> 0.6.1"

# Color output
gem "rainbow", "~> 2.1.0"

# Debug printing
gem "awesome_print", "~> 1.7.0"
Loading

0 comments on commit e9ccb78

Please sign in to comment.