Skip to content

Commit

Permalink
Merge pull request #2911 from engaging-computing/dev
Browse files Browse the repository at this point in the history
Merge Dev into Master
  • Loading branch information
ZacharyMcCann authored Dec 8, 2022
2 parents a82a283 + 7cbf75b commit a8aa2f5
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 61 deletions.
15 changes: 9 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,22 @@ jobs:
- run: sudo apt-get update; sudo apt-get install libreoffice libreoffice-calc unoconv
- run: sudo apt-get install ruby-railties-4.0 bundler
- run: sudo apt-get install qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x
- run: yes | gem uninstall bundler
- run: gem install bundler -v 1.17.3
- run: bundle install
- run: sudo apt-get install xvfb
- run: gem install bundler
- restore_cache:
key: v1-{{checksum "Gemfile.lock" }}
- run: bundle install --path vendor/bundle
- save_cache:
key: v1-{{checksum "Gemfile.lock" }}
paths: "vendor/bundle"
- run: bundle exec rake assets:precompile
- run: echo -e "export RAILS_ENV=test\nexport RACK_ENV=test" >> $BASH_ENV
- run: 'bundle check --path=vendor/bundle || bundle install --path=vendor/bundle
--jobs=4 --retry=3 '
# database: override:
- run: bundle exec rake db:preprep
- run: RAILS_ENV=test bundle exec rake db:migrate --trace
- run: bundle exec rake db:test:prepare
# Test
- run: rake
- run: xvfb-run -a bundle exec rake
# Run blackduck security scan after test
- run: bash <(curl -s https://copilot.blackducksoftware.com/ci/circle2/scripts/upload)
# Save test results
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Ignore bundler config
/.bundle
/.bundler
vendor/bundle

# Ignore the default SQLite database.
/db/*.sqlite3
Expand Down Expand Up @@ -45,3 +46,5 @@ coffeelint.json
.elasticbeanstalk/*
!.elasticbeanstalk/*.cfg.yml
!.elasticbeanstalk/*.global.yml

vendor/*
99 changes: 52 additions & 47 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
GIT
remote: https://github.com/jetthoughts/yaml_db.git
revision: 5f73cbd14adee939adf08574ec3bf6e05ee55889
specs:
yaml_db (0.2.3)

GIT
remote: https://github.com/ambethia/recaptcha
revision: 76c2f58ee906ed591662d552c6be383024af11d6
Expand Down Expand Up @@ -47,6 +41,12 @@ GIT
rails (~> 4)
sass

GIT
remote: https://github.com/jetthoughts/yaml_db
revision: 5f73cbd14adee939adf08574ec3bf6e05ee55889
specs:
yaml_db (0.2.3)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -83,19 +83,18 @@ GEM
auto_html (1.6.4)
redcarpet (~> 3.1)
rinku (~> 1.5.0)
autoprefixer-rails (5.1.7)
autoprefixer-rails (9.8.5)
execjs
json
bcrypt (3.1.12)
bcrypt (3.1.13)
bcrypt-ruby (3.1.5)
bcrypt (>= 3.1.3)
benchmark-ips (2.7.2)
bootstrap-sass (3.3.3)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.2.19)
benchmark-ips (2.8.2)
bootstrap-sass (3.4.1)
autoprefixer-rails (>= 5.2.1)
sassc (>= 2.0.0)
bootstrap-switch-rails (3.3.2)
browser (0.8.0)
builder (3.2.3)
builder (3.2.4)
byebug (9.0.6)
capybara (2.4.4)
mime-types (>= 1.16)
Expand Down Expand Up @@ -127,21 +126,22 @@ GEM
coffee-script
execjs
json
concurrent-ruby (1.1.5)
concurrent-ruby (1.1.6)
derailed (0.1.0)
derailed_benchmarks
derailed_benchmarks (1.3.5)
derailed_benchmarks (1.6.0)
benchmark-ips (~> 2)
get_process_mem (~> 0)
heapy (~> 0)
memory_profiler (~> 0)
rack (>= 1)
rake (> 10, < 13)
thor (~> 0.19)
devise (4.6.2)
rake (> 10, < 14)
ruby-statistics (>= 2.1)
thor (>= 0.19, < 2)
devise (4.7.2)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0, < 6.0)
railties (>= 4.1.0)
responders
warden (~> 1.2.3)
diff-lcs (1.3)
Expand All @@ -154,21 +154,22 @@ GEM
execjs (2.7.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
ffi (1.10.0)
ffi (1.13.1)
filigree (0.3.3)
font-awesome-rails (4.4.0.0)
railties (>= 3.2, < 5.0)
get_process_mem (0.2.3)
handlebars (0.6.0)
handlebars-source (~> 1.3.0)
therubyracer (~> 0.12.0)
handlebars-source (1.3.0)
get_process_mem (0.2.5)
ffi (~> 1.0)
handlebars (0.8.0)
handlebars-source (~> 4.0.5)
therubyracer (~> 0.12.1)
handlebars-source (4.0.14)
handlebars_assets (0.18)
execjs (>= 1.2.9)
multi_json
sprockets (>= 2.0.3)
tilt
hashie (3.4.3)
hashie (3.6.0)
heapy (0.1.4)
hike (1.2.3)
html5_validator (1.0.0)
Expand Down Expand Up @@ -197,36 +198,37 @@ GEM
jwt (1.5.4)
launchy (2.4.3)
addressable (~> 2.3)
libv8 (3.16.14.7)
libv8 (3.16.14.19)
mail (2.7.1)
mini_mime (>= 0.1.1)
memory_profiler (0.9.13)
memory_profiler (0.9.14)
mime-types (3.2.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2019.0331)
mini_magick (4.0.1)
mini_magick (4.10.1)
mini_mime (1.0.1)
mini_portile2 (2.4.0)
minitest (5.11.3)
minitest (5.14.1)
minitest-reporters (1.0.8)
ansi
builder
minitest (>= 5.0)
ruby-progressbar
modernizr-rails (2.7.1)
multi_json (1.13.1)
multi_json (1.15.0)
multi_xml (0.5.5)
multipart-post (2.0.0)
netrc (0.11.0)
nokogiri (1.9.1)
nio4r (2.5.2)
nokogiri (1.10.10)
mini_portile2 (~> 2.4.0)
oauth2 (1.0.0)
faraday (>= 0.8, < 0.10)
jwt (~> 1.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
omniauth (1.3.2)
omniauth (1.4.2)
hashie (>= 1.2, < 4)
rack (>= 1.0, < 3)
omniauth-google-oauth2 (0.4.1)
Expand All @@ -242,9 +244,10 @@ GEM
ast (~> 2.2)
pg (0.17.1)
powerpack (0.0.9)
puma (3.7.1)
puma (4.3.5)
nio4r (~> 2.0)
rack (1.5.5)
rack-cors (0.4.1)
rack-cors (1.0.3)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.1.16)
Expand All @@ -264,12 +267,12 @@ GEM
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.0.0)
rake (12.3.2)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
rake (13.0.1)
rb-fsevent (0.10.4)
rb-inotify (0.10.1)
ffi (~> 1.0)
redcarpet (3.2.2)
ref (1.0.5)
redcarpet (3.5.0)
ref (2.0.0)
remotipart (1.2.1)
responders (1.1.2)
railties (>= 3.2, < 4.2)
Expand Down Expand Up @@ -303,12 +306,15 @@ GEM
ruby-ole (1.2.11.8)
ruby-prof (0.18.0)
ruby-progressbar (1.7.1)
rubyzip (1.2.2)
ruby-statistics (2.1.2)
rubyzip (1.3.0)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
sassc (2.4.0)
ffi (~> 1.9)
selenium-webdriver (2.46.1)
childprocess (~> 0.5)
multi_json (~> 1.0)
Expand All @@ -319,7 +325,6 @@ GEM
multi_json (~> 1.0)
simplecov-html (~> 0.8.0)
simplecov-html (0.8.0)
slop (3.6.0)
spreadsheet (1.0.0)
ruby-ole (>= 1.0)
sprockets (2.12.5)
Expand All @@ -334,15 +339,15 @@ GEM
sqlite3 (1.3.10)
summernote-rails (0.5.10.2)
railties (>= 3.1)
therubyracer (0.12.1)
libv8 (~> 3.16.14.0)
therubyracer (0.12.3)
libv8 (~> 3.16.14.15)
ref
thor (0.20.3)
thor (1.0.1)
thread_safe (0.3.6)
tilt (1.4.1)
touchpunch-rails (1.0.3)
railties (>= 3.1)
tzinfo (1.2.5)
tzinfo (1.2.7)
thread_safe (~> 0.1)
uglifier (2.6.1)
execjs (>= 0.3.0)
Expand Down
5 changes: 4 additions & 1 deletion app/assets/javascripts/visualizations/highvis/table.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -200,12 +200,15 @@ $ ->
search: false
@table.jqGrid('navGrid','#toolbar_bottom', params)

operands = { "eq": "=", "ne": "!", "lt": "<", "le": "<=", "gt": ">", "ge": ">=", "bw": "^", "bn": "!^", "in": "=", "ni": "!=", "ew": "|", "en": "!@", "cn": "~", "nc": "!~", "nu": "#", "nn": "!#" }

params =
stringResult: true
searchOnEnter: false
searchOperators: true
operandTitle: 'Select Search Operation'
resetIcon: '<i class="fa fa-times-circle"></i>'
operands: operands
@table.jqGrid('filterToolbar', params)

# Set the time column formatters
Expand All @@ -229,7 +232,7 @@ $ ->
# Restore the search filter type and operator symbol
operator = $('#' + inputId).closest('tr').find('.soptclass')
$(operator).attr('soper', column.op)
operands = { "eq": "==", "ne": "!", "lt": "<", "le": "<=", \
operands = { "eq": "=", "ne": "!", "lt": "<", "le": "<=", \
"gt": ">", "ge": ">=", "bw": "^", "bn": "!^", \
"in": "=", "ni": "!=", "ew": "|", "en": "!@", \
"cn": "~", "nc": "!~", "nu": "#", "nn": "!#" }
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/projects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ def index
sort = 'updated_at'
end

if !params[:order].nil?
if !params[:order].nil? and ['ASC', 'DESC'].include? params[:order]
order = params[:order]
else
order = 'DESC'
Expand Down
4 changes: 2 additions & 2 deletions app/controllers/visualizations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ def index
# Main List
@params = params

if !params[:sort].nil?
if !params[:sort].nil? and ['created_at', 'updated_at'].include? params[:sort]
sort = params[:sort]
else
sort = 'created_at'
end

if !params[:order].nil?
if !params[:order].nil? and ['ASC', 'DESC'].include? params[:order]
order = params[:order]
else
order = 'DESC'
Expand Down
12 changes: 10 additions & 2 deletions test/unit/news_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,16 @@ def setup

def base_asserts(obj, h)
assert_equal obj.id, h[:id]
assert_equal obj.featured_media_id, h[:featuredMediaId]
assert_equal obj.title, h[:name]
if obj.featured_media_id
assert_equal obj.featured_media_id, h[:featuredMediaId]
else
assert_nil h[:featuredMediaId]
end
if obj.title
assert_equal obj.title, h[:name]
else
assert_nil h[:name]
end
assert_equal obj.hidden, h[:hidden]
assert_equal h[:timeAgoInWords], @year_diff
assert_equal h[:createdAt], @year_text
Expand Down
2 changes: 1 addition & 1 deletion test/unit/tutorial_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def base_asserts(h, keys)
assert_equal h[:id], @sample_id
assert_equal h[:name], @sample_name
assert_equal h[:category], @sample_category
assert_equal h[:youtubeUrl], @sample_url
assert_nil h[:youtubeUrl], @sample_url
keys.each do |x|
assert !h[x.to_sym].nil?
assert !h[x.to_sym].empty?
Expand Down
6 changes: 5 additions & 1 deletion test/unit/user_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@ def setup

# Passes if password_confirmation and password match
test 'password_confirmation matches password' do
assert_equal @user.password, @user.password_confirmation, 'Password_confirmation does not match password.'
if @user.password
assert_equal @user.password, @user.password_confirmation, 'Password_confirmation does not match password.'
else
assert_nil @user.password_confirmation, 'Password_confirmation does not match password.'
end
end

# ---------------------------------------------------
Expand Down

0 comments on commit a8aa2f5

Please sign in to comment.