diff --git a/admin/Gemfile b/admin/Gemfile index 42b9a07cf..c4acb5fbc 100644 --- a/admin/Gemfile +++ b/admin/Gemfile @@ -1,10 +1,6 @@ source 'https://rubygems.org' -unless ENV["LOCAL_DEV"] == "1" - source 'https://jamjam:blueberryjam@int.jamkazam.com/gems/' -end - -ruby "3.2.2" +ruby "3.4.8" devenv = ENV["BUILD_NUMBER"].nil? @@ -37,7 +33,7 @@ gem 'fog-brightbox' gem 'faraday' gem 'ruby-prof' gem 'rubyzip' -gem 'recurly' +gem 'recurly', '~> 2.19' gem 'icalendar' gem 'email_validator' gem 'redis' @@ -72,7 +68,7 @@ gem 'rails-jquery-autocomplete' gem 'activeadmin' gem 'activeadmin-searchable_select' gem 'mime-types' -gem 'fog' +gem 'fog-aws' gem 'xmlrpc' gem 'unf' gem 'country-select' @@ -121,6 +117,8 @@ end group :development, :test do gem 'capybara' + gem 'capybara-screenshot' + gem 'cuprite' gem 'rspec-rails' gem 'jasmine' gem 'execjs' diff --git a/admin/Gemfile.lock b/admin/Gemfile.lock index 8abef39c6..67f8a6fff 100644 --- a/admin/Gemfile.lock +++ b/admin/Gemfile.lock @@ -9,571 +9,606 @@ PATH jam_ruby (0.1.1) GEM - remote: http://rubygems.org/ - remote: https://jamjam:blueberryjam@int.jamkazam.com/gems/ + remote: https://rubygems.org/ specs: - CFPropertyList (2.3.6) - aasm (5.1.1) + aasm (5.5.2) concurrent-ruby (~> 1.0) - actionmailer (4.2.8) - actionpack (= 4.2.8) - actionview (= 4.2.8) - activejob (= 4.2.8) - mail (~> 2.5, >= 2.5.4) - rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.8) - actionview (= 4.2.8) - activesupport (= 4.2.8) - rack (~> 1.6) - rack-test (~> 0.6.2) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.8) - activesupport (= 4.2.8) + actioncable (8.0.4) + actionpack (= 8.0.4) + activesupport (= 8.0.4) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + zeitwerk (~> 2.6) + actionmailbox (8.0.4) + actionpack (= 8.0.4) + activejob (= 8.0.4) + activerecord (= 8.0.4) + activestorage (= 8.0.4) + activesupport (= 8.0.4) + mail (>= 2.8.0) + actionmailer (8.0.4) + actionpack (= 8.0.4) + actionview (= 8.0.4) + activejob (= 8.0.4) + activesupport (= 8.0.4) + mail (>= 2.8.0) + rails-dom-testing (~> 2.2) + actionpack (8.0.4) + actionview (= 8.0.4) + activesupport (= 8.0.4) + nokogiri (>= 1.8.5) + rack (>= 2.2.4) + rack-session (>= 1.0.1) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + useragent (~> 0.16) + actiontext (8.0.4) + actionpack (= 8.0.4) + activerecord (= 8.0.4) + activestorage (= 8.0.4) + activesupport (= 8.0.4) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (8.0.4) + activesupport (= 8.0.4) builder (~> 3.1) - erubis (~> 2.7.0) - rails-dom-testing (~> 1.0, >= 1.0.5) - rails-html-sanitizer (~> 1.0, >= 1.0.3) - active_material (1.4.2) - activeadmin (1.4.3) - arbre (>= 1.1.1) - coffee-rails - formtastic (~> 3.1) - formtastic_i18n - inherited_resources (>= 1.9.0) - jquery-rails (>= 4.2.0) - kaminari (>= 0.15) - railties (>= 4.2, < 5.3) - ransack (>= 1.8.7) - sass (~> 3.1) - sprockets (< 4.1) - activeadmin-searchable_select (1.4.0) - activeadmin (>= 1.x, < 3) + erubi (~> 1.11) + rails-dom-testing (~> 2.2) + rails-html-sanitizer (~> 1.6) + active_material (1.5.2) + activeadmin (3.4.0) + arbre (~> 1.2, >= 1.2.1) + csv + formtastic (>= 3.1) + formtastic_i18n (>= 0.4) + inherited_resources (~> 1.7) + jquery-rails (>= 4.2) + kaminari (>= 1.2.1) + railties (>= 6.1) + ransack (>= 4.0) + activeadmin-searchable_select (1.9.0) + activeadmin (>= 1.x, < 4) jquery-rails (>= 3.0, < 5) select2-rails (~> 4.0) - activeadmin_addons (1.7.1) - active_material + activeadmin_addons (1.10.2) + active_material (~> 1.5) railties - require_all (~> 1.5) - sass - select2-rails (~> 4.0) + redcarpet + require_all + sassc + sassc-rails xdan-datetimepicker-rails (~> 2.5.1) - activejob (4.2.8) - activesupport (= 4.2.8) - globalid (>= 0.3.0) - activemodel (4.2.8) - activesupport (= 4.2.8) - builder (~> 3.1) - activerecord (4.2.8) - activemodel (= 4.2.8) - activesupport (= 4.2.8) - arel (~> 6.0) - activesupport (4.2.8) - i18n (~> 0.7) - minitest (~> 5.1) - thread_safe (~> 0.3, >= 0.3.4) - tzinfo (~> 1.1) - addressable (2.7.0) - public_suffix (>= 2.0.2, < 5.0) - aliyun-sdk (0.8.0) - nokogiri (~> 1.6) - rest-client (~> 2.0) - amq-client (0.9.12) - amq-protocol (>= 1.2.0) + activejob (8.0.4) + activesupport (= 8.0.4) + globalid (>= 0.3.6) + activemodel (8.0.4) + activesupport (= 8.0.4) + activerecord (8.0.4) + activemodel (= 8.0.4) + activesupport (= 8.0.4) + timeout (>= 0.4.0) + activestorage (8.0.4) + actionpack (= 8.0.4) + activejob (= 8.0.4) + activerecord (= 8.0.4) + activesupport (= 8.0.4) + marcel (~> 1.0) + activesupport (8.0.4) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + addressable (2.8.8) + public_suffix (>= 2.0.2, < 8.0) + amq-protocol (2.5.0) + amqp (1.8.0) + amq-protocol (>= 2.2.0) eventmachine - amq-protocol (2.3.2) - amqp (0.9.8) - amq-client (~> 0.9.5) - amq-protocol (>= 0.9.4) - eventmachine - arbre (1.2.1) + arbre (1.7.0) activesupport (>= 3.0.0) - arel (6.0.4) - arr-pm (0.0.10) - cabin (> 0) + ruby2_keywords (>= 0.0.2) + arr-pm (0.0.12) auto_strip_attributes (2.6.0) activerecord (>= 4.0) - aws-sdk (1.67.0) - aws-sdk-v1 (= 1.67.0) - aws-sdk-v1 (1.67.0) - json (~> 1.4) - nokogiri (~> 1) - backports (3.20.2) - bcrypt (3.1.15) - best_in_place (3.1.1) - actionpack (>= 3.2) - railties (>= 3.2) - binding_of_caller (0.8.0) - debug_inspector (>= 0.0.1) - bootstrap-sass (2.0.4.0) - bootstrap-will_paginate (0.0.6) + autoprefixer-rails (10.4.21.0) + execjs (~> 2) + aws-eventstream (1.4.0) + aws-partitions (1.1202.0) + aws-sdk-core (3.241.3) + aws-eventstream (~> 1, >= 1.3.0) + aws-partitions (~> 1, >= 1.992.0) + aws-sigv4 (~> 1.9) + base64 + bigdecimal + jmespath (~> 1, >= 1.6.1) + logger + aws-sdk-kms (1.120.0) + aws-sdk-core (~> 3, >= 3.241.3) + aws-sigv4 (~> 1.5) + aws-sdk-s3 (1.211.0) + aws-sdk-core (~> 3, >= 3.241.3) + aws-sdk-kms (~> 1) + aws-sigv4 (~> 1.5) + aws-sigv4 (1.12.1) + aws-eventstream (~> 1, >= 1.0.2) + backports (3.25.3) + base64 (0.3.0) + bcrypt (3.1.21) + benchmark (0.5.0) + best_in_place (4.0.0) + actionpack (>= 7.0) + railties (>= 7.0) + bigdecimal (4.0.1) + binding_of_caller (1.0.1) + debug_inspector (>= 1.2.0) + bootstrap-sass (3.4.1) + autoprefixer-rails (>= 5.2.1) + sassc (>= 2.0.0) + bootstrap-will_paginate (1.0.0) will_paginate - bugsnag (5.3.2) - builder (3.2.4) - cabin (0.9.0) - capybara (2.13.0) + bugsnag (6.28.0) + concurrent-ruby (~> 1.0) + builder (3.3.0) + cabin (0.9.1) + capybara (3.40.0) addressable - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - xpath (~> 2.0) - carrierwave (0.11.2) - activemodel (>= 3.2.0) - activesupport (>= 3.2.0) - json (>= 1.7) - mime-types (>= 1.16) - mimemagic (>= 0.3.0) - carrierwave_direct (1.0.0) - carrierwave (~> 0.11) + matrix + mini_mime (>= 0.1.3) + nokogiri (~> 1.11) + rack (>= 1.6.0) + rack-test (>= 0.6.3) + regexp_parser (>= 1.5, < 3.0) + xpath (~> 3.2) + capybara-screenshot (1.0.26) + capybara (>= 1.0, < 4) + launchy + carrierwave (3.1.2) + activemodel (>= 6.0.0) + activesupport (>= 6.0.0) + addressable (~> 2.6) + image_processing (~> 1.1) + marcel (~> 1.0.0) + ssrf_filter (~> 1.0) + carrierwave_direct (3.0.0) + carrierwave (>= 2.2.0) fog-aws - cause (0.1) - childprocess (0.9.0) - ffi (~> 1.0, >= 1.0.11) - clamp (1.0.1) + childprocess (5.1.0) + logger (~> 1.5) + clamp (1.3.3) cocoon (1.2.15) coderay (1.1.3) - coffee-rails (4.2.2) + coffee-rails (5.0.0) coffee-script (>= 2.2.0) - railties (>= 4.0.0) + railties (>= 5.2.0) coffee-script (2.4.1) coffee-script-source execjs coffee-script-source (1.12.2) - concurrent-ruby (1.1.8) + concurrent-ruby (1.3.6) + connection_pool (3.0.2) country-select (1.2.1) crass (1.0.6) - database_cleaner (1.99.0) - debug_inspector (1.0.0) - devise (4.7.3) + csv (3.3.5) + cuprite (0.17) + capybara (~> 3.0) + ferrum (~> 0.17.0) + database_cleaner (2.1.0) + database_cleaner-active_record (>= 2, < 3) + database_cleaner-active_record (2.2.2) + activerecord (>= 5.a) + database_cleaner-core (~> 2.0) + database_cleaner-core (2.0.1) + date (3.5.1) + debug_inspector (1.2.0) + devise (4.9.4) bcrypt (~> 3.0) orm_adapter (~> 0.1) railties (>= 4.1.0) responders warden (~> 1.2.3) - diff-lcs (1.4.4) - domain_name (0.5.20190701) - unf (>= 0.0.5, < 1.0.0) - dotenv (2.7.6) - elasticsearch (7.4.0) - elasticsearch-api (= 7.4.0) - elasticsearch-transport (= 7.4.0) - elasticsearch-api (7.4.0) + diff-lcs (1.6.2) + docile (1.4.1) + domain_name (0.6.20240107) + dotenv (2.8.1) + drb (2.2.3) + dry-inflector (1.3.0) + elastic-transport (8.4.1) + faraday (< 3) multi_json - elasticsearch-transport (7.4.0) - faraday + elasticsearch (9.2.0) + elastic-transport (~> 8.3) + elasticsearch-api (= 9.2.0) + elasticsearch-api (9.2.0) multi_json - email_validator (1.6.0) + email_validator (2.2.4) activemodel - erubis (2.7.0) - et-orbi (1.2.4) + erb (6.0.1) + erubi (1.13.1) + et-orbi (1.4.0) tzinfo - eventmachine (1.2.3) - excon (0.79.0) - execjs (1.4.0) - multi_json (~> 1.0) - factory_girl (4.9.0) - activesupport (>= 3.0.0) - factory_girl_rails (4.9.0) - factory_girl (~> 4.9.0) - railties (>= 3.0.0) - faker (1.3.0) - i18n (~> 0.5) - faraday (0.9.2) - multipart-post (>= 1.2, < 3) - ffi (1.12.2) - fission (0.5.0) - CFPropertyList (~> 2.2) - fog (1.41.0) - fog-aliyun (>= 0.1.0) - fog-atmos - fog-aws (>= 0.6.0) - fog-brightbox (~> 0.4) - fog-cloudatcost (~> 0.1.0) - fog-core (~> 1.45) - fog-digitalocean (>= 0.3.0) - fog-dnsimple (~> 1.0) - fog-dynect (~> 0.0.2) - fog-ecloud (~> 0.1) - fog-google (<= 0.1.0) - fog-internet-archive - fog-joyent - fog-json - fog-local - fog-openstack - fog-powerdns (>= 0.1.1) - fog-profitbricks - fog-rackspace - fog-radosgw (>= 0.0.2) - fog-riakcs - fog-sakuracloud (>= 0.0.4) - fog-serverlove - fog-softlayer - fog-storm_on_demand - fog-terremark - fog-vmfusion - fog-voxel - fog-vsphere (>= 0.4.0) - fog-xenserver - fog-xml (~> 0.1.1) - ipaddress (~> 0.5) - json (>= 1.8, < 2.0) - fog-aliyun (0.3.19) - aliyun-sdk (~> 0.8.0) - fog-core - fog-json - ipaddress (~> 0.8) - xml-simple (~> 1.1) - fog-atmos (0.1.0) - fog-core - fog-xml - fog-aws (2.0.1) - fog-core (~> 1.38) - fog-json (~> 1.0) + eventmachine (1.2.7) + excon (1.3.2) + logger + execjs (2.10.0) + factory_bot (6.5.6) + activesupport (>= 6.1.0) + factory_bot_rails (6.5.1) + factory_bot (~> 6.5) + railties (>= 6.1.0) + faker (3.5.3) + i18n (>= 1.8.11, < 2) + faraday (1.10.4) + faraday-em_http (~> 1.0) + faraday-em_synchrony (~> 1.0) + faraday-excon (~> 1.1) + faraday-httpclient (~> 1.0) + faraday-multipart (~> 1.0) + faraday-net_http (~> 1.0) + faraday-net_http_persistent (~> 1.0) + faraday-patron (~> 1.0) + faraday-rack (~> 1.0) + faraday-retry (~> 1.0) + ruby2_keywords (>= 0.0.4) + faraday-em_http (1.0.0) + faraday-em_synchrony (1.0.1) + faraday-excon (1.1.0) + faraday-httpclient (1.0.1) + faraday-multipart (1.2.0) + multipart-post (~> 2.0) + faraday-net_http (1.0.2) + faraday-net_http_persistent (1.2.0) + faraday-patron (1.0.0) + faraday-rack (1.0.0) + faraday-retry (1.0.3) + ferrum (0.17.1) + addressable (~> 2.5) + base64 (~> 0.2) + concurrent-ruby (~> 1.1) + webrick (~> 1.7) + websocket-driver (~> 0.7) + ffi (1.17.3-aarch64-linux-gnu) + ffi (1.17.3-aarch64-linux-musl) + ffi (1.17.3-arm-linux-gnu) + ffi (1.17.3-arm-linux-musl) + ffi (1.17.3-arm64-darwin) + ffi (1.17.3-x86_64-darwin) + ffi (1.17.3-x86_64-linux-gnu) + ffi (1.17.3-x86_64-linux-musl) + fog-aws (3.33.1) + base64 (>= 0.2, < 0.4) + fog-core (~> 2.6) + fog-json (~> 1.1) fog-xml (~> 0.1) - ipaddress (~> 0.8) - fog-brightbox (0.11.0) - fog-core (~> 1.22) + fog-brightbox (1.12.0) + dry-inflector + fog-core (>= 1.45, < 3.0) fog-json - inflecto (~> 0.0.2) - fog-cloudatcost (0.1.2) - fog-core (~> 1.36) - fog-json (~> 1.0) - fog-xml (~> 0.1) - ipaddress (~> 0.8) - fog-core (1.45.0) + fog-core (2.6.0) builder - excon (~> 0.58) - formatador (~> 0.2) - fog-digitalocean (0.4.0) - fog-core - fog-json - fog-xml - ipaddress (>= 0.5) - fog-dnsimple (1.0.0) - fog-core (~> 1.38) - fog-json (~> 1.0) - fog-dynect (0.0.3) - fog-core - fog-json - fog-xml - fog-ecloud (0.3.0) - fog-core - fog-xml - fog-google (0.1.0) - fog-core - fog-json - fog-xml - fog-internet-archive (0.0.2) - fog-core - fog-json - fog-xml - fog-joyent (0.0.1) - fog-core (~> 1.42) - fog-json (>= 1.0) + excon (~> 1.0) + formatador (>= 0.2, < 2.0) + mime-types fog-json (1.2.0) fog-core multi_json (~> 1.10) - fog-local (0.6.0) - fog-core (>= 1.27, < 3.0) - fog-openstack (0.3.10) - fog-core (>= 1.45, <= 2.1.0) - fog-json (>= 1.0) - ipaddress (>= 0.8) - fog-powerdns (0.2.0) - fog-core - fog-json - fog-xml - fog-profitbricks (4.1.1) - fog-core (~> 1.42) - fog-json (~> 1.0) - fog-rackspace (0.1.6) - fog-core (>= 1.35) - fog-json (>= 1.0) - fog-xml (>= 0.1) - ipaddress (>= 0.8) - fog-radosgw (0.0.5) - fog-core (>= 1.21.0) - fog-json - fog-xml (>= 0.0.1) - fog-riakcs (0.1.0) - fog-core - fog-json - fog-xml - fog-sakuracloud (1.7.5) - fog-core - fog-json - fog-serverlove (0.1.2) - fog-core - fog-json - fog-softlayer (1.1.4) - fog-core - fog-json - fog-storm_on_demand (0.1.1) - fog-core - fog-json - fog-terremark (0.1.0) - fog-core - fog-xml - fog-vmfusion (0.1.0) - fission - fog-core - fog-voxel (0.1.0) - fog-core - fog-xml - fog-vsphere (3.5.0) - fog-core - rbvmomi (>= 1.9, < 3) - fog-xenserver (1.0.0) - fog-core - fog-xml - xmlrpc - fog-xml (0.1.3) + fog-xml (0.1.5) fog-core nokogiri (>= 1.5.11, < 2.0.0) - formatador (0.2.5) - formtastic (3.1.5) - actionpack (>= 3.2.13) - formtastic_i18n (0.6.0) - fpm (1.12.0) - arr-pm (~> 0.0.10) + formatador (1.2.3) + reline + formtastic (5.0.0) + actionpack (>= 6.0.0) + formtastic_i18n (0.7.0) + fpm (1.17.0) + arr-pm (~> 0.0.11) backports (>= 2.6.2) - cabin (>= 0.6.0) - childprocess (< 1.0.0) - clamp (~> 1.0.0) - ffi (~> 1.12.0) - git (>= 1.3.0, < 2.0) - json (>= 1.7.7, < 3.0) + cabin (>= 0.9.1) + clamp (>= 1.0.0) pleaserun (~> 0.0.29) - ruby-xz (~> 0.2.3) + rexml stud - fugit (1.4.2) - et-orbi (~> 1.1, >= 1.1.8) + fugit (1.12.1) + et-orbi (~> 1.4) raabro (~> 1.4) - geokit (1.13.1) - geokit-rails (2.3.2) + geokit (1.14.0) + geokit-rails (2.5.0) geokit (~> 1.5) rails (>= 3.0) - git (1.8.1) - rchardet (~> 1.8) - globalid (0.4.2) - activesupport (>= 4.2.0) - gon (6.4.0) + globalid (1.3.0) + activesupport (>= 6.1) + gon (7.0.0) actionpack (>= 3.0.20) + activesupport i18n (>= 0.7) multi_json - request_store (>= 1.0) - haml (5.2.1) - temple (>= 0.8.0) + haml (7.1.0) + temple (>= 0.8.2) + thor tilt - haml-rails (1.0.0) - actionpack (>= 4.0.1) - activesupport (>= 4.0.1) - haml (>= 4.0.6, < 6.0) - html2haml (>= 1.0.1) - railties (>= 4.0.1) - has_scope (0.7.2) - actionpack (>= 4.1) - activesupport (>= 4.1) - html2haml (2.2.0) - erubis (~> 2.7.0) - haml (>= 4.0, < 6) - nokogiri (>= 1.6.0) - ruby_parser (~> 3.5) + haml-rails (3.0.0) + actionpack (>= 5.1) + activesupport (>= 5.1) + haml (>= 4.0.6) + railties (>= 5.1) + has_scope (0.9.0) + actionpack (>= 7.0) + activesupport (>= 7.0) http-accept (1.7.0) - http-cookie (1.0.3) + http-cookie (1.1.0) domain_name (~> 0.5) - httparty (0.16.2) + httparty (0.24.0) + csv + mini_mime (>= 1.0.0) multi_xml (>= 0.5.2) - i18n (0.9.5) + i18n (1.14.8) concurrent-ruby (~> 1.0) - icalendar (2.4.0) - inflecto (0.0.2) - influxdb (0.3.14) - cause - json - influxdb-rails (0.1.12) - influxdb (~> 0.3.0) - railties - inherited_resources (1.9.0) - actionpack (>= 4.2, < 5.3) - has_scope (~> 0.6) - railties (>= 4.2, < 5.3) - responders + icalendar (2.12.1) + base64 + ice_cube (~> 0.16) + logger + ostruct + ice_cube (0.17.0) + image_processing (1.14.0) + mini_magick (>= 4.9.5, < 6) + ruby-vips (>= 2.0.17, < 3) + influxdb (0.8.1) + influxdb-rails (1.0.3) + influxdb (~> 0.6, >= 0.6.4) + railties (>= 5.0) + inherited_resources (1.14.0) + actionpack (>= 6.0) + has_scope (>= 0.6) + railties (>= 6.0) + responders (>= 2) insist (1.0.0) - io-like (0.3.1) - ipaddress (0.8.3) - iso-639 (0.3.5) - jasmine (1.3.1) - jasmine-core (~> 1.3.1) - rack (~> 1.0) - rspec (>= 1.3.1) - selenium-webdriver (>= 0.1.3) - jasmine-core (1.3.1) - jquery-rails (4.4.0) + io-console (0.8.2) + irb (1.16.0) + pp (>= 0.6.0) + rdoc (>= 4.0.0) + reline (>= 0.4.2) + iso-639 (0.3.8) + csv + jasmine (3.99.0) + jasmine-core (= 3.99.0) + phantomjs + rack (>= 2.1.4) + rake + webrick + jasmine-core (3.99.0) + jmespath (1.6.2) + jquery-rails (4.6.1) rails-dom-testing (>= 1, < 3) railties (>= 4.2.0) thor (>= 0.14, < 2.0) - jquery-ui-rails (6.0.1) + jquery-ui-rails (8.0.0) railties (>= 3.2.16) - json (1.8.6) - kaminari (1.2.1) + json (2.18.0) + kaminari (1.2.2) activesupport (>= 4.1.0) - kaminari-actionview (= 1.2.1) - kaminari-activerecord (= 1.2.1) - kaminari-core (= 1.2.1) - kaminari-actionview (1.2.1) + kaminari-actionview (= 1.2.2) + kaminari-activerecord (= 1.2.2) + kaminari-core (= 1.2.2) + kaminari-actionview (1.2.2) actionview - kaminari-core (= 1.2.1) - kaminari-activerecord (1.2.1) + kaminari-core (= 1.2.2) + kaminari-activerecord (1.2.2) activerecord - kaminari-core (= 1.2.1) - kaminari-core (1.2.1) - kgio (2.11.3) - kickbox (2.0.4) - faraday (~> 0.9) + kaminari-core (= 1.2.2) + kaminari-core (1.2.2) + kgio (2.11.4) + kickbox (2.0.5) + faraday (~> 1.0) json (>= 1.8) - launchy (2.4.3) - addressable (~> 2.3) + launchy (3.1.1) + addressable (~> 2.8) + childprocess (~> 5.0) + logger (~> 1.6) little-plugger (1.1.4) - logging (1.7.2) - little-plugger (>= 1.1.3) - loofah (2.9.0) + logger (1.7.0) + logging (2.4.0) + little-plugger (~> 1.1) + multi_json (~> 1.14) + loofah (2.25.0) crass (~> 1.0.2) - nokogiri (>= 1.5.9) - mail (2.7.1) + nokogiri (>= 1.12.0) + mail (2.9.0) + logger mini_mime (>= 0.1.1) - method_source (1.0.0) - mime-types (1.25) - mimemagic (0.3.5) - mini_mime (1.0.2) - mini_portile2 (2.4.0) - minitest (5.14.3) - mono_logger (1.1.0) - multi_json (1.15.0) - multi_xml (0.6.0) - multipart-post (2.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.4) + matrix (0.4.3) + method_source (1.1.0) + mime-types (3.7.0) + logger + mime-types-data (~> 3.2025, >= 3.2025.0507) + mime-types-data (3.2025.0924) + mini_magick (5.3.1) + logger + mini_mime (1.1.5) + minitest (6.0.1) + prism (~> 1.5) + mono_logger (1.1.2) + multi_json (1.19.1) + multi_xml (0.8.1) + bigdecimal (>= 3.1, < 5) + multipart-post (2.4.1) mustache (0.99.8) - net-ssh (6.1.0) + mustermann (3.0.4) + ruby2_keywords (~> 0.0.1) + net-imap (0.6.2) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.2) + timeout + net-smtp (0.5.1) + net-protocol + net-ssh (7.3.0) netrc (0.11.0) - nio4r (2.5.2) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) - nokogumbo (2.0.4) - nokogiri (~> 1.8, >= 1.8.4) - oj (3.1.3) - optimist (3.0.1) + nio4r (2.7.5) + nokogiri (1.19.0-aarch64-linux-gnu) + racc (~> 1.4) + nokogiri (1.19.0-aarch64-linux-musl) + racc (~> 1.4) + nokogiri (1.19.0-arm-linux-gnu) + racc (~> 1.4) + nokogiri (1.19.0-arm-linux-musl) + racc (~> 1.4) + nokogiri (1.19.0-arm64-darwin) + racc (~> 1.4) + nokogiri (1.19.0-x86_64-darwin) + racc (~> 1.4) + nokogiri (1.19.0-x86_64-linux-gnu) + racc (~> 1.4) + nokogiri (1.19.0-x86_64-linux-musl) + racc (~> 1.4) + oj (3.16.13) + bigdecimal (>= 3.0) + ostruct (>= 0.2) orm_adapter (0.5.0) - pg (0.17.1) - pg_array_parser (0.0.9) - pleaserun (0.0.31) + ostruct (0.6.3) + pg (1.6.3) + pg (1.6.3-aarch64-linux) + pg (1.6.3-aarch64-linux-musl) + pg (1.6.3-arm64-darwin) + pg (1.6.3-x86_64-darwin) + pg (1.6.3-x86_64-linux) + pg (1.6.3-x86_64-linux-musl) + phantomjs (2.1.1.0) + pleaserun (0.0.33) cabin (> 0) clamp - dotenv + dotenv (~> 2) insist mustache (= 0.99.8) stud - postgres-copy (0.6.0) - activerecord (>= 3.0.0) - pg - rails (>= 3.0.0) - responders - postgres_ext (3.0.1) - activerecord (~> 4.0) - arel (>= 4.0.1) - pg_array_parser (~> 0.0.9) - power_assert (2.0.0) - protected_attributes (1.1.4) - activemodel (>= 4.0.1, < 5.0) - pry (0.14.0) + postgres-copy (1.7.2) + activerecord (>= 5.1) + csv + pg (>= 0.17) + power_assert (3.0.1) + pp (0.6.3) + prettyprint + prettyprint (0.2.0) + prism (1.7.0) + pry (0.16.0) coderay (~> 1.1) method_source (~> 1.0) + reline (>= 0.6.0) pry-remote (0.1.8) pry (~> 0.9) slop (~> 3.0) - pry-stack_explorer (0.4.12) - binding_of_caller (~> 0.7) + pry-stack_explorer (0.6.1) + binding_of_caller (~> 1.0) pry (~> 0.13) - public_suffix (4.0.6) - puma (5.2.1) + psych (5.3.1) + date + stringio + public_suffix (7.0.2) + puma (7.1.0) nio4r (~> 2.0) raabro (1.4.0) - rack (1.6.13) - rack-protection (1.5.5) - rack - rack-test (0.6.3) - rack (>= 1.0) - rails (4.2.8) - actionmailer (= 4.2.8) - actionpack (= 4.2.8) - actionview (= 4.2.8) - activejob (= 4.2.8) - activemodel (= 4.2.8) - activerecord (= 4.2.8) - activesupport (= 4.2.8) - bundler (>= 1.3.0, < 2.0) - railties (= 4.2.8) - sprockets-rails - rails-deprecated_sanitizer (1.0.3) - activesupport (>= 4.2.0.alpha) - rails-dom-testing (1.0.9) - activesupport (>= 4.2.0, < 5.0) - nokogiri (~> 1.6) - rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.3.0) - loofah (~> 2.3) + racc (1.8.1) + rack (3.2.4) + rack-protection (4.2.1) + base64 (>= 0.1.0) + logger (>= 1.6.0) + rack (>= 3.0.0, < 4) + rack-session (2.1.1) + base64 (>= 0.1.0) + rack (>= 3.0.0) + rack-test (2.2.0) + rack (>= 1.3) + rackup (2.3.1) + rack (>= 3) + rails (8.0.4) + actioncable (= 8.0.4) + actionmailbox (= 8.0.4) + actionmailer (= 8.0.4) + actionpack (= 8.0.4) + actiontext (= 8.0.4) + actionview (= 8.0.4) + activejob (= 8.0.4) + activemodel (= 8.0.4) + activerecord (= 8.0.4) + activestorage (= 8.0.4) + activesupport (= 8.0.4) + bundler (>= 1.15.0) + railties (= 8.0.4) + rails-dom-testing (2.3.0) + activesupport (>= 5.0.0) + minitest + nokogiri (>= 1.6) + rails-html-sanitizer (1.6.2) + loofah (~> 2.21) + nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0) rails-jquery-autocomplete (1.0.5) rails (>= 3.2) - rails-observers (0.1.5) - activemodel (>= 4.0) - railties (4.2.8) - actionpack (= 4.2.8) - activesupport (= 4.2.8) - rake (>= 0.8.7) - thor (>= 0.18.1, < 2.0) - raindrops (0.19.1) - rake (13.0.3) - ransack (1.8.10) - actionpack (>= 3.0, < 5.2) - activerecord (>= 3.0, < 5.2) - activesupport (>= 3.0, < 5.2) + railties (8.0.4) + actionpack (= 8.0.4) + activesupport (= 8.0.4) + irb (~> 1.13) + rackup (>= 1.0.0) + rake (>= 12.2) + thor (~> 1.0, >= 1.2.2) + tsort (>= 0.2) + zeitwerk (~> 2.6) + raindrops (0.20.1) + rake (13.3.1) + ransack (4.4.1) + activerecord (>= 7.2) + activesupport (>= 7.2) i18n - rb-fsevent (0.10.4) - rb-inotify (0.10.1) + rb-fsevent (0.11.2) + rb-inotify (0.11.1) ffi (~> 1.0) - rbvmomi (2.4.1) - builder (~> 3.0) - json (>= 1.8) - nokogiri (~> 1.5) - optimist (~> 3.0) - rchardet (1.8.0) - recurly (2.18.16) - redis (3.3.3) - redis-namespace (1.5.3) - redis (~> 3.0, >= 3.0.4) - request_store (1.5.0) - rack (>= 1.4) - require_all (1.5.0) - responders (2.4.1) - actionpack (>= 4.2.0, < 6.0) - railties (>= 4.2.0, < 6.0) - resque (1.27.4) - mono_logger (~> 1.0) + rdoc (7.0.3) + erb + psych (>= 4.0.0) + tsort + recurly (2.20.5) + redcarpet (3.6.1) + redis (5.4.1) + redis-client (>= 0.22.0) + redis-client (0.26.3) + connection_pool + redis-namespace (1.11.0) + redis (>= 4) + regexp_parser (2.11.3) + reline (0.6.3) + io-console (~> 0.5) + require_all (3.0.0) + responders (3.2.0) + actionpack (>= 7.0) + railties (>= 7.0) + resque (2.7.0) + mono_logger (~> 1) multi_json (~> 1.0) - redis-namespace (~> 1.3) + redis-namespace (~> 1.6) sinatra (>= 0.9.2) - vegas (~> 0.1.2) resque-failed-job-mailer (0.0.3) - resque-lonely_job (1.0.2) + resque-lonely_job (1.1.3) resque (>= 1.2) - resque-retry (1.7.4) + resque-retry (1.8.1) resque (>= 1.25, < 3.0) - resque-scheduler (~> 4.0) - resque-scheduler (4.4.0) + resque-scheduler (>= 4.0, < 6.0) + resque-scheduler (4.11.0) mono_logger (~> 1.0) redis (>= 3.3) - resque (>= 1.26) - rufus-scheduler (~> 3.2) + resque (>= 1.27) + rufus-scheduler (~> 3.2, != 3.3) resque_mailer (2.4.3) actionmailer (>= 3.0) activesupport (>= 3.0) @@ -582,218 +617,534 @@ GEM http-cookie (>= 1.0.2, < 2.0) mime-types (>= 1.16, < 4.0) netrc (~> 0.8) - rspec (3.10.0) - rspec-core (~> 3.10.0) - rspec-expectations (~> 3.10.0) - rspec-mocks (~> 3.10.0) - rspec-core (3.10.1) - rspec-support (~> 3.10.0) - rspec-expectations (3.10.1) + rexml (3.4.4) + rspec-core (3.13.6) + rspec-support (~> 3.13.0) + rspec-expectations (3.13.5) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-mocks (3.10.2) + rspec-support (~> 3.13.0) + rspec-mocks (3.13.7) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.10.0) - rspec-rails (4.0.2) - actionpack (>= 4.2) - activesupport (>= 4.2) - railties (>= 4.2) - rspec-core (~> 3.10) - rspec-expectations (~> 3.10) - rspec-mocks (~> 3.10) - rspec-support (~> 3.10) - rspec-support (3.10.2) - ruby-prof (0.15.9) - ruby-protocol-buffers (1.2.2) - ruby-xz (0.2.3) - ffi (~> 1.9) - io-like (~> 0.3) - ruby_parser (3.15.1) - sexp_processor (~> 4.9) - rubyzip (1.2.1) - rufus-scheduler (3.7.0) - fugit (~> 1.1, >= 1.1.6) - sanitize (5.2.3) + rspec-support (~> 3.13.0) + rspec-rails (8.0.2) + actionpack (>= 7.2) + activesupport (>= 7.2) + railties (>= 7.2) + rspec-core (~> 3.13) + rspec-expectations (~> 3.13) + rspec-mocks (~> 3.13) + rspec-support (~> 3.13) + rspec-support (3.13.6) + ruby-prof (1.7.2) + base64 + ruby-protocol-buffers (1.6.1) + ruby-vips (2.3.0) + ffi (~> 1.12) + logger + ruby2_keywords (0.0.5) + rubyzip (3.2.2) + rufus-scheduler (3.9.2) + fugit (~> 1.1, >= 1.11.1) + sanitize (7.0.0) crass (~> 1.0.2) - nokogiri (>= 1.8.0) - nokogumbo (~> 2.0) - sass (3.5.5) + nokogiri (>= 1.16.8) + 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) - sass-rails (5.0.7) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) + sass-rails (6.0.0) + sassc-rails (~> 2.1, >= 2.1.1) + sassc (2.4.0) + ffi (~> 1.9) + sassc-rails (2.1.2) + railties (>= 4.0.0) + sassc (>= 2.0) + sprockets (> 3.0) + sprockets-rails + tilt + securerandom (0.4.1) select2-rails (4.0.13) - selenium-webdriver (3.14.0) - childprocess (~> 0.5) - rubyzip (~> 1.2) - sendgrid (1.2.0) + sendgrid (1.2.4) json sendgrid_toolkit (1.4.0) httparty (>= 0.7.6) - sexp_processor (4.15.2) - simplecov (0.7.1) - multi_json (~> 1.0) - simplecov-html (~> 0.7.1) - simplecov-html (0.7.1) - simplecov-rcov (0.2.3) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-html (0.13.2) + simplecov-rcov (0.3.7) simplecov (>= 0.4.1) - sinatra (1.4.8) - rack (~> 1.5) - rack-protection (~> 1.4) - tilt (>= 1.3, < 3) - slim (4.1.0) - temple (>= 0.7.6, < 0.9) - tilt (>= 2.0.6, < 2.1) + simplecov_json_formatter (0.1.4) + sinatra (4.2.1) + logger (>= 1.6.0) + mustermann (~> 3.0) + rack (>= 3.0.0, < 4) + rack-protection (= 4.2.1) + rack-session (>= 2.0.0, < 3) + tilt (~> 2.0) + slim (5.2.1) + temple (~> 0.10.0) + tilt (>= 2.1.0) slop (3.6.0) - sprockets (3.6.3) + sprockets (4.2.2) concurrent-ruby (~> 1.0) - rack (> 1, < 3) - sprockets-rails (2.3.2) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (>= 2.8, < 4.0) - stripe (5.29.1) + logger + rack (>= 2.2.4, < 4) + sprockets-rails (3.5.2) + actionpack (>= 6.1) + activesupport (>= 6.1) + sprockets (>= 3.0.0) + ssrf_filter (1.3.0) + stringio (3.2.0) + stripe (18.1.0) stud (0.0.23) - temple (0.8.2) - test-unit (3.4.0) + temple (0.10.4) + test-unit (3.7.7) power_assert - thor (1.1.0) - thread_safe (0.3.6) - tilt (2.0.10) - tzinfo (1.2.9) - thread_safe (~> 0.1) - uglifier (4.2.0) + thor (1.5.0) + tilt (2.7.0) + timeout (0.6.0) + tsort (0.2.0) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uglifier (4.2.1) execjs (>= 0.3.0, < 3) - unf (0.1.3) - unf_ext - unf_ext (0.0.7.7) - unicorn (5.8.0) + unf (0.2.0) + unicorn (6.1.0) kgio (~> 2.6) raindrops (~> 0.7) - uuidtools (2.1.2) - vegas (0.1.11) - rack (>= 1.0.0) - warden (1.2.7) - rack (>= 1.0) - webrick (1.7.0) - will_paginate (3.3.0) + uri (1.1.1) + useragent (0.16.11) + uuidtools (3.0.0) + warden (1.2.9) + rack (>= 2.0.9) + webrick (1.9.2) + websocket-driver (0.8.0) + base64 + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + will_paginate (4.0.1) xdan-datetimepicker-rails (2.5.4) jquery-rails rails (>= 3.2.16) - xml-simple (1.1.8) - xmlrpc (0.3.2) + xmlrpc (0.3.3) webrick - xpath (2.1.0) - nokogiri (~> 1.3) - zip-codes (0.2.1) + xpath (3.2.0) + nokogiri (~> 1.8) + zeitwerk (2.7.4) + zip-codes (0.3.7) PLATFORMS - ruby + aarch64-linux + aarch64-linux-gnu + aarch64-linux-musl + arm-linux-gnu + arm-linux-musl + arm64-darwin + x86_64-darwin + x86_64-linux + x86_64-linux-gnu + x86_64-linux-musl DEPENDENCIES aasm activeadmin activeadmin-searchable_select activeadmin_addons - amqp (= 0.9.8) - auto_strip_attributes (= 2.6.0) - aws-sdk (~> 1) - bcrypt (= 3.1.15) + amqp + auto_strip_attributes + aws-sdk-s3 + bcrypt best_in_place - bootstrap-sass (= 2.0.4) - bootstrap-will_paginate (= 0.0.6) - bugsnag (= 5.3.2) - capybara (= 2.13.0) - carrierwave (= 0.11.2) + bootstrap-sass + bootstrap-will_paginate + bugsnag + capybara + capybara-screenshot + carrierwave carrierwave_direct cocoon coffee-rails coffee-script-source country-select + cuprite database_cleaner devise elasticsearch - email_validator (= 1.6.0) - eventmachine (= 1.2.3) - execjs (= 1.4.0) - factory_girl_rails - faker (= 1.3.0) - faraday (= 0.9.2) - fog - fog-brightbox (= 0.11.0) + email_validator + eventmachine + execjs + factory_bot_rails + faker + faraday + fog-aws + fog-brightbox fpm geokit-rails gon haml-rails - icalendar (= 2.4.0) - influxdb (= 0.3.14) - influxdb-rails (= 0.1.12) + icalendar + influxdb + influxdb-rails iso-639 jam_ruby! jampb! - jasmine (= 1.3.1) + jasmine jquery-rails jquery-ui-rails - json (= 1.8.6) + json kickbox - launchy (= 2.4.3) - logging (= 1.7.2) - mime-types (= 1.25) + launchy + logging + mime-types net-ssh - nokogiri (= 1.10.10) - oj (= 3.1.3) - pg (= 0.17.1) - postgres-copy (= 0.6.0) - postgres_ext - protected_attributes + nokogiri + oj + pg + postgres-copy pry pry-remote pry-stack_explorer puma - rails (= 4.2.8) + rails (~> 8.0.0) rails-jquery-autocomplete - rails-observers - recurly (= 2.18.16) - redis (= 3.3.3) - redis-namespace (= 1.5.3) + recurly (~> 2.19) + redis + redis-namespace resque resque-failed-job-mailer - resque-lonely_job (~> 1.0.0) + resque-lonely_job resque-retry resque_mailer rest-client rspec-rails - ruby-prof (= 0.15.9) - ruby-protocol-buffers (= 1.2.2) - rubyzip (= 1.2.1) + ruby-prof + ruby-protocol-buffers + rubyzip sanitize - sass (= 3.5.5) - sass-rails (= 5.0.7) - sendgrid (= 1.2.0) - sendgrid_toolkit (>= 1.1.1) - simplecov (~> 0.7.1) + sass + sass-rails + sendgrid + sendgrid_toolkit + simplecov simplecov-rcov slim - sprockets (= 3.6.3) - sprockets-rails (= 2.3.2) + sprockets + sprockets-rails stripe test-unit uglifier - unf (= 0.1.3) + unf unicorn - uuidtools (= 2.1.2) + uuidtools will_paginate xmlrpc zip-codes +CHECKSUMS + aasm (5.5.2) sha256=a3b874b33d9cbb3be4a2c77185c340a07fb46d7cd31911cbc49337e31d12612f + actioncable (8.0.4) sha256=aadb2bf2977b666cfeaa7dee66fd50e147559f78a8d55f6169e913502475e09f + actionmailbox (8.0.4) sha256=ed0b634a502fb63d1ba01ae025772e9d0261b7ba12e66389c736fcf4635cd80f + actionmailer (8.0.4) sha256=3b9270d8e19f0afb534b11c52f439937dc30028adcbbae2b244f3383ce75de4b + actionpack (8.0.4) sha256=0364c7582f32c8f404725fa30d3f6853f834c5f4964afd4a072b848c8a23cddb + actiontext (8.0.4) sha256=40b3970268ac29b865685456b2586df5052d068fd0cb04acb2291e737cea2340 + actionview (8.0.4) sha256=5bd3c41ee7a59e14cf062bb5e4ee53c9a253d12fc13c8754cae368012e1a1648 + active_material (1.5.2) sha256=55e908ad6f670c7ef7f8cb397c55cc6a860242cfd447f8823ef1159da6790a68 + activeadmin (3.4.0) sha256=b4777b64868ff261d879a976c72d648c40fd081dc246d2236972d1b0008c21a2 + activeadmin-searchable_select (1.9.0) sha256=a607e96f795eba5d01bf34d3109feea3f1d86d2ae4d7e4e81eaf3f18dc33e70d + activeadmin_addons (1.10.2) sha256=e1e5e8255032de7c2ca5b4da435580400383476c2053cb689cd53a7d8b54b38f + activejob (8.0.4) sha256=cbc8a85d0e168cb90a5629c8a36fe2d08ba840103d3aed3eee0c7beb784fccce + activemodel (8.0.4) sha256=8f4e4fac3cd104b1bf30419c3745206f6f724c0e2902a939b4113f4c90730dfd + activerecord (8.0.4) sha256=bda32c171799e5ca5460447d3b7272ed14447244e2497abf2107f87fc44cbf32 + activestorage (8.0.4) sha256=47f312962fc898c1669f20cf7448d19668a5547f4a5f64e59a837d9d3f64a043 + activesupport (8.0.4) sha256=894a3a6c7733b5fae5a7df3acd76c4b563f38687df8a04fa3cbd25360f3fe95a + addressable (2.8.8) sha256=7c13b8f9536cf6364c03b9d417c19986019e28f7c00ac8132da4eb0fe393b057 + amq-protocol (2.5.0) sha256=24f22c70574f8f077254be4efd971848b4c8a4d365007a09f4cfea0f2f1860b8 + amqp (1.8.0) sha256=2f02a1152672efe0700f38fdd0efd0236fd8e78525f3d20a2838d23c385d24dc + arbre (1.7.0) sha256=20c76c26390924422407aa8eb849ae859b903a95bb9c19eb2f8e05fe1e40c83d + arr-pm (0.0.12) sha256=fdff482f75239239201f4d667d93424412639aad0b3b0ad4d827e7c637e0ad39 + auto_strip_attributes (2.6.0) sha256=a7e2e0cf744de2bcd947fd68014220702bcc88c81274c1cd9ce6f7316aae39b0 + autoprefixer-rails (10.4.21.0) sha256=71b48caf850fc25275abd96f0b1fdd51c82e1c9b99cd30085cacb05da9c70235 + aws-eventstream (1.4.0) sha256=116bf85c436200d1060811e6f5d2d40c88f65448f2125bc77ffce5121e6e183b + aws-partitions (1.1202.0) sha256=c8aa0f134a23464c61cfd00edfb4b6d968b01847a8b591d4dcc0c63a4897c301 + aws-sdk-core (3.241.3) sha256=c7c445ecf1c601c860fd537458b2eb8df0c5df01e63c371849e6594e6b1d4f47 + aws-sdk-kms (1.120.0) sha256=a206ac6f62efbe971f802e8399d2702496a5c5bc800abcf94ead87bdddfdfd80 + aws-sdk-s3 (1.211.0) sha256=2ae5feb09ff4862462824f267b76601ed16922a15de56cf51e4fa99bc5b3f519 + aws-sigv4 (1.12.1) sha256=6973ff95cb0fd0dc58ba26e90e9510a2219525d07620c8babeb70ef831826c00 + backports (3.25.3) sha256=94298d32dc3c40ca15633b54e282780b49e2db0c045f602ea1907e4f63a17235 + base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b + bcrypt (3.1.21) sha256=5964613d750a42c7ee5dc61f7b9336fb6caca429ba4ac9f2011609946e4a2dcf + benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c + best_in_place (4.0.0) sha256=daefa2ec55a7a07605a2a894bbece54c0c29086f48e00e4b703b337556cb8de4 + bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7 + binding_of_caller (1.0.1) sha256=2b2902abff4246ddcfbc4da9b69bc4a019e22aeb300c2ff6289a173d4b90b29a + bootstrap-sass (3.4.1) sha256=ba4673535eb0a8334a39a258ea8d81904832f47607069d0a1735b0937645c7df + bootstrap-will_paginate (1.0.0) sha256=a6bdb4bf303357052f586bbc963ea352c2e30f596de3eb1459b953fb95f8c20c + bugsnag (6.28.0) sha256=e53e7a6a4cd0d23284a6a04b2430b5efc1fffe34cf9e5c97e1b767507ad70696 + builder (3.3.0) sha256=497918d2f9dca528fdca4b88d84e4ef4387256d984b8154e9d5d3fe5a9c8835f + cabin (0.9.1) sha256=dcc9385af8039ba8fb6e33f0a9036e9e9fedec71c842343ce8e6101776e0322d + capybara (3.40.0) sha256=42dba720578ea1ca65fd7a41d163dd368502c191804558f6e0f71b391054aeef + capybara-screenshot (1.0.26) sha256=816b9370a07752097c82a05f568aaf5d3b7f45c3db5d3aab2014071e1b3c0c77 + carrierwave (3.1.2) sha256=6390a466836449bdf4e10fa1d98ab6323a53c8241e900110acc29d61ecad58f4 + carrierwave_direct (3.0.0) sha256=da4105ec7beea2687817b95ad95181be3d657248ec1cb5a0e5c35a45b176fc2f + childprocess (5.1.0) sha256=9a8d484be2fd4096a0e90a0cd3e449a05bc3aa33f8ac9e4d6dcef6ac1455b6ec + clamp (1.3.3) sha256=ab7487e7258098a7327b376cdb3896f3f73c663b8ce80af5cd625c699369f2cf + cocoon (1.2.15) sha256=d08f14e69653287d7a060ee43389b8c824e55191dffbca0c5c586f38ef491f0d + coderay (1.1.3) sha256=dc530018a4684512f8f38143cd2a096c9f02a1fc2459edcfe534787a7fc77d4b + coffee-rails (5.0.0) sha256=5daaa1ba51fd4907c98a333b6a9e7c1a99b1fff57fcef999b6c62d813cb91a9c + coffee-script (2.4.1) sha256=82fe281e11b93c8117b98c5ea8063e71741870f1c4fbb27177d7d6333dd38765 + coffee-script-source (1.12.2) sha256=e12b16fd8927fbbf8b87cb2e9a85a6cf457c6881cc7ff8b1af15b31f70da07a4 + concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab + connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a + country-select (1.2.1) sha256=b2275b4462d5136faff13d625ae680434401f32f747c36f19a1cf4d36bd1a55f + crass (1.0.6) sha256=dc516022a56e7b3b156099abc81b6d2b08ea1ed12676ac7a5657617f012bd45d + csv (3.3.5) sha256=6e5134ac3383ef728b7f02725d9872934f523cb40b961479f69cf3afa6c8e73f + cuprite (0.17) sha256=b140d5dc70d08b97ad54bcf45cd95d0bd430e291e9dffe76fff851fddd57c12b + database_cleaner (2.1.0) sha256=1dcba26e3b1576da692fc6bac10136a4744da5bcc293d248aae19640c65d89cd + database_cleaner-active_record (2.2.2) sha256=88296b9f3088c31f7c0d4fcec10f68e4b71c96698043916de59b04debec10388 + database_cleaner-core (2.0.1) sha256=8646574c32162e59ed7b5258a97a208d3c44551b854e510994f24683865d846c + date (3.5.1) sha256=750d06384d7b9c15d562c76291407d89e368dda4d4fff957eb94962d325a0dc0 + debug_inspector (1.2.0) sha256=9bdfa02eebc3da163833e6a89b154084232f5766087e59573b70521c77ea68a2 + devise (4.9.4) sha256=920042fe5e704c548aa4eb65ebdd65980b83ffae67feb32c697206bfd975a7f8 + diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962 + docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e + domain_name (0.6.20240107) sha256=5f693b2215708476517479bf2b3802e49068ad82167bcd2286f899536a17d933 + dotenv (2.8.1) sha256=c5944793349ae03c432e1780a2ca929d60b88c7d14d52d630db0508c3a8a17d8 + drb (2.2.3) sha256=0b00d6fdb50995fe4a45dea13663493c841112e4068656854646f418fda13373 + dry-inflector (1.3.0) sha256=441082dde958db39df7353c71e520c05732e8da9ace28c78da2d0f1d6c669fa3 + elastic-transport (8.4.1) sha256=b6300d41f26b0a9886b79e3119052ca829ef596d40a96a706d42596d23843306 + elasticsearch (9.2.0) sha256=bc5938fc84645d95f6a4655f5e08c04fc8a52de9c321623c0e66d64375a6e1de + elasticsearch-api (9.2.0) sha256=775136055d56a3d23be13a93ba8d67c5bb0ed2895f15270ca144fbc0ae920190 + email_validator (2.2.4) sha256=5ab238095bec7aef9389f230e9e0c64c5081cdf91f19d6c5cecee0a93af20604 + erb (6.0.1) sha256=28ecdd99c5472aebd5674d6061e3c6b0a45c049578b071e5a52c2a7f13c197e5 + erubi (1.13.1) sha256=a082103b0885dbc5ecf1172fede897f9ebdb745a4b97a5e8dc63953db1ee4ad9 + et-orbi (1.4.0) sha256=6c7e3c90779821f9e3b324c5e96fda9767f72995d6ae435b96678a4f3e2de8bc + eventmachine (1.2.7) sha256=994016e42aa041477ba9cff45cbe50de2047f25dd418eba003e84f0d16560972 + excon (1.3.2) sha256=a089babe98638e58042a7d542b2bbd183304527e33d612b6dde22fa491a544a5 + execjs (2.10.0) sha256=6bcb8be8f0052ff9d370b65d1c080f2406656e150452a0abdb185a133048450d + factory_bot (6.5.6) sha256=12beb373214dccc086a7a63763d6718c49769d5606f0501e0a4442676917e077 + factory_bot_rails (6.5.1) sha256=d3cc4851eae4dea8a665ec4a4516895045e710554d2b5ac9e68b94d351bc6d68 + faker (3.5.3) sha256=b961482dc0bb15ccb9a98ea7878b925669e9ae8f5e59b607da540b768137d765 + faraday (1.10.4) sha256=a384c541cde688d68bf85055723aecb4100c3fa41b53beb2011b245960ab2f19 + faraday-em_http (1.0.0) sha256=7a3d4c7079789121054f57e08cd4ef7e40ad1549b63101f38c7093a9d6c59689 + faraday-em_synchrony (1.0.1) sha256=bf3ce45dcf543088d319ab051f80985ea6d294930635b7a0b966563179f81750 + faraday-excon (1.1.0) sha256=b055c842376734d7f74350fe8611542ae2000c5387348d9ba9708109d6e40940 + faraday-httpclient (1.0.1) sha256=4c8ff1f0973ff835be8d043ef16aaf54f47f25b7578f6d916deee8399a04d33b + faraday-multipart (1.2.0) sha256=7d89a949693714176f612323ca13746a2ded204031a6ba528adee788694ef757 + faraday-net_http (1.0.2) sha256=63992efea42c925a20818cf3c0830947948541fdcf345842755510d266e4c682 + faraday-net_http_persistent (1.2.0) sha256=0b0cbc8f03dab943c3e1cc58d8b7beb142d9df068b39c718cd83e39260348335 + faraday-patron (1.0.0) sha256=dc2cd7b340bb3cc8e36bcb9e6e7eff43d134b6d526d5f3429c7a7680ddd38fa7 + faraday-rack (1.0.0) sha256=ef60ec969a2bb95b8dbf24400155aee64a00fc8ba6c6a4d3968562bcc92328c0 + faraday-retry (1.0.3) sha256=add154f4f399243cbe070806ed41b96906942e7f5259bb1fe6daf2ec8f497194 + ferrum (0.17.1) sha256=51d591120fc593e5a13b5d9d6474389f5145bb92a91e36eab147b5d096c8cbe7 + ffi (1.17.3-aarch64-linux-gnu) sha256=28ad573df26560f0aedd8a90c3371279a0b2bd0b4e834b16a2baa10bd7a97068 + ffi (1.17.3-aarch64-linux-musl) sha256=020b33b76775b1abacc3b7d86b287cef3251f66d747092deec592c7f5df764b2 + ffi (1.17.3-arm-linux-gnu) sha256=5bd4cea83b68b5ec0037f99c57d5ce2dd5aa438f35decc5ef68a7d085c785668 + ffi (1.17.3-arm-linux-musl) sha256=0d7626bb96265f9af78afa33e267d71cfef9d9a8eb8f5525344f8da6c7d76053 + ffi (1.17.3-arm64-darwin) sha256=0c690555d4cee17a7f07c04d59df39b2fba74ec440b19da1f685c6579bb0717f + ffi (1.17.3-x86_64-darwin) sha256=1f211811eb5cfaa25998322cdd92ab104bfbd26d1c4c08471599c511f2c00bb5 + ffi (1.17.3-x86_64-linux-gnu) sha256=3746b01f677aae7b16dc1acb7cb3cc17b3e35bdae7676a3f568153fb0e2c887f + ffi (1.17.3-x86_64-linux-musl) sha256=086b221c3a68320b7564066f46fed23449a44f7a1935f1fe5a245bd89d9aea56 + fog-aws (3.33.1) sha256=20c7336ed978be6cbf2765844c53f30676288af98f1cb49945aa7b7b45a799a5 + fog-brightbox (1.12.0) sha256=e51b2da93f6447efc6d34fb529a1ead217c4ce4938d1489b5701e31454c6ad01 + fog-core (2.6.0) sha256=3fe08aa83a23cddce42f4ba412040c08f890d7ff04c175c0ee59119371245be6 + fog-json (1.2.0) sha256=dd4f5ab362dbc72b687240bba9d2dd841d5dfe888a285797533f85c03ea548fe + fog-xml (0.1.5) sha256=52b9fea10701461dd3eaf9d9839702169b418dbbf50426786b9b74fade373bd6 + formatador (1.2.3) sha256=19fa898133c2c26cdbb5d09f6998c1e137ad9427a046663e55adfe18b950d894 + formtastic (5.0.0) sha256=71cc99c8227208f64da8d2b0926d97cef1e5f77e0105047cd57fddeccd3a6416 + formtastic_i18n (0.7.0) sha256=ecef51c9e9030c00f19e69d2483b77f4515c9587d74268b76cf4b6e7988c8e78 + fpm (1.17.0) sha256=a8453a2eefe995294c511282ac36b716e34273647b16450b1477c0796d8db791 + fugit (1.12.1) sha256=5898f478ede9b415f0804e42b8f3fd53f814bd85eebffceebdbc34e1107aaf68 + geokit (1.14.0) sha256=b40e2b4135f54f170707d391b7acb2764b1fb52cccd33ddc9eda2eff19c76714 + geokit-rails (2.5.0) sha256=1e08442552b2d15ce55759ee319ca1a97ccfe8842d10e90bca4fc896afaf9a1f + globalid (1.3.0) sha256=05c639ad6eb4594522a0b07983022f04aa7254626ab69445a0e493aa3786ff11 + gon (7.0.0) sha256=def3294269866a93fe069bea8a922bdf0f354f55b36accfe40ff55350ae8c554 + haml (7.1.0) sha256=aed691bddcaaf4855398b3e4dd39d8590600b0f0151f4def1c2aa83bfd444248 + haml-rails (3.0.0) sha256=091fe496a85ca521d9cac87fb50f1ecf77a57974a99aa7e267130add81a5585f + has_scope (0.9.0) sha256=783a93006cf898525bb4899696f1d088c0f6ff897d6df2bf03fdbbe0d0b5124c + http-accept (1.7.0) sha256=c626860682bfbb3b46462f8c39cd470fd7b0584f61b3cc9df5b2e9eb9972a126 + http-cookie (1.1.0) sha256=38a5e60d1527eebc396831b8c4b9455440509881219273a6c99943d29eadbb19 + httparty (0.24.0) sha256=cd93eec3d92c327df77b545e71123a38394e5ae723fb739bca18e0e75143b0ac + i18n (1.14.8) sha256=285778639134865c5e0f6269e0b818256017e8cde89993fdfcbfb64d088824a5 + icalendar (2.12.1) sha256=ecff56c550aed551f29ad1faad0da54bf62362dfaf22a428bd7ad782938fe764 + ice_cube (0.17.0) sha256=32deb45dda4b4acc53505c2f581f6d32b5afc04d29b9004769944a0df5a5fcbe + image_processing (1.14.0) sha256=754cc169c9c262980889bec6bfd325ed1dafad34f85242b5a07b60af004742fb + influxdb (0.8.1) sha256=9cb4d358bb0b0e2667a28f00d7a86bdd97716478ffd0f1a46c6a703591935ad0 + influxdb-rails (1.0.3) sha256=3ef00e0689a14f309dcc55b91ba5e0a539240e8260dbb94ede00d2689a2a2459 + inherited_resources (1.14.0) sha256=c90327c2898aa1354c0e4bc46616cb35eadef6d135746e23a83ca09987b2a308 + insist (1.0.0) sha256=6f6759eee583dc4e00a6cc3f713cfa7c570572958ba1f5d65595046d795b832f + io-console (0.8.2) sha256=d6e3ae7a7cc7574f4b8893b4fca2162e57a825b223a177b7afa236c5ef9814cc + irb (1.16.0) sha256=2abe56c9ac947cdcb2f150572904ba798c1e93c890c256f8429981a7675b0806 + iso-639 (0.3.8) sha256=48b8104a4b55367fda347609e36ef8eeb3a0b4d048b36365371c274958be7535 + jam_ruby (0.1.1) + jampb (0.1.1) + jasmine (3.99.0) sha256=f76416a099adbad1055df013735f3e510d121a8ca530680f78fc8dd0463ef755 + jasmine-core (3.99.0) sha256=a8290894b4fce6de47fa53f0abc578e6592da65e3de9069de0744d4300451178 + jmespath (1.6.2) sha256=238d774a58723d6c090494c8879b5e9918c19485f7e840f2c1c7532cf84ebcb1 + jquery-rails (4.6.1) sha256=619f3496cdcdeaae1fd6dafa52dbac3fc45b745d4e09712da4184a16b3a8d9c0 + jquery-ui-rails (8.0.0) sha256=e198f0ccd84587bc1030e79333db5fdb1100c8d459ed378ff285f57720f6b9c9 + json (2.18.0) sha256=b10506aee4183f5cf49e0efc48073d7b75843ce3782c68dbeb763351c08fd505 + kaminari (1.2.2) sha256=c4076ff9adccc6109408333f87b5c4abbda5e39dc464bd4c66d06d9f73442a3e + kaminari-actionview (1.2.2) sha256=1330f6fc8b59a4a4ef6a549ff8a224797289ebf7a3a503e8c1652535287cc909 + kaminari-activerecord (1.2.2) sha256=0dd3a67bab356a356f36b3b7236bcb81cef313095365befe8e98057dd2472430 + kaminari-core (1.2.2) sha256=3bd26fec7370645af40ca73b9426a448d09b8a8ba7afa9ba3c3e0d39cdbb83ff + kgio (2.11.4) sha256=bda7a2146115998a5b07154e708e0ac02c38dcee7e793c33e2e14f600fdfffc6 + kickbox (2.0.5) sha256=aeac500f6e86c34938a779da1687321419367d9ae5b303cd87e75730088183d0 + launchy (3.1.1) sha256=72b847b5cc961589dde2c395af0108c86ff0119f42d4648d25b5440ebb10059e + little-plugger (1.1.4) sha256=d5f347c00d9d648040ef7c17d6eb09d3d0719adf19ca30d1a3b6fb26d0a631bb + logger (1.7.0) sha256=196edec7cc44b66cfb40f9755ce11b392f21f7967696af15d274dde7edff0203 + logging (2.4.0) sha256=ba8893a3c211b836f4131bb93b3eb3137a0c3b1fcd0ec3d570e324d8bdc00ccb + loofah (2.25.0) sha256=df5ed7ac3bac6a4ec802df3877ee5cc86d027299f8952e6243b3dac446b060e6 + mail (2.9.0) sha256=6fa6673ecd71c60c2d996260f9ee3dd387d4673b8169b502134659ece6d34941 + marcel (1.0.4) sha256=0d5649feb64b8f19f3d3468b96c680bae9746335d02194270287868a661516a4 + matrix (0.4.3) sha256=a0d5ab7ddcc1973ff690ab361b67f359acbb16958d1dc072b8b956a286564c5b + method_source (1.1.0) sha256=181301c9c45b731b4769bc81e8860e72f9161ad7d66dd99103c9ab84f560f5c5 + mime-types (3.7.0) sha256=dcebf61c246f08e15a4de34e386ebe8233791e868564a470c3fe77c00eed5e56 + mime-types-data (3.2025.0924) sha256=f276bca15e59f35767cbcf2bc10e023e9200b30bd6a572c1daf7f4cc24994728 + mini_magick (5.3.1) sha256=29395dfd76badcabb6403ee5aff6f681e867074f8f28ce08d78661e9e4a351c4 + mini_mime (1.1.5) sha256=8681b7e2e4215f2a159f9400b5816d85e9d8c6c6b491e96a12797e798f8bccef + minitest (6.0.1) sha256=7854c74f48e2e975969062833adc4013f249a4b212f5e7b9d5c040bf838d54bb + mono_logger (1.1.2) sha256=2e359def7007f5c908aadd953687991fe667995d14ae5f0d10dda76e3e8670f7 + multi_json (1.19.1) sha256=7aefeff8f2c854bf739931a238e4aea64592845e0c0395c8a7d2eea7fdd631b7 + multi_xml (0.8.1) sha256=addba0290bac34e9088bfe73dc4878530297a82a7bbd66cb44dcd0a4b86edf5a + multipart-post (2.4.1) sha256=9872d03a8e552020ca096adadbf5e3cb1cd1cdd6acd3c161136b8a5737cdb4a8 + mustache (0.99.8) sha256=826a96db895819c13fffa4fa3c20b85e80b60aaec1f28f79e7db80092abdb0bc + mustermann (3.0.4) sha256=85fadcb6b3c6493a8b511b42426f904b7f27b282835502233dd154daab13aa22 + net-imap (0.6.2) sha256=08caacad486853c61676cca0c0c47df93db02abc4a8239a8b67eb0981428acc6 + net-pop (0.1.2) sha256=848b4e982013c15b2f0382792268763b748cce91c9e91e36b0f27ed26420dff3 + net-protocol (0.2.2) sha256=aa73e0cba6a125369de9837b8d8ef82a61849360eba0521900e2c3713aa162a8 + net-smtp (0.5.1) sha256=ed96a0af63c524fceb4b29b0d352195c30d82dd916a42f03c62a3a70e5b70736 + net-ssh (7.3.0) sha256=172076c4b30ce56fb25a03961b0c4da14e1246426401b0f89cba1a3b54bf3ef0 + netrc (0.11.0) sha256=de1ce33da8c99ab1d97871726cba75151113f117146becbe45aa85cb3dabee3f + nio4r (2.7.5) sha256=6c90168e48fb5f8e768419c93abb94ba2b892a1d0602cb06eef16d8b7df1dca1 + nokogiri (1.19.0-aarch64-linux-gnu) sha256=11a97ecc3c0e7e5edcf395720b10860ef493b768f6aa80c539573530bc933767 + nokogiri (1.19.0-aarch64-linux-musl) sha256=eb70507f5e01bc23dad9b8dbec2b36ad0e61d227b42d292835020ff754fb7ba9 + nokogiri (1.19.0-arm-linux-gnu) sha256=572a259026b2c8b7c161fdb6469fa2d0edd2b61cd599db4bbda93289abefbfe5 + nokogiri (1.19.0-arm-linux-musl) sha256=23ed90922f1a38aed555d3de4d058e90850c731c5b756d191b3dc8055948e73c + nokogiri (1.19.0-arm64-darwin) sha256=0811dfd936d5f6dd3f6d32ef790568bf29b2b7bead9ba68866847b33c9cf5810 + nokogiri (1.19.0-x86_64-darwin) sha256=1dad56220b603a8edb9750cd95798bffa2b8dd9dd9aa47f664009ee5b43e3067 + nokogiri (1.19.0-x86_64-linux-gnu) sha256=f482b95c713d60031d48c44ce14562f8d2ce31e3a9e8dd0ccb131e9e5a68b58c + nokogiri (1.19.0-x86_64-linux-musl) sha256=1c4ca6b381622420073ce6043443af1d321e8ed93cc18b08e2666e5bd02ffae4 + oj (3.16.13) sha256=b114bcb83ef884f1736b3112108f77cf9ca90aa8111a775318cc5d7a6a1e0303 + orm_adapter (0.5.0) sha256=aa5d0be5d540cbb46d3a93e88061f4ece6a25f6e97d6a47122beb84fe595e9b9 + ostruct (0.6.3) sha256=95a2ed4a4bd1d190784e666b47b2d3f078e4a9efda2fccf18f84ddc6538ed912 + pg (1.6.3) sha256=1388d0563e13d2758c1089e35e973a3249e955c659592d10e5b77c468f628a99 + pg (1.6.3-aarch64-linux) sha256=0698ad563e02383c27510b76bf7d4cd2de19cd1d16a5013f375dd473e4be72ea + pg (1.6.3-aarch64-linux-musl) sha256=06a75f4ea04b05140146f2a10550b8e0d9f006a79cdaf8b5b130cde40e3ecc2c + pg (1.6.3-arm64-darwin) sha256=7240330b572e6355d7c75a7de535edb5dfcbd6295d9c7777df4d9dddfb8c0e5f + pg (1.6.3-x86_64-darwin) sha256=ee2e04a17c0627225054ffeb43e31a95be9d7e93abda2737ea3ce4a62f2729d6 + pg (1.6.3-x86_64-linux) sha256=5d9e188c8f7a0295d162b7b88a768d8452a899977d44f3274d1946d67920ae8d + pg (1.6.3-x86_64-linux-musl) sha256=9c9c90d98c72f78eb04c0f55e9618fe55d1512128e411035fe229ff427864009 + phantomjs (2.1.1.0) sha256=b392cfba33d374285d022c905c714948fc1a69d162cd17cfea39b684fd5a1779 + pleaserun (0.0.33) sha256=a61ecd4ac6956dc44a7992ccbd9e4c979d7cd3a25af5ec7cc5b1f17424ffb73f + postgres-copy (1.7.2) sha256=29d85ee2c29c0a9ec76ba02866038343a2d6a4de2aed6056065e4b49b36f22af + power_assert (3.0.1) sha256=8ce9876716cc74e863fcd4cdcdc52d792bd983598d1af3447083a3a9a4d34103 + pp (0.6.3) sha256=2951d514450b93ccfeb1df7d021cae0da16e0a7f95ee1e2273719669d0ab9df6 + prettyprint (0.2.0) sha256=2bc9e15581a94742064a3cc8b0fb9d45aae3d03a1baa6ef80922627a0766f193 + prism (1.7.0) sha256=10062f734bf7985c8424c44fac382ac04a58124ea3d220ec3ba9fe4f2da65103 + pry (0.16.0) sha256=d76c69065698ed1f85e717bd33d7942c38a50868f6b0673c636192b3d1b6054e + pry-remote (0.1.8) sha256=d59e065bfe13f3793200761a1303653497679e62815f979ec76517cf66e6e181 + pry-stack_explorer (0.6.1) sha256=a2dbea9b47c4ad00cf5c1ce21499f8128b915089e90015f7bafb6e9453baf340 + psych (5.3.1) sha256=eb7a57cef10c9d70173ff74e739d843ac3b2c019a003de48447b2963d81b1974 + public_suffix (7.0.2) sha256=9114090c8e4e7135c1fd0e7acfea33afaab38101884320c65aaa0ffb8e26a857 + puma (7.1.0) sha256=e45c10cb124f224d448c98db653a75499794edbecadc440ad616cf50f2fd49dd + raabro (1.4.0) sha256=d4fa9ff5172391edb92b242eed8be802d1934b1464061ae5e70d80962c5da882 + racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f + rack (3.2.4) sha256=5d74b6f75082a643f43c1e76b419c40f0e5527fcfee1e669ac1e6b73c0ccb6f6 + rack-protection (4.2.1) sha256=cf6e2842df8c55f5e4d1a4be015e603e19e9bc3a7178bae58949ccbb58558bac + rack-session (2.1.1) sha256=0b6dc07dea7e4b583f58a48e8b806d4c9f1c6c9214ebc202ec94562cbea2e4e9 + rack-test (2.2.0) sha256=005a36692c306ac0b4a9350355ee080fd09ddef1148a5f8b2ac636c720f5c463 + rackup (2.3.1) sha256=6c79c26753778e90983761d677a48937ee3192b3ffef6bc963c0950f94688868 + rails (8.0.4) sha256=364494a32d2dc3f9d5c135d036ce47e7776684bc6add73f1037ac2b1007962db + rails-dom-testing (2.3.0) sha256=8acc7953a7b911ca44588bf08737bc16719f431a1cc3091a292bca7317925c1d + rails-html-sanitizer (1.6.2) sha256=35fce2ca8242da8775c83b6ba9c1bcaad6751d9eb73c1abaa8403475ab89a560 + rails-jquery-autocomplete (1.0.5) sha256=9f842570f784c4cb28826af3f49502670c700731b6e70aadb0d3fe17ae4d7089 + railties (8.0.4) sha256=8203d853dcffab4abcdd05c193f101676a92068075464694790f6d8f72d5cb47 + raindrops (0.20.1) sha256=aa0eb9ff6834f2d9e232ba688bd49cb30be893bc5a3452e74722c94c1fab4730 + rake (13.3.1) sha256=8c9e89d09f66a26a01264e7e3480ec0607f0c497a861ef16063604b1b08eb19c + ransack (4.4.1) sha256=6aeaac36fc19088570e10da1044e6cfd88c740e20f871b84566fd30e32b7a63d + rb-fsevent (0.11.2) sha256=43900b972e7301d6570f64b850a5aa67833ee7d87b458ee92805d56b7318aefe + rb-inotify (0.11.1) sha256=a0a700441239b0ff18eb65e3866236cd78613d6b9f78fea1f9ac47a85e47be6e + rdoc (7.0.3) sha256=dfe3d0981d19b7bba71d9dbaeb57c9f4e3a7a4103162148a559c4fc687ea81f9 + recurly (2.20.5) sha256=307c2f1d9307db6e69839f3b5eb978265f27c44aa2a3819fc59ea23a47a560f6 + redcarpet (3.6.1) sha256=d444910e6aa55480c6bcdc0cdb057626e8a32c054c29e793fa642ba2f155f445 + redis (5.4.1) sha256=b5e675b57ad22b15c9bcc765d5ac26f60b675408af916d31527af9bd5a81faae + redis-client (0.26.3) sha256=37a95ca193b7a79f350c09fe5e696dc15d1701195d559d031a107ab725effc49 + redis-namespace (1.11.0) sha256=e91a1aa2b2d888b6dea1d4ab8d39e1ae6fac3426161feb9d91dd5cca598a2239 + regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4 + reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835 + require_all (3.0.0) sha256=937853faa2833388eab551107bf7bf87c6bba6b4800bac5ce469eda7b6a9fed0 + responders (3.2.0) sha256=89c2d6ac0ae16f6458a11524cae4a8efdceba1a3baea164d28ee9046bd3df55a + resque (2.7.0) sha256=685fdc8889b0a649183ff9b23c96817f42a1e1d47c0ea64c77c5e1dd69b961b0 + resque-failed-job-mailer (0.0.3) sha256=3e9175c19e947a173ae8d60b44d4324e78434a39d89ec2e173f8a7fc1a431536 + resque-lonely_job (1.1.3) sha256=b646cd9a872a45cdca41d0179d25d34e4fa03ede28587a948a1346c80761e7e9 + resque-retry (1.8.1) sha256=a1c1a910619a3484a35a8294e0b190e577156090735d4083078f2a4ff87ff728 + resque-scheduler (4.11.0) sha256=4e8bf3acdccc2cfe02141d2717fc03dc6e0cdd887c0d6c0fa92b394aa70f32a1 + resque_mailer (2.4.3) sha256=7b9ee5796f090ce4b546bc9e41ef303974d762366b6b5ed50a45e4dc96642f17 + rest-client (2.1.0) sha256=35a6400bdb14fae28596618e312776c158f7ebbb0ccad752ff4fa142bf2747e3 + rexml (3.4.4) sha256=19e0a2c3425dfbf2d4fc1189747bdb2f849b6c5e74180401b15734bc97b5d142 + rspec-core (3.13.6) sha256=a8823c6411667b60a8bca135364351dda34cd55e44ff94c4be4633b37d828b2d + rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836 + rspec-mocks (3.13.7) sha256=0979034e64b1d7a838aaaddf12bf065ea4dc40ef3d4c39f01f93ae2c66c62b1c + rspec-rails (8.0.2) sha256=113139a53f5d068d4f48d1c29ad5f982013ed9b0daa69d7f7b266eda5d433ace + rspec-support (3.13.6) sha256=2e8de3702427eab064c9352fe74488cc12a1bfae887ad8b91cba480ec9f8afb2 + ruby-prof (1.7.2) sha256=270424fcac37e611f2d15a55226c4628e234f8434e1d7c25ca8a2155b9fc4340 + ruby-protocol-buffers (1.6.1) sha256=673c98e88527d06d1332a17e7d16f021e3653ce9e7565b42ef9901dc7ede3446 + ruby-vips (2.3.0) sha256=e685ec02c13969912debbd98019e50492e12989282da5f37d05f5471442f5374 + ruby2_keywords (0.0.5) sha256=ffd13740c573b7301cf7a2e61fc857b2a8e3d3aff32545d6f8300d8bae10e3ef + rubyzip (3.2.2) sha256=c0ed99385f0625415c8f05bcae33fe649ed2952894a95ff8b08f26ca57ea5b3c + rufus-scheduler (3.9.2) sha256=55fa9e4db0ff69d7f38c804f17baba0c9bce5cba39984ae3c5cf6c039d1323b9 + sanitize (7.0.0) sha256=269d1b9d7326e69307723af5643ec032ff86ad616e72a3b36d301ac75a273984 + sass (3.7.4) sha256=808b0d39053aa69068df939e24671fe84fd5a9d3314486e1a1457d0934a4255d + sass-listen (4.0.0) sha256=ae9dcb76dd3e234329e5ba6e213f48e532c5a3e7b0b4d8a87f13aaca0cc18377 + sass-rails (6.0.0) sha256=e0b6448ea1c7929fd5929fc7a8eb2d78045e44cc82fc0765a249d3fa1c5810d3 + sassc (2.4.0) sha256=4c60a2b0a3b36685c83b80d5789401c2f678c1652e3288315a1551d811d9f83e + sassc-rails (2.1.2) sha256=5f4fdf3881fc9bdc8e856ffbd9850d70a2878866feae8114aa45996179952db5 + securerandom (0.4.1) sha256=cc5193d414a4341b6e225f0cb4446aceca8e50d5e1888743fac16987638ea0b1 + select2-rails (4.0.13) sha256=52e39a9bef669f98a9454303ed8ea51f5e31c80a2d39ff1aa1dced36a858e70c + sendgrid (1.2.4) sha256=bd17cada3703b8a7f19287aff4eb25442f51e22fd4e448228c3eb7ecfd58e362 + sendgrid_toolkit (1.4.0) sha256=7450913d1b9fcdc0618e0cab8ba91c5ae71863a273064b506fdfe34cf27cda52 + simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5 + simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246 + simplecov-rcov (0.3.7) sha256=372f50bf6df6b6350b7d0c840f2f8bdabe021861a43c26877b747c9ac96139fc + simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428 + sinatra (4.2.1) sha256=b7aeb9b11d046b552972ade834f1f9be98b185fa8444480688e3627625377080 + slim (5.2.1) sha256=72351dff7e2ff20e2d5c393cfc385bb9142cef5db059141628fd7163ac3c13e7 + slop (3.6.0) sha256=76ccab03be66bfcab4838cdc07cab019cd3e192a3538266246749e79e4788803 + sprockets (4.2.2) sha256=761e5a49f1c288704763f73139763564c845a8f856d52fba013458f8af1b59b1 + sprockets-rails (3.5.2) sha256=a9e88e6ce9f8c912d349aa5401509165ec42326baf9e942a85de4b76dbc4119e + ssrf_filter (1.3.0) sha256=66882d7de7d09c019098d6d7372412950ae184ebbc7c51478002058307aba6f2 + stringio (3.2.0) sha256=c37cb2e58b4ffbd33fe5cd948c05934af997b36e0b6ca6fdf43afa234cf222e1 + stripe (18.1.0) sha256=5f776fb65db442f1ba7401dc100945a2852b3714103c9aac27fa93fb33e2ee72 + stud (0.0.23) sha256=6ba26fa28fc50a8d59229b296a733b48d50f1473b1e3e7f5e339d5bbd829eb62 + temple (0.10.4) sha256=b7a1e94b6f09038ab0b6e4fe0126996055da2c38bec53a8a336f075748fff72c + test-unit (3.7.7) sha256=3c89d5ff0690a16bef9946156c4624390402b9d54dfcf4ce9cbd5b06bead1e45 + thor (1.5.0) sha256=e3a9e55fe857e44859ce104a84675ab6e8cd59c650a49106a05f55f136425e73 + tilt (2.7.0) sha256=0d5b9ba69f6a36490c64b0eee9f6e9aad517e20dcc848800a06eb116f08c6ab3 + timeout (0.6.0) sha256=6d722ad619f96ee383a0c557ec6eb8c4ecb08af3af62098a0be5057bf00de1af + tsort (0.2.0) sha256=9650a793f6859a43b6641671278f79cfead60ac714148aabe4e3f0060480089f + tzinfo (2.0.6) sha256=8daf828cc77bcf7d63b0e3bdb6caa47e2272dcfaf4fbfe46f8c3a9df087a829b + uglifier (4.2.1) sha256=75d42b81b10bfd21e7a427fabb1d49ff5ea7bda3c4a5039ddb2a78d194c6f5aa + unf (0.2.0) sha256=e6bcc2e101d80e3f9459753db747d5926aada1aaaf61e629e93359da9a5b04ab + unicorn (6.1.0) sha256=45dd987add4c2b084c1880a68373af42797a704ad7441faff9b14b4982aa0fc0 + uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6 + useragent (0.16.11) sha256=700e6413ad4bb954bb63547fa098dddf7b0ebe75b40cc6f93b8d54255b173844 + uuidtools (3.0.0) sha256=47a3d4d20e728f522c675be8bc4e001252db39864c97deb194dc543b153a4be8 + warden (1.2.9) sha256=46684f885d35a69dbb883deabf85a222c8e427a957804719e143005df7a1efd0 + webrick (1.9.2) sha256=beb4a15fc474defed24a3bda4ffd88a490d517c9e4e6118c3edce59e45864131 + websocket-driver (0.8.0) sha256=ed0dba4b943c22f17f9a734817e808bc84cdce6a7e22045f5315aa57676d4962 + websocket-extensions (0.1.5) sha256=1c6ba63092cda343eb53fc657110c71c754c56484aad42578495227d717a8241 + will_paginate (4.0.1) sha256=107b226ebe1d393d274575956a7c472e1eefdd97d8828e01b72d425d15a875b9 + xdan-datetimepicker-rails (2.5.4) sha256=d69594c4268228cf85a195846dca98680385a1dbd93fda4c622fccb506974674 + xmlrpc (0.3.3) sha256=ec3d46bc63a44920ac2d67c49399fd493295ff98cb96adf25e59eaa718b38e3b + xpath (3.2.0) sha256=6dfda79d91bb3b949b947ecc5919f042ef2f399b904013eb3ef6d20dd3a4082e + zeitwerk (2.7.4) sha256=2bef90f356bdafe9a6c2bd32bcd804f83a4f9b8bc27f3600fff051eb3edcec8b + zip-codes (0.3.7) sha256=ef1f977011c7becc7b8b4e8da4d6526923557bda95451eba9ace26d2dfef8901 + RUBY VERSION - ruby 2.4.1p111 + ruby 3.4.8 BUNDLED WITH - 1.17.3 + 4.0.3 diff --git a/admin/log/.gitkeep b/admin/log/.gitkeep deleted file mode 100644 index e69de29bb..000000000 diff --git a/admin/spec/factories.rb b/admin/spec/factories.rb index d55e7277b..82e0ff84e 100644 --- a/admin/spec/factories.rb +++ b/admin/spec/factories.rb @@ -1,47 +1,47 @@ -FactoryGirl.define do +FactoryBot.define do factory :user, :class => JamRuby::User do sequence(:email) { |n| "person_#{n}@example.com"} sequence(:first_name) { |n| "Person" } sequence(:last_name) { |n| "#{n}" } - password "foobar" - password_confirmation "foobar" - email_confirmed true - musician true - city "Apex" - state "NC" - country "US" - terms_of_service true - reuse_card true + password { "foobar" } + password_confirmation { "foobar" } + email_confirmed { true } + musician { true } + city { "Apex" } + state { "NC" } + country { "US" } + terms_of_service { true } + reuse_card { true } factory :admin do - admin true + admin { true } end before(:create) do |user| - user.musician_instruments << FactoryGirl.build(:musician_instrument, player: user) + user.musician_instruments << FactoryBot.build(:musician_instrument, player: user) end factory :single_user_session do after(:create) do |user, evaluator| - music_session = FactoryGirl.create(:active_music_session, :creator => user) - connection = FactoryGirl.create(:connection, :user => user, :music_session => music_session) + music_session = FactoryBot.create(:active_music_session, :creator => user) + connection = FactoryBot.create(:connection, :user => user, :music_session => music_session) end end end factory :connection, :class => JamRuby::Connection do sequence(:client_id) { |n| "Client#{n}" } - ip_address "1.1.1.1" - as_musician true - addr 0 - locidispid 0 - client_type 'client' - gateway 'gateway1' - scoring_timeout Time.now + ip_address { "1.1.1.1" } + as_musician { true } + addr { 0 } + locidispid { 0 } + client_type { 'client' } + gateway { 'gateway1' } + scoring_timeout { Time.now } sequence(:channel_id) { |n| "Channel#{n}"} association :user, factory: :user - metronome_open false + metronome_open { false } end factory :artifact_update, :class => JamRuby::ArtifactUpdate do @@ -54,8 +54,8 @@ FactoryGirl.define do factory :musician_instrument, :class=> JamRuby::MusicianInstrument do instrument { Instrument.find('electric guitar') } - proficiency_level 1 - priority 0 + proficiency_level { 1 } + priority { 0 } end factory :instrument, :class => JamRuby::Instrument do @@ -69,25 +69,25 @@ FactoryGirl.define do factory :music_session, :class => JamRuby::MusicSession do sequence(:name) { |n| "Music Session #{n}" } sequence(:description) { |n| "Music Session Description #{n}" } - fan_chat true - fan_access true - approval_required false - musician_access true - legal_terms true - language 'eng' - legal_policy 'standard' - timezone 'UTC,Etc/UTC' - open_rsvps true - scheduled_start Time.now - scheduled_duration 3600 - genre JamRuby::Genre.first + fan_chat { true } + fan_access { true } + approval_required { false } + musician_access { true } + legal_terms { true } + language { 'eng' } + legal_policy { 'standard' } + timezone { 'UTC,Etc/UTC' } + open_rsvps { true } + scheduled_start { Time.now } + scheduled_duration { 3600 } + genre { JamRuby::Genre.first } association :creator, :factory => :user end factory :music_session_user_history, :class => JamRuby::MusicSessionUserHistory do transient do - history nil - user nil + history { nil } + user { nil } end music_session_id { history.id } @@ -96,14 +96,14 @@ FactoryGirl.define do end factory :recorded_track, :class => JamRuby::RecordedTrack do - instrument JamRuby::Instrument.first - sound 'stereo' + instrument { JamRuby::Instrument.first } + sound { 'stereo' } sequence(:client_id) { |n| "client_id-#{n}"} sequence(:track_id) { |n| "track_id-#{n}"} sequence(:client_track_id) { |n| "client_track_id-#{n}"} - md5 'abc' - length 1 - fully_uploaded true + md5 { 'abc' } + length { 1 } + fully_uploaded { true } association :user, factory: :user association :recording, factory: :recording end @@ -115,7 +115,7 @@ FactoryGirl.define do factory :recording_with_track do before(:create) { |recording, evaluator| - recording.recorded_tracks << FactoryGirl.create(:recorded_track, recording: recording, user: evaluator.owner) + recording.recorded_tracks << FactoryBot.create(:recorded_track, recording: recording, user: evaluator.owner) } end end @@ -123,38 +123,38 @@ FactoryGirl.define do factory :claimed_recording, :class => JamRuby::ClaimedRecording do sequence(:name) { |n| "name-#{n}" } sequence(:description) { |n| "description-#{n}" } - is_public true + is_public { true } association :genre, factory: :genre association :user, factory: :user before(:create) { |claimed_recording| - claimed_recording.recording = FactoryGirl.create(:recording_with_track, owner: claimed_recording.user) + claimed_recording.recording = FactoryBot.create(:recording_with_track, owner: claimed_recording.user) } end factory :mix, :class => JamRuby::Mix do - started_at Time.now - completed_at Time.now - ogg_md5 'abc' - ogg_length 1 + started_at { Time.now } + completed_at { Time.now } + ogg_md5 { 'abc' } + ogg_length { 1 } sequence(:ogg_url) { |n| "recordings/ogg/#{n}" } - mp3_md5 'abc' - mp3_length 1 + mp3_md5 { 'abc' } + mp3_length { 1 } sequence(:mp3_url) { |n| "recordings/mp3/#{n}" } - completed true + completed { true } before(:create) {|mix| - user = FactoryGirl.create(:user) - mix.recording = FactoryGirl.create(:recording_with_track, owner: user) - mix.recording.claimed_recordings << FactoryGirl.create(:claimed_recording, user: user, recording: mix.recording) + user = FactoryBot.create(:user) + mix.recording = FactoryBot.create(:recording_with_track, owner: user) + mix.recording.claimed_recordings << FactoryBot.create(:claimed_recording, user: user, recording: mix.recording) } end factory :diagnostic, :class => JamRuby::Diagnostic do - type JamRuby::Diagnostic::NO_HEARTBEAT_ACK - creator JamRuby::Diagnostic::CLIENT - data Faker::Lorem.sentence + type { JamRuby::Diagnostic::NO_HEARTBEAT_ACK } + creator { JamRuby::Diagnostic::CLIENT } + data { Faker::Lorem.sentence } association :user, factory: :user end @@ -163,20 +163,20 @@ FactoryGirl.define do association :creator, factory: :user transient do - name "My Music Session" - description "Come Music Session" - fan_chat true - fan_access true - approval_required false - musician_access true - legal_terms true - genre JamRuby::Genre.first - band nil + name { "My Music Session" } + description { "Come Music Session" } + fan_chat { true } + fan_access { true } + approval_required { false } + musician_access { true } + legal_terms { true } + genre { JamRuby::Genre.first } + band { nil } end before(:create) do |session, evaluator| - music_session = FactoryGirl.create(:music_session, name: evaluator.name, description: evaluator.description, fan_chat: evaluator.fan_chat, + music_session = FactoryBot.create(:music_session, name: evaluator.name, description: evaluator.description, fan_chat: evaluator.fan_chat, fan_access: evaluator.fan_access, approval_required: evaluator.approval_required, musician_access: evaluator.musician_access, genre: evaluator.genre, creator: evaluator.creator, band: evaluator.band) session.id = music_session.id @@ -184,7 +184,7 @@ FactoryGirl.define do factory :active_music_session do after(:create) { |session| - FactoryGirl.create(:music_session_user_history, :history => session.music_session, :user => session.creator) + FactoryBot.create(:music_session_user_history, :history => session.music_session, :user => session.creator) } factory :music_session_with_mount do @@ -195,15 +195,15 @@ FactoryGirl.define do factory :latency_tester, :class => JamRuby::LatencyTester do transient do - connection nil - make_connection true + connection { nil } + make_connection { true } end sequence(:client_id) { |n| "LatencyTesterClientId-#{n}" } after(:create) do |latency_tester, evaluator| latency_tester.connection = evaluator.connection if evaluator.connection - latency_tester.connection = FactoryGirl.create(:connection, client_type: Connection::TYPE_LATENCY_TESTER, client_id: latency_tester.client_id) if evaluator.make_connection + latency_tester.connection = FactoryBot.create(:connection, client_type: Connection::TYPE_LATENCY_TESTER, client_id: latency_tester.client_id) if evaluator.make_connection latency_tester.save end end @@ -226,30 +226,30 @@ FactoryGirl.define do sequence(:name) { |n| "jam-track-#{n}" } sequence(:description) { |n| "description-#{n}" } sequence(:slug) { |n| "slug-#{n}" } - time_signature '4/4' - status 'Production' - recording_type 'Cover' + time_signature { '4/4' } + status { 'Production' } + recording_type { 'Cover' } sequence(:original_artist) { |n| "original-artist-#{n}" } sequence(:songwriter) { |n| "songwriter-#{n}" } sequence(:publisher) { |n| "publisher-#{n}" } - pro 'ASCAP' - sales_region 'United States' - price 1.99 - reproduction_royalty true - public_performance_royalty true - reproduction_royalty_amount 0.999 - licensor_royalty_amount 0.999 - pro_royalty_amount 0.999 + pro { 'ASCAP' } + sales_region { 'United States' } + price { 1.99 } + reproduction_royalty { true } + public_performance_royalty { true } + reproduction_royalty_amount { 0.999 } + licensor_royalty_amount { 0.999 } + pro_royalty_amount { 0.999 } - genre JamRuby::Genre.first + genre { JamRuby::Genre.first } association :licensor, factory: :jam_track_licensor end factory :jam_track_track, :class => JamRuby::JamTrackTrack do - position 1 - part 'lead guitar' - track_type 'Track' - instrument JamRuby::Instrument.find('electric guitar') + position { 1 } + part { 'lead guitar' } + track_type { 'Track' } + instrument { JamRuby::Instrument.find('electric guitar') } association :jam_track, factory: :jam_track end diff --git a/admin/spec/features/artifact_updates_spec.rb b/admin/spec/features/artifact_updates_spec.rb index fb0b031cb..2443e3103 100644 --- a/admin/spec/features/artifact_updates_spec.rb +++ b/admin/spec/features/artifact_updates_spec.rb @@ -7,7 +7,7 @@ describe "Artifact Update" do subject { page } - let(:user) { FactoryGirl.create(:admin) } + let(:user) { FactoryBot.create(:admin) } before { sign_in user } describe "crud" do @@ -20,11 +20,11 @@ describe "Artifact Update" do before do visit new_admin_artifact_path - fill_in "artifacts_version", with: "1" - fill_in "artifacts_environment", with: "public" - select('JamClient/Win32', from: "artifacts_product") - fill_in "artifacts_environment", with: "public" - attach_file("artifacts_uri", ARTIFACT_FILE) + fill_in "jam_ruby_artifact_update_version", with: "1" + fill_in "jam_ruby_artifact_update_environment", with: "public" + select('JamClient/Win32', from: "jam_ruby_artifact_update_product") + fill_in "jam_ruby_artifact_update_environment", with: "public" + attach_file("jam_ruby_artifact_update_uri", ARTIFACT_FILE) click_button "Create Artifact update" end diff --git a/admin/spec/features/feeds_spec.rb b/admin/spec/features/feeds_spec.rb index 3e4995840..dad45b0c5 100644 --- a/admin/spec/features/feeds_spec.rb +++ b/admin/spec/features/feeds_spec.rb @@ -11,12 +11,12 @@ describe 'Feeds' do User.delete_all end - let(:admin) { FactoryGirl.create(:admin) } - let(:user) { FactoryGirl.create(:user) } + let(:admin) { FactoryBot.create(:admin) } + let(:user) { FactoryBot.create(:user) } - let(:music_session) { FactoryGirl.create(:music_session, :creator => user) } - let(:recording) { FactoryGirl.create(:recording_with_track, :owner => user) } - let(:diagnostic) { FactoryGirl.create(:diagnostic, :user => user) } + let(:music_session) { FactoryBot.create(:music_session, :creator => user) } + let(:recording) { FactoryBot.create(:recording_with_track, :owner => user) } + let(:diagnostic) { FactoryBot.create(:diagnostic, :user => user) } context 'empty dashboard' do before(:each) do diff --git a/admin/spec/features/invited_users_spec.rb b/admin/spec/features/invited_users_spec.rb index 2e621d00c..4a38cfd24 100644 --- a/admin/spec/features/invited_users_spec.rb +++ b/admin/spec/features/invited_users_spec.rb @@ -5,7 +5,7 @@ describe InvitedUser do subject { page } # create an administrative user - let(:user) { FactoryGirl.create(:admin) } + let(:user) { FactoryBot.create(:admin) } before { sign_in user } diff --git a/admin/spec/features/latency_testers_spec.rb b/admin/spec/features/latency_testers_spec.rb index 16e72fa9a..811c92639 100644 --- a/admin/spec/features/latency_testers_spec.rb +++ b/admin/spec/features/latency_testers_spec.rb @@ -9,7 +9,7 @@ describe 'Feeds' do describe "latency_tester with connection" do - let!(:latency_tester) {FactoryGirl.create(:latency_tester)} + let!(:latency_tester) {FactoryBot.create(:latency_tester)} before(:each) do visit admin_latency_testers_path @@ -21,7 +21,7 @@ describe 'Feeds' do end describe "latency_tester with no connection" do - let!(:latency_tester) {FactoryGirl.create(:latency_tester, client_id: 'abc', make_connection: false)} + let!(:latency_tester) {FactoryBot.create(:latency_tester, client_id: 'abc', make_connection: false)} before(:each) do visit admin_latency_testers_path diff --git a/admin/spec/spec_helper.rb b/admin/spec/spec_helper.rb index a2005cf2b..cd5564f66 100644 --- a/admin/spec/spec_helper.rb +++ b/admin/spec/spec_helper.rb @@ -30,19 +30,19 @@ require 'rspec/autorun' require 'capybara/rails' require 'capybara/rspec' require 'capybara-screenshot/rspec' -require 'capybara/poltergeist' +require 'capybara/cuprite' -#include Rails.application.routes.url_helpers +include Rails.application.routes.url_helpers # Requires supporting ruby files with custom matchers and macros, etc, # in spec/support/ and its subdirectories. Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} -Capybara.register_driver :poltergeist do |app| - driver = Capybara::Poltergeist::Driver.new(app, { debug: false, phantomjs_logger: File.open('log/phantomjs.out', 'w') }) +Capybara.register_driver :cuprite do |app| + Capybara::Cuprite::Driver.new(app, window_size: [1200, 800]) end -Capybara.javascript_driver = :poltergeist +Capybara.javascript_driver = :cuprite Capybara.default_max_wait_time = 10 RSpec.configure do |config| @@ -55,7 +55,7 @@ RSpec.configure do |config| # config.mock_with :rr # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures - config.fixture_path = "#{::Rails.root}/spec/fixtures" + # config.fixture_path = "#{::Rails.root}/spec/fixtures" # If you're not using ActiveRecord, or you'd prefer not to run each of your # examples within a transaction, remove the following line or assign false @@ -72,4 +72,7 @@ RSpec.configure do |config| # the seed, which is printed after each run. # --seed 1234 config.order = "random" + + config.infer_spec_type_from_file_location! + config.include Capybara::DSL end diff --git a/ruby/lib/jam_ruby/models/anonymous_user.rb b/ruby/lib/jam_ruby/models/anonymous_user.rb index 9890a52ba..b3f63a9de 100644 --- a/ruby/lib/jam_ruby/models/anonymous_user.rb +++ b/ruby/lib/jam_ruby/models/anonymous_user.rb @@ -20,11 +20,11 @@ module JamRuby end def destroy_all_shopping_carts - ShoppingCart.destroy_all(anonymous_user_id: @id) + ShoppingCart.where(anonymous_user_id: @id).destroy_all end def destroy_jam_track_shopping_carts - ShoppingCart.destroy_all(anonymous_user_id: @id, cart_type: JamTrack::PRODUCT_TYPE) + ShoppingCart.where(anonymous_user_id: @id, cart_type: JamTrack::PRODUCT_TYPE).destroy_all end def admin diff --git a/ruby/lib/jam_ruby/models/connection.rb b/ruby/lib/jam_ruby/models/connection.rb index a6a96b315..537b8b13f 100644 --- a/ruby/lib/jam_ruby/models/connection.rb +++ b/ruby/lib/jam_ruby/models/connection.rb @@ -231,22 +231,21 @@ module JamRuby end end - def associate_tracks(tracks) - self.tracks.clear() - unless tracks.nil? - tracks.each do |track| - t = Track.new - t.instrument = Instrument.find_by_id(track["instrument_id"]) || Instrument.find('acoustic guitar') - t.connection = self - t.sound = track["sound"] - t.client_track_id = track["client_track_id"] - t.client_resource_id = track["client_resource_id"] - t.save # todo what if it fails? - self.tracks << t + def associate_tracks(tracks) + self.tracks.clear() + unless tracks.nil? + tracks.each do |track| + t = Track.new + t.instrument = track["instrument_id"].present? ? Instrument.find(track["instrument_id"]) : Instrument.find('acoustic guitar') + t.connection = self + t.sound = track["sound"] + t.client_track_id = track["client_track_id"] + t.client_resource_id = track["client_resource_id"] + t.save # todo what if it fails? + self.tracks << t + end + end end - end - end - def associate_videos(videos) unless videos.nil? self.video_sources.clear() diff --git a/ruby/lib/jam_ruby/models/jam_isp.rb b/ruby/lib/jam_ruby/models/jam_isp.rb index 951c09c4b..fe104e2bb 100644 --- a/ruby/lib/jam_ruby/models/jam_isp.rb +++ b/ruby/lib/jam_ruby/models/jam_isp.rb @@ -1,6 +1,4 @@ require 'ipaddr' -=begin - module JamRuby class JamIsp < ActiveRecord::Base @@ -220,4 +218,3 @@ module JamRuby end end end -=end diff --git a/ruby/lib/jam_ruby/models/user.rb b/ruby/lib/jam_ruby/models/user.rb index 779ad4245..1c1d46da8 100644 --- a/ruby/lib/jam_ruby/models/user.rb +++ b/ruby/lib/jam_ruby/models/user.rb @@ -242,8 +242,8 @@ module JamRuby belongs_to :school, :class_name => "JamRuby::School", inverse_of: :students belongs_to :onboarder, :class_name => "JamRuby::User", inverse_of: :onboarding_users, foreign_key: :onboarder_id has_many :onboarding_users, :class_name => "JamRuby::User", inverse_of: :onboarder, foreign_key: :onboarder_id - has_one :owned_school, :class_name => "JamRuby::School", inverse_of: :user - has_one :owned_retailer, :class_name => "JamRuby::Retailer", inverse_of: :user + has_one :owned_school, :class_name => "JamRuby::School", inverse_of: :user, dependent: :destroy + has_one :owned_retailer, :class_name => "JamRuby::Retailer", inverse_of: :user, dependent: :destroy has_many :test_drive_package_choices, :class_name =>"JamRuby::TestDrivePackageChoice" has_many :jamblasters_users, class_name: "JamRuby::JamblasterUser" has_many :jamblasters, class_name: 'JamRuby::Jamblaster', through: :jamblasters_users diff --git a/web/Gemfile b/web/Gemfile index 746b33d4f..7ce9413f8 100644 --- a/web/Gemfile +++ b/web/Gemfile @@ -33,10 +33,10 @@ gem 'fog-brightbox' gem 'faraday' gem 'ruby-prof' gem 'rubyzip' -gem 'recurly' +gem 'recurly', '~> 2.19' gem 'icalendar' gem 'email_validator' -gem 'redis' +gem 'redis', '~> 4.8' gem 'redis-namespace' gem 'oj' gem 'bcrypt' @@ -86,6 +86,7 @@ gem 'carmen' gem 'carrierwave' gem 'carrierwave_direct' # gem 'fog' # Removed to avoid pulling in broken fog-rackspace +gem 'fog-aws' # gem 'fog-rackspace' gem 'haml-rails' gem 'unf' @@ -117,6 +118,7 @@ gem 'influxdb-rails' gem 'sitemap_generator' gem 'bower-rails' gem 'react-rails' +gem 'connection_pool', '~> 2.0' gem 'sendgrid_toolkit' gem 'stripe' gem 'zip-codes' @@ -156,6 +158,7 @@ group :test, :cucumber do gem 'simplecov-rcov' gem 'capybara' gem 'capybara-screenshot' + gem 'cuprite' gem 'selenium-webdriver' gem 'webdrivers', require: false gem "show_me_the_cookies" diff --git a/web/Gemfile.lock b/web/Gemfile.lock index e7adc0f49..7c11f4829 100644 --- a/web/Gemfile.lock +++ b/web/Gemfile.lock @@ -134,7 +134,7 @@ GEM babel-source (>= 4.0, < 6) execjs (~> 2.0) backports (3.25.3) - base64 (0.2.0) + base64 (0.3.0) bcrypt (3.1.21) benchmark (0.5.0) bigdecimal (4.0.1) @@ -185,12 +185,15 @@ GEM execjs coffee-script-source (1.12.2) concurrent-ruby (1.3.6) - connection_pool (3.0.2) + connection_pool (2.5.5) crack (1.0.1) bigdecimal rexml crass (1.0.6) csv (3.3.5) + cuprite (0.17) + capybara (~> 3.0) + ferrum (~> 0.17.0) database_cleaner (2.1.0) database_cleaner-active_record (>= 2, < 3) database_cleaner-active_record (2.2.2) @@ -267,6 +270,12 @@ GEM multi_json (>= 1.3) rack-oauth2 (>= 0.14.4) tzinfo + ferrum (0.17.1) + addressable (~> 2.5) + base64 (~> 0.2) + concurrent-ruby (~> 1.1) + webrick (~> 1.7) + websocket-driver (~> 0.7) ffi (1.17.3-aarch64-linux-gnu) ffi (1.17.3-aarch64-linux-musl) ffi (1.17.3-arm-linux-gnu) @@ -628,12 +637,8 @@ GEM execjs railties (>= 3.2) tilt - recurly (4.73.0) - base64 (~> 0.2.0) - redis (5.4.1) - redis-client (>= 0.22.0) - redis-client (0.26.3) - connection_pool + recurly (2.20.5) + redis (4.8.1) redis-namespace (1.11.0) redis (>= 4) regexp_parser (2.11.3) @@ -869,6 +874,8 @@ DEPENDENCIES cause coffee-rails coffee-script-source + connection_pool (~> 2.0) + cuprite database_cleaner devise elasticsearch @@ -881,6 +888,7 @@ DEPENDENCIES faraday fb_graph filepicker-rails + fog-aws fog-brightbox fpm geokit-rails @@ -927,8 +935,8 @@ DEPENDENCIES rails-assets-react-select! rails-assets-reflux! react-rails - recurly - redis + recurly (~> 2.19) + redis (~> 4.8) redis-namespace responders resque @@ -1005,7 +1013,7 @@ CHECKSUMS babel-source (5.8.35) sha256=79ef222a9dcb867ac2efa3b0da35b4bcb15a4bfa67b6b2dcbf1e9a29104498d9 babel-transpiler (0.7.0) sha256=4c06f4ad9e8e1cabe94f99e11df2f140bb72aca9ba067dbb49dc14d9b98d1570 backports (3.25.3) sha256=94298d32dc3c40ca15633b54e282780b49e2db0c045f602ea1907e4f63a17235 - base64 (0.2.0) sha256=0f25e9b21a02a0cc0cea8ef92b2041035d39350946e8789c562b2d1a3da01507 + base64 (0.3.0) sha256=27337aeabad6ffae05c265c450490628ef3ebd4b67be58257393227588f5a97b bcrypt (3.1.21) sha256=5964613d750a42c7ee5dc61f7b9336fb6caca429ba4ac9f2011609946e4a2dcf benchmark (0.5.0) sha256=465df122341aedcb81a2a24b4d3bd19b6c67c1530713fd533f3ff034e419236c bigdecimal (4.0.1) sha256=8b07d3d065a9f921c80ceaea7c9d4ae596697295b584c296fe599dd0ad01c4a7 @@ -1030,10 +1038,11 @@ CHECKSUMS coffee-script (2.4.1) sha256=82fe281e11b93c8117b98c5ea8063e71741870f1c4fbb27177d7d6333dd38765 coffee-script-source (1.12.2) sha256=e12b16fd8927fbbf8b87cb2e9a85a6cf457c6881cc7ff8b1af15b31f70da07a4 concurrent-ruby (1.3.6) sha256=6b56837e1e7e5292f9864f34b69c5a2cbc75c0cf5338f1ce9903d10fa762d5ab - connection_pool (3.0.2) sha256=33fff5ba71a12d2aa26cb72b1db8bba2a1a01823559fb01d29eb74c286e62e0a + connection_pool (2.5.5) sha256=e54ff92855753df1fd7c59fa04a398833355f27dd14c074f8c83a05f72a716ad crack (1.0.1) sha256=ff4a10390cd31d66440b7524eb1841874db86201d5b70032028553130b6d4c7e crass (1.0.6) sha256=dc516022a56e7b3b156099abc81b6d2b08ea1ed12676ac7a5657617f012bd45d csv (3.3.5) sha256=6e5134ac3383ef728b7f02725d9872934f523cb40b961479f69cf3afa6c8e73f + cuprite (0.17) sha256=b140d5dc70d08b97ad54bcf45cd95d0bd430e291e9dffe76fff851fddd57c12b database_cleaner (2.1.0) sha256=1dcba26e3b1576da692fc6bac10136a4744da5bcc293d248aae19640c65d89cd database_cleaner-active_record (2.2.2) sha256=88296b9f3088c31f7c0d4fcec10f68e4b71c96698043916de59b04debec10388 database_cleaner-core (2.0.1) sha256=8646574c32162e59ed7b5258a97a208d3c44551b854e510994f24683865d846c @@ -1072,6 +1081,7 @@ CHECKSUMS faraday-rack (1.0.0) sha256=ef60ec969a2bb95b8dbf24400155aee64a00fc8ba6c6a4d3968562bcc92328c0 faraday-retry (1.0.3) sha256=add154f4f399243cbe070806ed41b96906942e7f5259bb1fe6daf2ec8f497194 fb_graph (2.7.17) sha256=7f03b001b8c50c64e361bfcd252c737963794b1d79f35c539801581d9cd1819f + ferrum (0.17.1) sha256=51d591120fc593e5a13b5d9d6474389f5145bb92a91e36eab147b5d096c8cbe7 ffi (1.17.3-aarch64-linux-gnu) sha256=28ad573df26560f0aedd8a90c3371279a0b2bd0b4e834b16a2baa10bd7a97068 ffi (1.17.3-aarch64-linux-musl) sha256=020b33b76775b1abacc3b7d86b287cef3251f66d747092deec592c7f5df764b2 ffi (1.17.3-arm-linux-gnu) sha256=5bd4cea83b68b5ec0037f99c57d5ce2dd5aa438f35decc5ef68a7d085c785668 @@ -1229,9 +1239,8 @@ CHECKSUMS rb-inotify (0.11.1) sha256=a0a700441239b0ff18eb65e3866236cd78613d6b9f78fea1f9ac47a85e47be6e rdoc (7.0.3) sha256=dfe3d0981d19b7bba71d9dbaeb57c9f4e3a7a4103162148a559c4fc687ea81f9 react-rails (3.2.1) sha256=2235db0b240517596b1cb3e26177ab5bc64d3a56579b0415ee242b1691f81f64 - recurly (4.73.0) sha256=9772545aabad6b0f041622610b6e05513b60601fe77e0dc14f0fd8323acd76f1 - redis (5.4.1) sha256=b5e675b57ad22b15c9bcc765d5ac26f60b675408af916d31527af9bd5a81faae - redis-client (0.26.3) sha256=37a95ca193b7a79f350c09fe5e696dc15d1701195d559d031a107ab725effc49 + recurly (2.20.5) sha256=307c2f1d9307db6e69839f3b5eb978265f27c44aa2a3819fc59ea23a47a560f6 + redis (4.8.1) sha256=387ee086694fffc9632aaeb1efe4a7b1627ca783bf373320346a8a20cd93333a redis-namespace (1.11.0) sha256=e91a1aa2b2d888b6dea1d4ab8d39e1ae6fac3426161feb9d91dd5cca598a2239 regexp_parser (2.11.3) sha256=ca13f381a173b7a93450e53459075c9b76a10433caadcb2f1180f2c741fc55a4 reline (0.6.3) sha256=1198b04973565b36ec0f11542ab3f5cfeeec34823f4e54cebde90968092b1835 diff --git a/web/app/controllers/api_affiliate_controller.rb b/web/app/controllers/api_affiliate_controller.rb index 98b59e89d..247c5c95c 100644 --- a/web/app/controllers/api_affiliate_controller.rb +++ b/web/app/controllers/api_affiliate_controller.rb @@ -1,6 +1,6 @@ class ApiAffiliateController < ApiController - before_filter :api_signed_in_user, :except => [ :create ] + before_action :api_signed_in_user, :except => [ :create ] include ErrorsHelper diff --git a/web/app/controllers/api_alerts_controller.rb b/web/app/controllers/api_alerts_controller.rb index 465a61f29..657aa7d6c 100644 --- a/web/app/controllers/api_alerts_controller.rb +++ b/web/app/controllers/api_alerts_controller.rb @@ -1,7 +1,7 @@ class ApiAlertsController < ApiController - before_filter :api_signed_in_user, only: :create + before_action :api_signed_in_user, only: :create def log diff --git a/web/app/controllers/api_app_features_controller.rb b/web/app/controllers/api_app_features_controller.rb index 85c4cf29c..24ae34f8e 100644 --- a/web/app/controllers/api_app_features_controller.rb +++ b/web/app/controllers/api_app_features_controller.rb @@ -1,5 +1,5 @@ class ApiAppFeaturesController < ApiController - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json diff --git a/web/app/controllers/api_backing_tracks_controller.rb b/web/app/controllers/api_backing_tracks_controller.rb index c9135cf97..dd3cb8708 100644 --- a/web/app/controllers/api_backing_tracks_controller.rb +++ b/web/app/controllers/api_backing_tracks_controller.rb @@ -1,9 +1,9 @@ class ApiBackingTracksController < ApiController # have to be signed in currently to see this screen - before_filter :api_signed_in_user + before_action :api_signed_in_user - before_filter :lookup_recorded_backing_track, :only => [ :backing_track_silent ] + before_action :lookup_recorded_backing_track, :only => [ :backing_track_silent ] respond_to :json diff --git a/web/app/controllers/api_bands_controller.rb b/web/app/controllers/api_bands_controller.rb index 77218eff5..bedcf498b 100644 --- a/web/app/controllers/api_bands_controller.rb +++ b/web/app/controllers/api_bands_controller.rb @@ -1,11 +1,11 @@ class ApiBandsController < ApiController - before_filter :api_signed_in_user, :except => [:index, :show, :follower_index] - before_filter :auth_band_member, :only => [:update, + before_action :api_signed_in_user, :except => [:index, :show, :follower_index] + before_action :auth_band_member, :only => [:update, :recording_create, :recording_update, :recording_destroy, :invitation_index, :invitation_show, :invitation_create, :invitation_destroy, :update_photo, :delete_photo, :generate_filepicker_policy] - before_filter :auth_band_admin, :only => [:delete] + before_action :auth_band_admin, :only => [:delete] respond_to :json diff --git a/web/app/controllers/api_chats_controller.rb b/web/app/controllers/api_chats_controller.rb index fa0b28111..67d694012 100644 --- a/web/app/controllers/api_chats_controller.rb +++ b/web/app/controllers/api_chats_controller.rb @@ -1,6 +1,6 @@ class ApiChatsController < ApiController - before_filter :api_signed_in_user, :check_session + before_action :api_signed_in_user, :check_session respond_to :json diff --git a/web/app/controllers/api_claimed_recordings_controller.rb b/web/app/controllers/api_claimed_recordings_controller.rb index ec6796ec2..4276b774b 100644 --- a/web/app/controllers/api_claimed_recordings_controller.rb +++ b/web/app/controllers/api_claimed_recordings_controller.rb @@ -1,7 +1,7 @@ class ApiClaimedRecordingsController < ApiController - before_filter :api_signed_in_user, :except => [ :download, :show ] - before_filter :look_up_claimed_recording, :only => [ :show, :update, :delete, :download ] + before_action :api_signed_in_user, :except => [ :download, :show ] + before_action :look_up_claimed_recording, :only => [ :show, :update, :delete, :download ] respond_to :json diff --git a/web/app/controllers/api_diagnostics_controller.rb b/web/app/controllers/api_diagnostics_controller.rb index 945a05b4a..ce48b98de 100644 --- a/web/app/controllers/api_diagnostics_controller.rb +++ b/web/app/controllers/api_diagnostics_controller.rb @@ -1,6 +1,6 @@ class ApiDiagnosticsController < ApiController - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json def create diff --git a/web/app/controllers/api_favorites_controller.rb b/web/app/controllers/api_favorites_controller.rb index 9ca6dacec..0886c5d54 100644 --- a/web/app/controllers/api_favorites_controller.rb +++ b/web/app/controllers/api_favorites_controller.rb @@ -2,7 +2,7 @@ class ApiFavoritesController < ApiController respond_to :json - before_filter :api_signed_in_user + before_action :api_signed_in_user def index @claimed_recordings, @next = ClaimedRecording.index_favorites(current_user, diff --git a/web/app/controllers/api_icecast_controller.rb b/web/app/controllers/api_icecast_controller.rb index e48892f7e..513d2c1f4 100644 --- a/web/app/controllers/api_icecast_controller.rb +++ b/web/app/controllers/api_icecast_controller.rb @@ -24,9 +24,9 @@ =end class ApiIcecastController < ApiController - before_filter :local_only, :only => [:test] - before_filter :parse_mount, :only => [:mount_add, :mount_remove, :listener_add, :listener_remove] - before_filter :api_signed_in_user, :only => [ :create_source_change ] + before_action :local_only, :only => [:test] + before_action :parse_mount, :only => [:mount_add, :mount_remove, :listener_add, :listener_remove] + before_action :api_signed_in_user, :only => [ :create_source_change ] # each request will have this in it, if it's icecast. #user-agent = Icecast 2.3.3 diff --git a/web/app/controllers/api_invitations_controller.rb b/web/app/controllers/api_invitations_controller.rb index 54fdb4d66..88aa71310 100644 --- a/web/app/controllers/api_invitations_controller.rb +++ b/web/app/controllers/api_invitations_controller.rb @@ -1,7 +1,7 @@ class ApiInvitationsController < ApiController # have to be signed in currently to see this screen - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json diff --git a/web/app/controllers/api_invited_users_controller.rb b/web/app/controllers/api_invited_users_controller.rb index 9370aec74..c90716034 100644 --- a/web/app/controllers/api_invited_users_controller.rb +++ b/web/app/controllers/api_invited_users_controller.rb @@ -1,7 +1,7 @@ class ApiInvitedUsersController < ApiController # have to be signed in currently to see this screen - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json diff --git a/web/app/controllers/api_jam_track_mixdowns_controller.rb b/web/app/controllers/api_jam_track_mixdowns_controller.rb index 53b121b0f..350af6bbd 100644 --- a/web/app/controllers/api_jam_track_mixdowns_controller.rb +++ b/web/app/controllers/api_jam_track_mixdowns_controller.rb @@ -1,11 +1,11 @@ class ApiJamTrackMixdownsController < ApiController # have to be signed in currently to see this screen - before_filter :api_signed_in_user - before_filter :lookup_jam_track_mixdown, :only => [:download, :enqueue, :update] - before_filter :lookup_jam_track_right, :only => [:download, :enqueue, :update] - before_filter :ip_blacklist, :only => [:download] - before_filter :user_blacklist, :only => [:download] + before_action :api_signed_in_user + before_action :lookup_jam_track_mixdown, :only => [:download, :enqueue, :update] + before_action :lookup_jam_track_right, :only => [:download, :enqueue, :update] + before_action :ip_blacklist, :only => [:download] + before_action :user_blacklist, :only => [:download] respond_to :json def log diff --git a/web/app/controllers/api_jam_tracks_controller.rb b/web/app/controllers/api_jam_tracks_controller.rb index c2871db29..48ef7e2d2 100644 --- a/web/app/controllers/api_jam_tracks_controller.rb +++ b/web/app/controllers/api_jam_tracks_controller.rb @@ -1,11 +1,11 @@ class ApiJamTracksController < ApiController # have to be signed in currently to see this screen - before_filter :api_signed_in_user, :except => [:index, :autocomplete, :show_with_artist_info, :artist_index, :public_show] - before_filter :api_any_user, :only => [:index, :autocomplete, :show_with_artist_info, :artist_index] - before_filter :lookup_jam_track_right, :only => [:download, :enqueue, :show_jam_track_right, :mark_active, :download_stem] - before_filter :ip_blacklist, :only => [:download_stem, :download] - before_filter :user_blacklist, :only => [:download_stem, :download] + before_action :api_signed_in_user, :except => [:index, :autocomplete, :show_with_artist_info, :artist_index, :public_show] + before_action :api_any_user, :only => [:index, :autocomplete, :show_with_artist_info, :artist_index] + before_action :lookup_jam_track_right, :only => [:download, :enqueue, :show_jam_track_right, :mark_active, :download_stem] + before_action :ip_blacklist, :only => [:download_stem, :download] + before_action :user_blacklist, :only => [:download_stem, :download] respond_to :json diff --git a/web/app/controllers/api_jamblasters_controller.rb b/web/app/controllers/api_jamblasters_controller.rb index 082048cba..06c0ed7cf 100644 --- a/web/app/controllers/api_jamblasters_controller.rb +++ b/web/app/controllers/api_jamblasters_controller.rb @@ -1,6 +1,6 @@ class ApiJamblastersController < ApiController - before_filter :api_signed_in_user, except: [:login, :store_token, :auth_users, :can_pair, :is_allowed] + before_action :api_signed_in_user, except: [:login, :store_token, :auth_users, :can_pair, :is_allowed] respond_to :json diff --git a/web/app/controllers/api_join_requests_controller.rb b/web/app/controllers/api_join_requests_controller.rb index 555de40cb..c9201d403 100644 --- a/web/app/controllers/api_join_requests_controller.rb +++ b/web/app/controllers/api_join_requests_controller.rb @@ -1,7 +1,7 @@ class ApiJoinRequestsController < ApiController # have to be signed in currently to see this screen - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json diff --git a/web/app/controllers/api_latency_testers_controller.rb b/web/app/controllers/api_latency_testers_controller.rb index 19b4293ac..f66061464 100644 --- a/web/app/controllers/api_latency_testers_controller.rb +++ b/web/app/controllers/api_latency_testers_controller.rb @@ -1,7 +1,7 @@ class ApiLatencyTestersController < ApiController # have to be signed in currently to see this screen - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json diff --git a/web/app/controllers/api_lesson_bookings_controller.rb b/web/app/controllers/api_lesson_bookings_controller.rb index 14959dc92..28eed09f4 100644 --- a/web/app/controllers/api_lesson_bookings_controller.rb +++ b/web/app/controllers/api_lesson_bookings_controller.rb @@ -1,8 +1,8 @@ class ApiLessonBookingsController < ApiController - before_filter :api_signed_in_user - before_filter :lookup_lesson_booking, :only => [:accept, :counter, :cancel, :show] - before_filter :auth_lesson_booking, :only => [:accept, :counter, :cancel, :show] + before_action :api_signed_in_user + before_action :lookup_lesson_booking, :only => [:accept, :counter, :cancel, :show] + before_action :auth_lesson_booking, :only => [:accept, :counter, :cancel, :show] respond_to :json def index diff --git a/web/app/controllers/api_lesson_sessions_controller.rb b/web/app/controllers/api_lesson_sessions_controller.rb index 313d6e57d..07a77e20d 100644 --- a/web/app/controllers/api_lesson_sessions_controller.rb +++ b/web/app/controllers/api_lesson_sessions_controller.rb @@ -1,9 +1,9 @@ class ApiLessonSessionsController < ApiController - before_filter :api_signed_in_user - before_filter :lookup_lesson, except: [:index, :uncollectable, :rating_decision] - before_filter :is_teacher, only: [:accept] - before_filter :is_student, only: [] + before_action :api_signed_in_user + before_action :lookup_lesson, except: [:index, :uncollectable, :rating_decision] + before_action :is_teacher, only: [:accept] + before_action :is_student, only: [] respond_to :json def index diff --git a/web/app/controllers/api_links_controller.rb b/web/app/controllers/api_links_controller.rb index 8cadf984a..95a145d9c 100644 --- a/web/app/controllers/api_links_controller.rb +++ b/web/app/controllers/api_links_controller.rb @@ -2,8 +2,8 @@ class ApiLinksController < ApiController respond_to :json - before_filter :api_any_user - before_filter :affiliate_partner + before_action :api_any_user + before_action :affiliate_partner def log @log || Logging.logger[ApiLinksController] diff --git a/web/app/controllers/api_mixes_controller.rb b/web/app/controllers/api_mixes_controller.rb index f79dc1a0a..89cbc5e0e 100644 --- a/web/app/controllers/api_mixes_controller.rb +++ b/web/app/controllers/api_mixes_controller.rb @@ -4,9 +4,9 @@ class ApiMixesController < ApiController # hitting these routes. CRON_TOKEN = "2kkl39sjjf3ijdsflje2923j" - before_filter :api_signed_in_user, :only => [ :schedule ] - before_filter :require_cron_token, :only => [ :next, :finish ] - before_filter :look_up_mix, :only => [ :finish ] + before_action :api_signed_in_user, :only => [ :schedule ] + before_action :require_cron_token, :only => [ :next, :finish ] + before_action :look_up_mix, :only => [ :finish ] respond_to :json diff --git a/web/app/controllers/api_music_notations_controller.rb b/web/app/controllers/api_music_notations_controller.rb index 1de842c12..47425718e 100644 --- a/web/app/controllers/api_music_notations_controller.rb +++ b/web/app/controllers/api_music_notations_controller.rb @@ -1,7 +1,7 @@ -require 'aws-sdk' +require 'aws-sdk-s3' class ApiMusicNotationsController < ApiController - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json diff --git a/web/app/controllers/api_music_sessions_controller.rb b/web/app/controllers/api_music_sessions_controller.rb index 247eacaee..30bfbd6d9 100644 --- a/web/app/controllers/api_music_sessions_controller.rb +++ b/web/app/controllers/api_music_sessions_controller.rb @@ -1,13 +1,13 @@ -require 'aws-sdk' +require 'aws-sdk-s3' class ApiMusicSessionsController < ApiController # have to be signed in currently to see this screen - before_filter :api_signed_in_user, :except => [ :add_like, :show, :show_history, :add_session_info_comment, :auth ] - before_filter :lookup_session, only: [:show, :update, :delete, :claimed_recording_start, :claimed_recording_stop, :track_sync, :jam_track_open, :jam_track_close, :backing_track_open, :backing_track_close, :metronome_open, :metronome_close, :attach_recording] - before_filter :lookup_perm_session, only: [:get_livestream, :create_livestream, :livestream_transition] - skip_before_filter :api_signed_in_user, only: [:perf_upload] - around_filter :transactions_filter, only:[:sms_index, :ams_index] + before_action :api_signed_in_user, :except => [ :add_like, :show, :show_history, :add_session_info_comment, :auth ] + before_action :lookup_session, only: [:show, :update, :delete, :claimed_recording_start, :claimed_recording_stop, :track_sync, :jam_track_open, :jam_track_close, :backing_track_open, :backing_track_close, :metronome_open, :metronome_close, :attach_recording] + before_action :lookup_perm_session, only: [:get_livestream, :create_livestream, :livestream_transition] + skip_before_action :api_signed_in_user, only: [:perf_upload] + around_action :transactions_filter, only:[:sms_index, :ams_index] respond_to :json @@ -324,10 +324,10 @@ class ApiMusicSessionsController < ApiController end end - def participant_create - client_id = params[:client_id] - - if client_id.nil? + def participant_create + puts "DEBUG: participant_create params=#{params.inspect}" + client_id = params[:client_id] + if client_id.nil? raise JamArgumentError, "client_id must be specified" end diff --git a/web/app/controllers/api_pay_pal_controller.rb b/web/app/controllers/api_pay_pal_controller.rb index 5c3526750..2fd8a5198 100644 --- a/web/app/controllers/api_pay_pal_controller.rb +++ b/web/app/controllers/api_pay_pal_controller.rb @@ -1,6 +1,6 @@ class ApiPayPalController < ApiController - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json diff --git a/web/app/controllers/api_payment_histories_controller.rb b/web/app/controllers/api_payment_histories_controller.rb index 6e8080f98..6ad8ed6a7 100644 --- a/web/app/controllers/api_payment_histories_controller.rb +++ b/web/app/controllers/api_payment_histories_controller.rb @@ -1,6 +1,6 @@ class ApiPaymentHistoriesController < ApiController - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json diff --git a/web/app/controllers/api_posa_cards_controller.rb b/web/app/controllers/api_posa_cards_controller.rb index be053921d..4980dd0e0 100644 --- a/web/app/controllers/api_posa_cards_controller.rb +++ b/web/app/controllers/api_posa_cards_controller.rb @@ -1,10 +1,10 @@ require 'sanitize' class ApiPosaCardsController < ApiController - before_filter :api_signed_in_user, :only => [:claim] - before_filter :posa_http_basic_auth, :only => [:activate] + before_action :api_signed_in_user, :only => [:claim] + before_action :posa_http_basic_auth, :only => [:activate] - #before_filter :lookup_review_summary, :only => [:details] - #before_filter :lookup_review, :only => [:update, :delete, :show] + #before_action :lookup_review_summary, :only => [:details] + #before_action :lookup_review, :only => [:update, :delete, :show] respond_to :json diff --git a/web/app/controllers/api_recordings_controller.rb b/web/app/controllers/api_recordings_controller.rb index 74b8dc424..0d6d4fbca 100644 --- a/web/app/controllers/api_recordings_controller.rb +++ b/web/app/controllers/api_recordings_controller.rb @@ -1,11 +1,11 @@ class ApiRecordingsController < ApiController - before_filter :api_signed_in_user, :except => [ :add_like ] + before_action :api_signed_in_user, :except => [ :add_like ] - before_filter :lookup_recording, :only => [ :show, :stop, :claim, :discard, :keep, :delete_claim, :add_timeline, :add_video_data, :delete_video_data, :mobile_upload, :mobile_update, :mobile_upload_download, :mobile_upload_delete ] - before_filter :lookup_recorded_track, :only => [ :download, :upload_next_part, :upload_sign, :upload_part_complete, :upload_complete ] - before_filter :lookup_recorded_backing_track, :only => [ :backing_track_download, :backing_track_upload_next_part, :backing_track_upload_sign, :backing_track_upload_part_complete, :backing_track_upload_complete ] - before_filter :lookup_recorded_video, :only => [ :video_upload_sign, :video_upload_start, :video_upload_complete ] - before_filter :lookup_stream_mix, :only => [ :upload_next_part_stream_mix, :upload_sign_stream_mix, :upload_part_complete_stream_mix, :upload_complete_stream_mix ] + before_action :lookup_recording, :only => [ :show, :stop, :claim, :discard, :keep, :delete_claim, :add_timeline, :add_video_data, :delete_video_data, :mobile_upload, :mobile_update, :mobile_upload_download, :mobile_upload_delete ] + before_action :lookup_recorded_track, :only => [ :download, :upload_next_part, :upload_sign, :upload_part_complete, :upload_complete ] + before_action :lookup_recorded_backing_track, :only => [ :backing_track_download, :backing_track_upload_next_part, :backing_track_upload_sign, :backing_track_upload_part_complete, :backing_track_upload_complete ] + before_action :lookup_recorded_video, :only => [ :video_upload_sign, :video_upload_start, :video_upload_complete ] + before_action :lookup_stream_mix, :only => [ :upload_next_part_stream_mix, :upload_sign_stream_mix, :upload_part_complete_stream_mix, :upload_complete_stream_mix ] respond_to :json diff --git a/web/app/controllers/api_recurly_controller.rb b/web/app/controllers/api_recurly_controller.rb index 9c1e6bc10..f3ce41329 100644 --- a/web/app/controllers/api_recurly_controller.rb +++ b/web/app/controllers/api_recurly_controller.rb @@ -1,9 +1,9 @@ require 'jam_ruby/recurly_client' class ApiRecurlyController < ApiController - before_filter :api_signed_in_user, :except => [:create_account] - before_filter :create_client - before_filter :ip_blacklist, :only => [:place_order] - before_filter :user_blacklist, :only => [:place_order] + before_action :api_signed_in_user, :except => [:create_account] + before_action :create_client + before_action :ip_blacklist, :only => [:place_order] + before_action :user_blacklist, :only => [:place_order] respond_to :json @@ -12,6 +12,7 @@ class ApiRecurlyController < ApiController def create_account billing_info = params[:billing_info] + billing_info = billing_info.to_unsafe_h if billing_info.respond_to?(:to_unsafe_h) shipping_info = params[:shipping_info] # should we let the user reuse this card next time? reuse_card_next_time = params[:reuse_card_next_time] == "true" @@ -109,7 +110,9 @@ class ApiRecurlyController < ApiController # update Recurly account def update_account - @account=@client.update_account(current_user, params[:billing_info]) + billing_info = params[:billing_info] + billing_info = billing_info.to_unsafe_h if billing_info.respond_to?(:to_unsafe_h) + @account=@client.update_account(current_user, billing_info) render :json => account_json(@account) rescue RecurlyClientError => x render json: {message: x.inspect, errors: x.errors}, :status => 404 @@ -129,7 +132,9 @@ class ApiRecurlyController < ApiController # update Billing Information def update_billing_info - @account = @client.update_billing_info(current_user, params[:billing_info]) + billing_info = params[:billing_info] + billing_info = billing_info.to_unsafe_h if billing_info.respond_to?(:to_unsafe_h) + @account = @client.update_billing_info(current_user, billing_info) render :json => account_json(@account) rescue RecurlyClientError => x render json: {message: x.inspect, errors: x.errors}, :status => 404 diff --git a/web/app/controllers/api_recurly_web_hook_controller.rb b/web/app/controllers/api_recurly_web_hook_controller.rb index a809800b1..7fa8f74f1 100644 --- a/web/app/controllers/api_recurly_web_hook_controller.rb +++ b/web/app/controllers/api_recurly_web_hook_controller.rb @@ -2,7 +2,7 @@ class ApiRecurlyWebHookController < ApiController http_basic_authenticate_with name: Rails.application.config.recurly_webhook_user, password: Rails.application.config.recurly_webhook_pass - before_filter :api_signed_in_user, only: [] + before_action :api_signed_in_user, only: [] #respond_to :xml diff --git a/web/app/controllers/api_retailer_invitations_controller.rb b/web/app/controllers/api_retailer_invitations_controller.rb index 93a38e297..383066f98 100644 --- a/web/app/controllers/api_retailer_invitations_controller.rb +++ b/web/app/controllers/api_retailer_invitations_controller.rb @@ -1,10 +1,10 @@ class ApiRetailerInvitationsController < ApiController - before_filter :api_signed_in_user - before_filter :lookup_retailer, :only => [:index, :create] - before_filter :auth_retailer, :only => [:index, :create] - before_filter :lookup_retailer_invitation, :only => [:delete, :resend] - before_filter :auth_retailer_invitation, :only => [:delete, :resend] + before_action :api_signed_in_user + before_action :lookup_retailer, :only => [:index, :create] + before_action :auth_retailer, :only => [:index, :create] + before_action :lookup_retailer_invitation, :only => [:delete, :resend] + before_action :auth_retailer_invitation, :only => [:delete, :resend] respond_to :json diff --git a/web/app/controllers/api_retailers_controller.rb b/web/app/controllers/api_retailers_controller.rb index 7d43f9377..b4c89688e 100644 --- a/web/app/controllers/api_retailers_controller.rb +++ b/web/app/controllers/api_retailers_controller.rb @@ -1,8 +1,8 @@ class ApiRetailersController < ApiController - before_filter :api_signed_in_user, :except => [:customer_email] - before_filter :lookup_retailer, :only => [:show, :update, :update_avatar, :delete_avatar, :generate_filepicker_policy, :remove_student, :remove_teacher, :customer_email] - before_filter :auth_retailer, :only => [:show, :update, :update_avatar, :delete_avatar, :generate_filepicker_policy, :remove_student, :remove_teacher] + before_action :api_signed_in_user, :except => [:customer_email] + before_action :lookup_retailer, :only => [:show, :update, :update_avatar, :delete_avatar, :generate_filepicker_policy, :remove_student, :remove_teacher, :customer_email] + before_action :auth_retailer, :only => [:show, :update, :update_avatar, :delete_avatar, :generate_filepicker_policy, :remove_student, :remove_teacher] respond_to :json diff --git a/web/app/controllers/api_reviews_controller.rb b/web/app/controllers/api_reviews_controller.rb index 9487f1cce..0f8322bc5 100644 --- a/web/app/controllers/api_reviews_controller.rb +++ b/web/app/controllers/api_reviews_controller.rb @@ -1,8 +1,8 @@ require 'sanitize' class ApiReviewsController < ApiController - before_filter :api_signed_in_user, :except => [:index] - before_filter :lookup_review_summary, :only => [:details] - before_filter :lookup_review, :only => [:update, :delete, :show] + before_action :api_signed_in_user, :except => [:index] + before_action :lookup_review_summary, :only => [:details] + before_action :lookup_review, :only => [:update, :delete, :show] respond_to :json diff --git a/web/app/controllers/api_rsvp_requests_controller.rb b/web/app/controllers/api_rsvp_requests_controller.rb index 78e9feb88..0f49e5ef8 100644 --- a/web/app/controllers/api_rsvp_requests_controller.rb +++ b/web/app/controllers/api_rsvp_requests_controller.rb @@ -1,6 +1,6 @@ class ApiRsvpRequestsController < ApiController - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json diff --git a/web/app/controllers/api_rsvp_slots_controller.rb b/web/app/controllers/api_rsvp_slots_controller.rb index 7b4f2e3bc..5692eed62 100644 --- a/web/app/controllers/api_rsvp_slots_controller.rb +++ b/web/app/controllers/api_rsvp_slots_controller.rb @@ -1,6 +1,6 @@ class ApiRsvpSlotsController < ApiController - # before_filter :auth_user + # before_action :auth_user respond_to :json diff --git a/web/app/controllers/api_sales_controller.rb b/web/app/controllers/api_sales_controller.rb index 972384d76..f59b1ed3f 100644 --- a/web/app/controllers/api_sales_controller.rb +++ b/web/app/controllers/api_sales_controller.rb @@ -1,6 +1,6 @@ class ApiSalesController < ApiController - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json diff --git a/web/app/controllers/api_school_invitations_controller.rb b/web/app/controllers/api_school_invitations_controller.rb index bf285c26d..7bedfe9d5 100644 --- a/web/app/controllers/api_school_invitations_controller.rb +++ b/web/app/controllers/api_school_invitations_controller.rb @@ -1,11 +1,11 @@ class ApiSchoolInvitationsController < ApiController - before_filter :api_signed_in_user - before_filter :lookup_school, :only => [:index, :create] - before_filter :auth_school, :only => [:index, :create] - before_filter :lookup_school_invitation, :only => [:delete, :resend] - before_filter :auth_school_invitation, :only => [:delete, :resend] + before_action :api_signed_in_user + before_action :lookup_school, :only => [:index, :create] + before_action :auth_school, :only => [:index, :create] + before_action :lookup_school_invitation, :only => [:delete, :resend] + before_action :auth_school_invitation, :only => [:delete, :resend] respond_to :json diff --git a/web/app/controllers/api_schools_controller.rb b/web/app/controllers/api_schools_controller.rb index 770d4be8b..1fcf857b0 100644 --- a/web/app/controllers/api_schools_controller.rb +++ b/web/app/controllers/api_schools_controller.rb @@ -1,8 +1,8 @@ class ApiSchoolsController < ApiController - before_filter :api_signed_in_user - before_filter :lookup_school, :only => [:show, :update, :update_avatar, :delete_avatar, :generate_filepicker_policy, :remove_student, :remove_teacher] - before_filter :auth_school, :only => [:show, :update, :update_avatar, :delete_avatar, :generate_filepicker_policy, :remove_student, :remove_teacher] + before_action :api_signed_in_user + before_action :lookup_school, :only => [:show, :update, :update_avatar, :delete_avatar, :generate_filepicker_policy, :remove_student, :remove_teacher] + before_action :auth_school, :only => [:show, :update, :update_avatar, :delete_avatar, :generate_filepicker_policy, :remove_student, :remove_teacher] respond_to :json diff --git a/web/app/controllers/api_scoring_controller.rb b/web/app/controllers/api_scoring_controller.rb index cf89455d2..8df8e0071 100644 --- a/web/app/controllers/api_scoring_controller.rb +++ b/web/app/controllers/api_scoring_controller.rb @@ -1,7 +1,7 @@ class ApiScoringController < ApiController respond_to :json - before_filter :api_signed_in_user + before_action :api_signed_in_user def work # clientid; returns another clientid clientid = params[:clientid] diff --git a/web/app/controllers/api_search_controller.rb b/web/app/controllers/api_search_controller.rb index eb43fafd0..ffa8d5101 100644 --- a/web/app/controllers/api_search_controller.rb +++ b/web/app/controllers/api_search_controller.rb @@ -1,7 +1,7 @@ class ApiSearchController < ApiController # have to be signed in currently to see this screen - before_filter :api_signed_in_user, :except => :jam_tracks + before_action :api_signed_in_user, :except => :jam_tracks respond_to :json diff --git a/web/app/controllers/api_shopping_carts_controller.rb b/web/app/controllers/api_shopping_carts_controller.rb index 42fc100fd..ac098562c 100644 --- a/web/app/controllers/api_shopping_carts_controller.rb +++ b/web/app/controllers/api_shopping_carts_controller.rb @@ -1,6 +1,6 @@ class ApiShoppingCartsController < ApiController - before_filter :api_any_user + before_action :api_any_user respond_to :json diff --git a/web/app/controllers/api_signup_hints_controller.rb b/web/app/controllers/api_signup_hints_controller.rb index 0ed93a73f..aff6fceb8 100644 --- a/web/app/controllers/api_signup_hints_controller.rb +++ b/web/app/controllers/api_signup_hints_controller.rb @@ -1,7 +1,7 @@ class ApiSignupHintsController < ApiController - before_filter :api_anonymous_user, except: [:create_redirect] - before_filter :api_signed_in_user, only: [:create_redirect] + before_action :api_anonymous_user, except: [:create_redirect] + before_action :api_signed_in_user, only: [:create_redirect] respond_to :json diff --git a/web/app/controllers/api_stripe_controller.rb b/web/app/controllers/api_stripe_controller.rb index d888fa369..7b0322e88 100644 --- a/web/app/controllers/api_stripe_controller.rb +++ b/web/app/controllers/api_stripe_controller.rb @@ -1,6 +1,6 @@ class ApiStripeController < ApiController - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json def store diff --git a/web/app/controllers/api_teacher_distributions_controller.rb b/web/app/controllers/api_teacher_distributions_controller.rb index e7914fe83..af0b75df1 100644 --- a/web/app/controllers/api_teacher_distributions_controller.rb +++ b/web/app/controllers/api_teacher_distributions_controller.rb @@ -1,6 +1,6 @@ class ApiTeacherDistributionsController < ApiController - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json def index diff --git a/web/app/controllers/api_teachers_controller.rb b/web/app/controllers/api_teachers_controller.rb index d85060fa9..383512e84 100644 --- a/web/app/controllers/api_teachers_controller.rb +++ b/web/app/controllers/api_teachers_controller.rb @@ -1,8 +1,8 @@ class ApiTeachersController < ApiController - before_filter :api_signed_in_user, :except => [:index, :detail, :search, :search_help] - before_filter :auth_teacher, :only => [:update, :delete] - before_filter :auth_user, :only => [:create, :update] + before_action :api_signed_in_user, :except => [:index, :detail, :search, :search_help] + before_action :auth_teacher, :only => [:update, :delete] + before_action :auth_user, :only => [:create, :update] respond_to :json diff --git a/web/app/controllers/api_text_messages_controller.rb b/web/app/controllers/api_text_messages_controller.rb index b8aa155f7..27dd7bab2 100644 --- a/web/app/controllers/api_text_messages_controller.rb +++ b/web/app/controllers/api_text_messages_controller.rb @@ -1,7 +1,7 @@ require 'sanitize' class ApiTextMessagesController < ApiController - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json diff --git a/web/app/controllers/api_twitters_controller.rb b/web/app/controllers/api_twitters_controller.rb index a56ebc660..dd590829d 100644 --- a/web/app/controllers/api_twitters_controller.rb +++ b/web/app/controllers/api_twitters_controller.rb @@ -1,6 +1,6 @@ class ApiTwittersController < ApiController - before_filter :api_signed_in_user + before_action :api_signed_in_user respond_to :json diff --git a/web/app/controllers/api_user_syncs_controller.rb b/web/app/controllers/api_user_syncs_controller.rb index 54a0554bc..38b1053ad 100644 --- a/web/app/controllers/api_user_syncs_controller.rb +++ b/web/app/controllers/api_user_syncs_controller.rb @@ -3,8 +3,8 @@ class ApiUserSyncsController < ApiController - before_filter :api_signed_in_user, :except => [ ] - before_filter :auth_user + before_action :api_signed_in_user, :except => [ ] + before_action :auth_user respond_to :json diff --git a/web/app/controllers/api_users_controller.rb b/web/app/controllers/api_users_controller.rb index 39bb00c90..27f9ae4a9 100644 --- a/web/app/controllers/api_users_controller.rb +++ b/web/app/controllers/api_users_controller.rb @@ -1,9 +1,9 @@ require 'sanitize' class ApiUsersController < ApiController - before_filter :api_signed_in_user, :except => [:create, :calendar, :show, :signup_confirm, :auth_session_create, :complete, :finalize_update_email, :isp_scoring, :add_play, :crash_dump, :user_assets, :validate_data, :google_auth, :user_event, :onboardings, :update_onboarding, :show_onboarding] + before_action :api_signed_in_user, :except => [:create, :calendar, :show, :signup_confirm, :auth_session_create, :complete, :finalize_update_email, :isp_scoring, :add_play, :crash_dump, :user_assets, :validate_data, :google_auth, :user_event, :onboardings, :update_onboarding, :show_onboarding] - before_filter :auth_user, :only => [:session_settings_show, :session_history_index, :session_user_history_index, :update, :delete, :authorizations, :test_drive_status, + before_action :auth_user, :only => [:session_settings_show, :session_history_index, :session_user_history_index, :update, :delete, :authorizations, :test_drive_status, :liking_create, :liking_destroy, # likes :following_create, :following_show, :following_destroy, # followings :recording_update, :recording_destroy, # recordings @@ -16,7 +16,7 @@ class ApiUsersController < ApiController :share_session, :share_recording, :affiliate_report, :audio_latency, :get_latencies, :broadcast_notification, :redeem_giftcard, :post_app_interactions] - before_filter :ip_blacklist, :only => [:create, :redeem_giftcard] + before_action :ip_blacklist, :only => [:create, :redeem_giftcard] respond_to :json, :except => :calendar respond_to :ics, :only => :calendar diff --git a/web/app/controllers/application_controller.rb b/web/app/controllers/application_controller.rb index d092e08e2..abdcefd19 100644 --- a/web/app/controllers/application_controller.rb +++ b/web/app/controllers/application_controller.rb @@ -10,15 +10,15 @@ class ApplicationController < ActionController::Base # inject username/email into bugsnag data before_bugsnag_notify :add_user_info_to_bugsnag - before_filter do + before_action do gon_setup end - before_filter :set_tracking_cookie - before_filter :track_affiliate_visits - before_filter :track_origin + before_action :set_tracking_cookie + before_action :track_affiliate_visits + before_action :track_origin - #before_filter do + #before_action do # if params[AffiliatePartner::PARAM_REFERRAL].present? && current_user.nil? # if cookies[AffiliatePartner::PARAM_COOKIE].blank? # code = params[AffiliatePartner::PARAM_REFERRAL].downcase diff --git a/web/app/controllers/extras_controller.rb b/web/app/controllers/extras_controller.rb index 131a316d0..99a48ff0a 100644 --- a/web/app/controllers/extras_controller.rb +++ b/web/app/controllers/extras_controller.rb @@ -1,7 +1,7 @@ class ExtrasController < ApplicationController - before_filter :signed_in_user - before_filter :admin_user + before_action :signed_in_user + before_action :admin_user def settings render layout: "web" diff --git a/web/app/controllers/landings_controller.rb b/web/app/controllers/landings_controller.rb index a2d5b8076..87ddaa542 100644 --- a/web/app/controllers/landings_controller.rb +++ b/web/app/controllers/landings_controller.rb @@ -4,7 +4,7 @@ class LandingsController < ApplicationController respond_to :html - before_filter :posa_http_basic_auth, only: [:posa_activation] + before_action :posa_http_basic_auth, only: [:posa_activation] def watch_bands @promo_buzz = PromoBuzz.active diff --git a/web/app/controllers/sessions_controller.rb b/web/app/controllers/sessions_controller.rb index 1c1c0ff1c..4e9850336 100644 --- a/web/app/controllers/sessions_controller.rb +++ b/web/app/controllers/sessions_controller.rb @@ -1,7 +1,7 @@ # this is not a jam session - this is an 'auth session' class SessionsController < ApplicationController - before_filter :api_signed_in_user, only: :paypal_express_checkout + before_action :api_signed_in_user, only: :paypal_express_checkout layout "web" diff --git a/web/app/controllers/users_controller.rb b/web/app/controllers/users_controller.rb index 01df89d8f..a63903a9b 100644 --- a/web/app/controllers/users_controller.rb +++ b/web/app/controllers/users_controller.rb @@ -16,12 +16,12 @@ class UsersController < ApplicationController include ClientHelper - before_filter :signed_in_user, + before_action :signed_in_user, only: [:index, :edit, :update, :destroy] - before_filter :correct_user, only: [:edit, :update] - before_filter :admin_user, only: :destroy - before_filter :is_native_client - before_filter :ip_blacklist, :only => [:create] + before_action :correct_user, only: [:edit, :update] + before_action :admin_user, only: :destroy + before_action :is_native_client + before_action :ip_blacklist, :only => [:create] rescue_from 'JamRuby::PermissionError' do |exception| @exception = exception diff --git a/web/app/helpers/sessions_helper.rb b/web/app/helpers/sessions_helper.rb index b4ac9eb1f..5d5d7e455 100644 --- a/web/app/helpers/sessions_helper.rb +++ b/web/app/helpers/sessions_helper.rb @@ -36,10 +36,11 @@ module SessionsHelper sign_in user # port over any shopping cart items - if has_anonymous_user? - shopping_carts = anonymous_user.shopping_carts + anon_user = anonymous_user + if anon_user + shopping_carts = anon_user.shopping_carts - ShoppingCart.move_to_user(user, anonymous_user, shopping_carts) + ShoppingCart.move_to_user(user, anon_user, shopping_carts) end if redirect diff --git a/web/app/uploaders/image_uploader.rb b/web/app/uploaders/image_uploader.rb index f094084d4..40cd27b10 100644 --- a/web/app/uploaders/image_uploader.rb +++ b/web/app/uploaders/image_uploader.rb @@ -1,9 +1,10 @@ # encoding: utf-8 class ImageUploader < CarrierWave::Uploader::Base - include CarrierWaveDirect::Uploader - include CarrierWave::MimeTypes - process :set_content_type + include CarrierWave::MiniMagick + #include CarrierWave::MimeTypes + + # Include the Sprockets helpers for Rails 3.1+ asset pipeline compatibility: def initialize(*) diff --git a/web/config/application.rb b/web/config/application.rb index 20d119d2d..2d66c47a3 100644 --- a/web/config/application.rb +++ b/web/config/application.rb @@ -44,6 +44,13 @@ if defined?(Bundler) # If you want your assets lazily compiled in production, use this line # Bundler.require(:default, :assets, Rails.env) end + + begin + gem_path = Gem::Specification.find_by_name("filepicker-rails").gem_dir + require "#{gem_path}/app/helpers/filepicker_rails/form_helper" + rescue => e + puts "Failed to load filepicker helper: #{e}" + end include JamRuby # require "rails/test_unit/railtie" diff --git a/web/config/environments/cucumber.rb b/web/config/environments/cucumber.rb index a522ddcda..6d25a1a75 100644 --- a/web/config/environments/cucumber.rb +++ b/web/config/environments/cucumber.rb @@ -12,7 +12,7 @@ SampleApp::Application.configure do config.static_cache_control = "public, max-age=3600" # Log error messages when you accidentally call methods on nil - config.whiny_nils = true + # config.whiny_nils = true # Show full error reports and disable caching config.consider_all_requests_local = true @@ -30,7 +30,7 @@ SampleApp::Application.configure do config.action_mailer.delivery_method = :test # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict + # config.active_record.mass_assignment_sanitizer = :strict # Print deprecation notices to the stderr config.active_support.deprecation = :stderr diff --git a/web/config/environments/development.rb b/web/config/environments/development.rb index 5f550f5f5..dda10f033 100644 --- a/web/config/environments/development.rb +++ b/web/config/environments/development.rb @@ -18,7 +18,7 @@ SampleApp::Application.configure do config.cache_classes = false # Log error messages when you accidentally call methods on nil. - config.whiny_nils = true + # config.whiny_nils = true # Show full error reports and disable caching config.consider_all_requests_local = true @@ -33,10 +33,10 @@ SampleApp::Application.configure do config.active_support.deprecation = :log # Only use best-standards-support built into browsers - config.action_dispatch.best_standards_support = :builtin + # config.action_dispatch.best_standards_support = :builtin # Raise exception on mass assignment protection for Active Record models - config.active_record.mass_assignment_sanitizer = :strict + # config.active_record.mass_assignment_sanitizer = :strict # Do not compress assets config.assets.compress = false diff --git a/web/config/environments/test.rb b/web/config/environments/test.rb index 9d2f7c5af..adc112f77 100644 --- a/web/config/environments/test.rb +++ b/web/config/environments/test.rb @@ -6,6 +6,7 @@ SampleApp::Application.configure do # your test database is "scratch space" for the test suite and is wiped # and recreated between test runs. Don't rely on the data there! config.cache_classes = true + config.eager_load = true # Configure static asset server for tests with Cache-Control for performance config.serve_static_files = true diff --git a/web/config/initializers/bugsnag.rb b/web/config/initializers/bugsnag.rb index c171ca4b9..3f85b5d15 100644 --- a/web/config/initializers/bugsnag.rb +++ b/web/config/initializers/bugsnag.rb @@ -1,6 +1,7 @@ +require 'jam_web/version' + Bugsnag.configure do |config| config.api_key = Rails.application.config.bugsnag_key - config.use_ssl = false config.notify_release_stages = Rails.application.config.bugsnag_notify_release_stages config.auto_notify = true config.app_version = JamWeb::VERSION diff --git a/web/config/initializers/influxdb-rails.rb b/web/config/initializers/influxdb-rails.rb index 30c205b9c..5c1fa7b1d 100644 --- a/web/config/initializers/influxdb-rails.rb +++ b/web/config/initializers/influxdb-rails.rb @@ -7,7 +7,7 @@ InfluxDB::Rails.configure do |config| config.ignored_environments = Rails.application.config.influxdb_ignored_environments config.async = true config.debug = false - config.logger = Logging.logger['InfluxDB'] + #config.logger = Logging.logger['InfluxDB'] config.series_name_for_controller_runtimes = "web.rails.controller" config.series_name_for_view_runtimes = "web.rails.view" diff --git a/web/config/initializers/jam_ruby/promotional.rb b/web/config/initializers/jam_ruby/promotional.rb index 7d58bf09d..4931178e2 100644 --- a/web/config/initializers/jam_ruby/promotional.rb +++ b/web/config/initializers/jam_ruby/promotional.rb @@ -1,3 +1,5 @@ +require 'image_uploader' + class JamRuby::PromoBuzz < JamRuby::Promotional mount_uploader :image, ImageUploader end diff --git a/web/lib/max_mind_manager.rb b/web/lib/max_mind_manager.rb index db630195c..fef983f74 100644 --- a/web/lib/max_mind_manager.rb +++ b/web/lib/max_mind_manager.rb @@ -1,4 +1,4 @@ -class MaxMindManager < BaseManager +class MaxMindManager < JamRuby::BaseManager def initialize(options={}) super(options) diff --git a/web/spec/controllers/api_affiliate_controller_spec.rb b/web/spec/controllers/api_affiliate_controller_spec.rb index 953cb9d55..e9d28db1f 100644 --- a/web/spec/controllers/api_affiliate_controller_spec.rb +++ b/web/spec/controllers/api_affiliate_controller_spec.rb @@ -15,7 +15,7 @@ describe ApiAffiliateController, type: :controller do describe "traffic_index" do it "empty" do get :traffic_index - response.should be_success + response.should be_successful JSON.parse(response.body)['traffics'].should eq([]) end @@ -23,7 +23,7 @@ describe ApiAffiliateController, type: :controller do traffic_total = FactoryBot.create(:affiliate_traffic_total, affiliate_partner: partner1, visits: 5, signups: 0, day:Date.today) get :traffic_index - response.should be_success + response.should be_successful JSON.parse(response.body)['traffics'].should eq([{"day" => Date.today.to_s, "visits" => 5, "signups" => 0, "affiliate_partner_id" => partner1.id}]) end end @@ -31,7 +31,7 @@ describe ApiAffiliateController, type: :controller do describe "monthly_index" do it "empty" do get :monthly_index - response.should be_success + response.should be_successful JSON.parse(response.body)['monthlies'].should eq([]) end @@ -39,7 +39,7 @@ describe ApiAffiliateController, type: :controller do monthly = FactoryBot.create(:affiliate_monthly_payment, affiliate_partner: partner1, closed: true, due_amount_in_cents: 20, month: 1, year: 2015) get :monthly_index - response.should be_success + response.should be_successful JSON.parse(response.body)['monthlies'].should eq([{"closed" => true, "month" => 1, "year" => 2015, "due_amount_in_cents" => 20, "affiliate_partner_id" => partner1.id}]) end end @@ -48,7 +48,7 @@ describe ApiAffiliateController, type: :controller do describe "quarterly_index" do it "empty" do get :quarterly_index - response.should be_success + response.should be_successful JSON.parse(response.body)['quarterlies'].should eq([]) end @@ -56,7 +56,7 @@ describe ApiAffiliateController, type: :controller do quarterly = FactoryBot.create(:affiliate_quarterly_payment, affiliate_partner: partner1, paid: true, closed: true, due_amount_in_cents: 20, quarter: 1, year: 2015) get :quarterly_index - response.should be_success + response.should be_successful JSON.parse(response.body)['quarterlies'].should eq([{"closed" => true, "paid" => true, "quarter" => 1, "year" => 2015, "due_amount_in_cents" => 20, "affiliate_partner_id" => partner1.id}]) end @@ -65,7 +65,7 @@ describe ApiAffiliateController, type: :controller do quarterly = FactoryBot.create(:affiliate_quarterly_payment, affiliate_partner: partner1, paid: false, closed: true, due_amount_in_cents: 20, quarter: 1, year: 2015) get :quarterly_index - response.should be_success + response.should be_successful JSON.parse(response.body)['quarterlies'].should eq([]) end @@ -74,7 +74,7 @@ describe ApiAffiliateController, type: :controller do quarterly = FactoryBot.create(:affiliate_quarterly_payment, affiliate_partner: partner1, paid: true, closed: false, due_amount_in_cents: 20, quarter: 1, year: 2015) get :quarterly_index - response.should be_success + response.should be_successful JSON.parse(response.body)['quarterlies'].should eq([]) end end @@ -82,7 +82,7 @@ describe ApiAffiliateController, type: :controller do describe "payment_index" do it "empty" do get :payment_index - response.should be_success + response.should be_successful JSON.parse(response.body)['payments'].should eq([]) end @@ -90,7 +90,7 @@ describe ApiAffiliateController, type: :controller do FactoryBot.create(:affiliate_monthly_payment, affiliate_partner: partner1, closed: true, due_amount_in_cents: 20, month: 1, year: 2015, jamtracks_sold: 1) get :payment_index - response.should be_success + response.should be_successful JSON.parse(response.body)['payments'].should eq([{"closed" => true, "paid" => nil, "payment_type" => "monthly", "quarter" => nil, "month" => 1, "year" => 2015, "due_amount_in_cents" => 20, "affiliate_partner_id" => partner1.id, "jamtracks_sold" => 1, "subscriptions" => [] }]) end @@ -106,7 +106,7 @@ describe ApiAffiliateController, type: :controller do AffiliatePartner.tally_up(Date.new(2015, 1, 1)) get :payment_index - response.should be_success + response.should be_successful expect(JSON.parse(response.body)['payments']).to have(6).things expect(JSON.parse(response.body)['payments']).to include({"closed" => false, "paid" => nil, "payment_type" => "monthly", "quarter" => nil, "month" => 1, "year" => 2015, "due_amount_in_cents" => 15, "affiliate_partner_id" => partner1.id, "jamtracks_sold" => 0, "subscriptions" => [{ "plan" => "jamsubsilver", "count" => 1 }] }) end diff --git a/web/spec/controllers/api_app_features_controller_spec.rb b/web/spec/controllers/api_app_features_controller_spec.rb index 9c5493b07..2edffbbaf 100644 --- a/web/spec/controllers/api_app_features_controller_spec.rb +++ b/web/spec/controllers/api_app_features_controller_spec.rb @@ -12,8 +12,8 @@ describe ApiAppFeaturesController, type: :controller do describe "index" do it "returns app features of env" do FactoryBot.create(:app_feature, env: 'production') - get :index, env: 'production' - response.should be_success + get :index, params: { env: 'production' } + response.should be_successful json = JSON.parse(response.body, :symbolize_names => true) json.should have(1).item end diff --git a/web/spec/controllers/api_claimed_recordings_spec.rb b/web/spec/controllers/api_claimed_recordings_spec.rb index 77c1c6966..066db2efd 100644 --- a/web/spec/controllers/api_claimed_recordings_spec.rb +++ b/web/spec/controllers/api_claimed_recordings_spec.rb @@ -27,8 +27,8 @@ describe ApiClaimedRecordingsController, type: :controller do it "should show the right thing when one recording just finished" do controller.current_user = @user - get :show, {format:'json', id: @claimed_recording.id} - response.should be_success + get :show, params: { format:'json', id: @claimed_recording.id } + response.should be_successful json = JSON.parse(response.body) json.should_not be_nil json["id"].should == @claimed_recording.id @@ -46,8 +46,8 @@ describe ApiClaimedRecordingsController, type: :controller do pending @recording.recorded_tracks.first.upload_complete controller.current_user = @user - get :show, :id => @claimed_recording.id - response.should be_success + get :show, params: { :id => @claimed_recording.id } + response.should be_successful json = JSON.parse(response.body) json.should_not be_nil json["recording"]["mixes"].length.should == 1 @@ -63,8 +63,8 @@ describe ApiClaimedRecordingsController, type: :controller do @mix = Mix.next("server") @mix.finish(10000, "md5") controller.current_user = @user - get :show, :id => @claimed_recording.id - response.should be_success + get :show, params: { :id => @claimed_recording.id } + response.should be_successful json = JSON.parse(response.body) json.should_not be_nil json["recording"]["mixes"].length.should == 1 @@ -77,7 +77,7 @@ describe ApiClaimedRecordingsController, type: :controller do it "should generate a single output" do controller.current_user = @user get :index - response.should be_success + response.should be_successful json = JSON.parse(response.body) json.should_not be_nil json.length.should == 1 @@ -89,25 +89,25 @@ describe ApiClaimedRecordingsController, type: :controller do describe "download" do it "no mix" do controller.current_user = @user - get :download, id: @claimed_recording.id + get :download, params: { id: @claimed_recording.id } response.status.should == 404 end it "quick mix, not completed" do quick_mix = FactoryBot.create(:quick_mix) controller.current_user = @user - get :download, id: quick_mix.recording.candidate_claimed_recording.id + get :download, params: { id: quick_mix.recording.candidate_claimed_recording.id } response.status.should == 404 end it "quick mix, completed" do quick_mix = FactoryBot.create(:quick_mix_completed) controller.current_user = @user - get :download, id: quick_mix.recording.candidate_claimed_recording.id + get :download, params: { id: quick_mix.recording.candidate_claimed_recording.id } response.status.should == 302 response.headers['Location'].include?('recordings/ogg').should be true - get :download, id: quick_mix.recording.candidate_claimed_recording.id, type:'mp3' + get :download, params: { id: quick_mix.recording.candidate_claimed_recording.id, type:'mp3' } response.status.should == 302 response.headers['Location'].include?('recordings/mp3').should be true end @@ -115,18 +115,18 @@ describe ApiClaimedRecordingsController, type: :controller do it "final mix, not completed" do mix = FactoryBot.create(:mix, completed:false) controller.current_user = @user - get :download, id: mix.recording.candidate_claimed_recording.id + get :download, params: { id: mix.recording.candidate_claimed_recording.id } response.status.should == 404 end it "final mix, completed" do mix = FactoryBot.create(:mix, completed:true) controller.current_user = @user - get :download, id: mix.recording.candidate_claimed_recording.id + get :download, params: { id: mix.recording.candidate_claimed_recording.id } response.status.should == 302 response.headers['Location'].include?('recordings/mixed/ogg').should be true - get :download, id: mix.recording.candidate_claimed_recording.id, type:'mp3' + get :download, params: { id: mix.recording.candidate_claimed_recording.id, type:'mp3' } response.status.should == 302 response.headers['Location'].include?('recordings/mixed/mp3').should be true end @@ -136,11 +136,11 @@ describe ApiClaimedRecordingsController, type: :controller do mix = FactoryBot.create(:mix, completed:true) quick_mix = FactoryBot.create(:quick_mix_completed, recording: mix.recording, user: mix.recording.owner) controller.current_user = @user - get :download, id: mix.recording.candidate_claimed_recording.id + get :download, params: { id: mix.recording.candidate_claimed_recording.id } response.status.should == 302 response.headers['Location'].include?('recordings/mixed/ogg').should be true - get :download, id: mix.recording.candidate_claimed_recording.id, type:'mp3' + get :download, params: { id: mix.recording.candidate_claimed_recording.id, type:'mp3' } response.status.should == 302 response.headers['Location'].include?('recordings/mixed/mp3').should be true end @@ -150,11 +150,11 @@ describe ApiClaimedRecordingsController, type: :controller do mix = FactoryBot.create(:mix, completed:false) quick_mix = FactoryBot.create(:quick_mix_completed, recording: mix.recording, user: mix.recording.owner) controller.current_user = @user - get :download, id: mix.recording.candidate_claimed_recording.id + get :download, params: { id: mix.recording.candidate_claimed_recording.id } response.status.should == 302 response.headers['Location'].include?('recordings/ogg').should be true - get :download, id: quick_mix.recording.candidate_claimed_recording.id, type:'mp3' + get :download, params: { id: quick_mix.recording.candidate_claimed_recording.id, type:'mp3' } response.status.should == 302 response.headers['Location'].include?('recordings/mp3').should be true end @@ -167,11 +167,11 @@ describe ApiClaimedRecordingsController, type: :controller do describe "DELETE 'destroy'" do it "should delete properly" do controller.current_user = @user - delete :delete, :id => @claimed_recording.id + delete :delete, params: { :id => @claimed_recording.id } puts response puts response.body - response.should be_success + response.should be_successful expect { ClaimedRecording.find(@claimed_recording.id) }.to raise_error end end diff --git a/web/spec/controllers/api_corporate_controller_spec.rb b/web/spec/controllers/api_corporate_controller_spec.rb index 9aea5c6f2..547f0f446 100644 --- a/web/spec/controllers/api_corporate_controller_spec.rb +++ b/web/spec/controllers/api_corporate_controller_spec.rb @@ -9,8 +9,8 @@ describe ApiCorporateController, type: :controller do describe "success" do it "should work" do - post :feedback, :email => "seth@jamkazam.com", :body => "Hey could someone help me?" - response.should be_success + post :feedback, params: { :email => "seth@jamkazam.com", :body => "Hey could someone help me?" } + response.should be_successful CorpMailer.deliveries.length.should == 1 end @@ -18,7 +18,7 @@ describe ApiCorporateController, type: :controller do describe "fail" do it "should fail due to bad email" do - post :feedback, :email => "seth", :body => "Hey could someone help me?" + post :feedback, params: { :email => "seth", :body => "Hey could someone help me?" } response.status.should == 422 CorpMailer.deliveries.length.should == 0 error = JSON.parse(response.body) diff --git a/web/spec/controllers/api_favorites_controller_spec.rb b/web/spec/controllers/api_favorites_controller_spec.rb index 84fff2457..97064630d 100644 --- a/web/spec/controllers/api_favorites_controller_spec.rb +++ b/web/spec/controllers/api_favorites_controller_spec.rb @@ -28,8 +28,7 @@ describe ApiFavoritesController, type: :controller do it "can return nothing" do controller.current_user = user - get :index, { user: user} - + get :index, params: { user: user } json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 0 json[:since].should be_nil @@ -40,8 +39,7 @@ describe ApiFavoritesController, type: :controller do like = FactoryBot.create(:recording_like, user: user, claimed_recording: claimed_recording, recording: claimed_recording.recording, favorite: true) controller.current_user = user - get :index, { user: user} - + get :index, params: { user: user } json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 1 json[:since].should be_nil @@ -52,20 +50,20 @@ describe ApiFavoritesController, type: :controller do describe "update" do it "insists on login" do - post :update, {id: '1'} + post :update, params: { id: '1' } response.status.should == 403 end it "404 if no like for record" do controller.current_user = user - post :update, {id: claimed_recording.id} + post :update, params: { id: claimed_recording.id } response.status.should == 404 end it "no favorite specified leaves record alone" do controller.current_user = user like = FactoryBot.create(:recording_like, user: user, claimed_recording: claimed_recording, recording: claimed_recording.recording, favorite: true) - post :update, {:format => 'json', id: claimed_recording.id} + post :update, params: { :format => 'json', id: claimed_recording.id } response.status.should == 200 like.reload @@ -75,7 +73,7 @@ describe ApiFavoritesController, type: :controller do it "can set favorite to false" do controller.current_user = user like = FactoryBot.create(:recording_like, user: user, claimed_recording: claimed_recording, recording: claimed_recording.recording, favorite: true) - post :update, {:format => 'json', id: claimed_recording.id, favorite:false} + post :update, params: { :format => 'json', id: claimed_recording.id, favorite:false } response.status.should == 200 like.reload diff --git a/web/spec/controllers/api_feeds_controller_spec.rb b/web/spec/controllers/api_feeds_controller_spec.rb index 8a62881d1..12bc63ae9 100644 --- a/web/spec/controllers/api_feeds_controller_spec.rb +++ b/web/spec/controllers/api_feeds_controller_spec.rb @@ -60,7 +60,7 @@ describe ApiFeedsController, type: :controller do json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 1 - get :index, { time_range:'today' } + get :index, params: { time_range:'today' } json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 0 end @@ -75,12 +75,12 @@ describe ApiFeedsController, type: :controller do json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 2 - get :index, { type: 'recording'} + get :index, params: { type: 'recording' } json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 1 json[:entries][0][:type].should == 'recording' - get :index, { type: 'music_session'} + get :index, params: { type: 'music_session' } json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 1 json[:entries][0][:type].should == 'music_session' @@ -97,19 +97,19 @@ describe ApiFeedsController, type: :controller do ams = ActiveMusicSession.find(claimed_recording.recording.music_session.music_session.id) ams.before_destroy - get :index, { limit: 1 } + get :index, params: { limit: 1 } json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 1 _next = json[:next_page] _next.should_not be_nil - get :index, { limit: 1, next_page: _next } + get :index, params: { limit: 1, next_page: _next } json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 1 _next = json[:next_page] _next.should_not be_nil - get :index, { limit: 1, next_page: _next } + get :index, params: { limit: 1, next_page: _next } json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 0 _next = json[:next_page] @@ -124,7 +124,7 @@ describe ApiFeedsController, type: :controller do music_session.music_session.save! controller.current_user = music_session.creator - get :index, { user: music_session.creator.id } + get :index, params: { user: music_session.creator.id } json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 1 @@ -139,7 +139,7 @@ describe ApiFeedsController, type: :controller do music_session.music_session.reload music_session.music_session.fan_access.should be false - get :index, { user: music_session.creator.id } + get :index, params: { user: music_session.creator.id } json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 1 @@ -161,7 +161,7 @@ describe ApiFeedsController, type: :controller do controller.current_user = user - get :index, { band: band.id } + get :index, params: { band: band.id } json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 1 @@ -181,7 +181,7 @@ describe ApiFeedsController, type: :controller do controller.current_user = user2 - get :index, { band: band.id } + get :index, params: { band: band.id } json = JSON.parse(response.body, :symbolize_names => true) json[:entries].length.should == 1 diff --git a/web/spec/controllers/api_icecast_controller_spec.rb b/web/spec/controllers/api_icecast_controller_spec.rb index 8febaac57..035ea7196 100644 --- a/web/spec/controllers/api_icecast_controller_spec.rb +++ b/web/spec/controllers/api_icecast_controller_spec.rb @@ -14,8 +14,7 @@ describe ApiIcecastController, type: :controller do it "success" do - post :create_source_change, {format:'json', id: mount.id, success: true, source_direction: true, reason: 'blah', client_id: 'abc'} - + post :create_source_change, params: { format:'json', id: mount.id, success: true, source_direction: true, reason: 'blah', client_id: 'abc' } response.status.should == 200 end end diff --git a/web/spec/controllers/api_jam_track_mixdowns_controller_spec.rb b/web/spec/controllers/api_jam_track_mixdowns_controller_spec.rb index 5ef263ab9..fcf1c9be9 100644 --- a/web/spec/controllers/api_jam_track_mixdowns_controller_spec.rb +++ b/web/spec/controllers/api_jam_track_mixdowns_controller_spec.rb @@ -19,7 +19,7 @@ describe ApiJamTrackMixdownsController, type: :controller do it "one result" do # make a mixdown with no packages - get :index, {id: mixdown.jam_track.id} + get :index, params: { id: mixdown.jam_track.id } response.status.should eq(200) json = JSON.parse(response.body) json["next"].should be_nil @@ -29,7 +29,7 @@ describe ApiJamTrackMixdownsController, type: :controller do # and then add a package package = FactoryBot.create(:jam_track_mixdown_package, jam_track_mixdown: mixdown) - get :index, {id: mixdown.jam_track.id} + get :index, params: { id: mixdown.jam_track.id } response.status.should eq(200) json = JSON.parse(response.body) json["next"].should be_nil @@ -41,8 +41,7 @@ describe ApiJamTrackMixdownsController, type: :controller do describe "create" do it "success" do - post :create, {:format => 'json', jamTrackID: jam_track.id, name: 'some name', description: 'some description', settings: {speed:5}} - + post :create, params: { :format => 'json', jamTrackID: jam_track.id, name: 'some name', description: 'some description', settings: {speed:5} } response.status.should eq(200) json = JSON.parse(response.body) @@ -54,8 +53,7 @@ describe ApiJamTrackMixdownsController, type: :controller do end it "validates name" do - post :create, {:format => 'json', jamTrackID: jam_track.id, description: 'some description', settings: {speed:5}} - + post :create, params: { :format => 'json', jamTrackID: jam_track.id, description: 'some description', settings: {speed:5} } response.status.should eq(422) json = JSON.parse(response.body) @@ -67,8 +65,7 @@ describe ApiJamTrackMixdownsController, type: :controller do it "success" do jam_track_right.touch - post :enqueue, {:format => 'json', id: mixdown.id, file_type: JamTrackMixdownPackage::FILE_TYPE_AAC, encrypt_type: nil, sample_rate: 48} - + post :enqueue, params: { :format => 'json', id: mixdown.id, file_type: JamTrackMixdownPackage::FILE_TYPE_AAC, encrypt_type: nil, sample_rate: 48 } response.status.should eq(200) json = JSON.parse(response.body) @@ -83,8 +80,7 @@ describe ApiJamTrackMixdownsController, type: :controller do it "validates file_type" do jam_track_right.touch - post :enqueue, {:format => 'json', id: mixdown.id, file_type: 'wrong', encrypt_type: nil, sample_rate: 48} - + post :enqueue, params: { :format => 'json', id: mixdown.id, file_type: 'wrong', encrypt_type: nil, sample_rate: 48 } response.status.should eq(422) json = JSON.parse(response.body) @@ -97,8 +93,7 @@ describe ApiJamTrackMixdownsController, type: :controller do JamTrackMixdownPackage.count.should eq(1) package.jam_track_mixdown.should eq(mixdown) - post :enqueue, {:format => 'json', id: mixdown.id, file_type: package.file_type, encrypt_type: package.encrypt_type, sample_rate: package.sample_rate} - + post :enqueue, params: { :format => 'json', id: mixdown.id, file_type: package.file_type, encrypt_type: package.encrypt_type, sample_rate: package.sample_rate } response.status.should eq(200) json = JSON.parse(response.body) @@ -115,8 +110,7 @@ describe ApiJamTrackMixdownsController, type: :controller do jam_track_right.touch package.touch - post :download, {:format => 'json', id: mixdown.id, file_type: package.file_type, encrypt_type: package.encrypt_type, sample_rate: package.sample_rate} - + post :download, params: { :format => 'json', id: mixdown.id, file_type: package.file_type, encrypt_type: package.encrypt_type, sample_rate: package.sample_rate } response.status.should eq(202) json = JSON.parse(response.body) @@ -135,8 +129,7 @@ describe ApiJamTrackMixdownsController, type: :controller do package.url = 'some/bogus/place' package.save! - post :download, {:format => 'json', id: mixdown.id, file_type: package.file_type, encrypt_type: package.encrypt_type, sample_rate: package.sample_rate} - + post :download, params: { :format => 'json', id: mixdown.id, file_type: package.file_type, encrypt_type: package.encrypt_type, sample_rate: package.sample_rate } response.status.should eq(302) response['Location'].should include('/some/bogus/place') diff --git a/web/spec/controllers/api_jam_tracks_controller_spec.rb b/web/spec/controllers/api_jam_tracks_controller_spec.rb index 143140c23..c361ce85c 100644 --- a/web/spec/controllers/api_jam_tracks_controller_spec.rb +++ b/web/spec/controllers/api_jam_tracks_controller_spec.rb @@ -28,8 +28,7 @@ describe ApiJamTracksController, type: :controller do describe "ios_order_placed" do it "succeeds" do - post :ios_order_placed, { jam_track_id: @jam_track.id } - + post :ios_order_placed, params: { jam_track_id: @jam_track.id } response.status.should == 200 right = @jam_track.right_for_user(@user) right.id.should eq(JSON.parse(response.body)["jam_track_right_id"]) @@ -44,7 +43,7 @@ describe ApiJamTracksController, type: :controller do it "can see unavailable" do get :index - response.should be_success + response.should be_successful json = JSON.parse(response.body) json["next"].should be_nil json["jamtracks"].length.should == 2 @@ -52,7 +51,7 @@ describe ApiJamTracksController, type: :controller do # Create another unavailable track and see: jam_track2 = FactoryBot.create(:jam_track, :status => 'Staging') get :index - response.should be_success + response.should be_successful json = JSON.parse(response.body) json["next"].should be_nil json["jamtracks"].length.should == 3 @@ -62,14 +61,14 @@ describe ApiJamTracksController, type: :controller do describe "download functionality" do it "lists available tracks" do get :index - response.should be_success + response.should be_successful json = JSON.parse(response.body) json["next"].should be_nil json["jamtracks"].length.should == 1 jam_track2 = FactoryBot.create(:jam_track) get :index - response.should be_success + response.should be_successful json = JSON.parse(response.body) json["next"].should be_nil json["jamtracks"].length.should == 2 @@ -78,9 +77,8 @@ describe ApiJamTracksController, type: :controller do it "finds a download" do #get "/download/#{right.id}/" right = JamTrackRight.create(:user=>@user, :jam_track=>@jam_track) - get :download, { :format=>'json', :id=>@jam_track.id, all_fp: 'all', running_fp: 'running' } - - response.should be_success + get :download, params: { :format=>'json', :id=>@jam_track.id, all_fp: 'all', running_fp: 'running' } + response.should be_successful response.status.should == 202 response.body.should =~ /not available.*/ end @@ -89,7 +87,7 @@ describe ApiJamTracksController, type: :controller do describe "purchased" do it "can return empty" do get :purchased - response.should be_success + response.should be_successful json = JSON.parse(response.body) json['jamtracks'].length.should eq(0) json['next'].should eq(nil) @@ -100,7 +98,7 @@ describe ApiJamTracksController, type: :controller do right = FactoryBot.create(:jam_track_right, jam_track: @jam_track, user: @user) get :purchased - response.should be_success + response.should be_successful json = JSON.parse(response.body) json['jamtracks'].length.should eq(1) json['jamtracks'][0]['jam_track_right_id'].should eq(right.id) @@ -110,21 +108,21 @@ describe ApiJamTracksController, type: :controller do describe "jamtrack plays" do it "handle api call success" do - post :played, { id: @jam_track.id, user: @user } + post :played, params: { id: @jam_track.id, user: @user } expect(response.status).to eq(201) json = JSON.parse(response.body) expect(json.length).to eq(0) end it "handle api call 400" do - post :played, { id: '', user: @user } + post :played, params: { id: '', user: @user } expect(response.status).to eq(400) json = JSON.parse(response.body) expect(/JamTrack ID required/).to match(json['message']) end it "handle api call 500" do - post :played, { id: 999, user: @user } + post :played, params: { id: 999, user: @user } expect(response.status).to eq(422) json = JSON.parse(response.body) expect(/Unexpected error occurred/).to match(json['message']) @@ -158,11 +156,11 @@ describe ApiJamTracksController, type: :controller do it "download depends on rights" do fingerprint={all:'all', running:'running'} - get :download, :id=>@jam_track.id, sample_rate: 48, all_fp: 'all', running_fp: 'running' + get :download, params: { :id=>@jam_track.id, sample_rate: 48, all_fp: 'all', running_fp: 'running' } response.status.should == 403 right = JamTrackRight.create(:user=>@user, :jam_track=>@jam_track) - get :download, :id=>@jam_track.id, sample_rate: 48, all_fp: 'all', running_fp: 'running' + get :download, params: { :id=>@jam_track.id, sample_rate: 48, all_fp: 'all', running_fp: 'running' } response.status.should == 202 right.download_count.should eq(0) right.private_key_44.should_not be_nil @@ -181,7 +179,7 @@ describe ApiJamTracksController, type: :controller do right.private_key_48.should_not be_nil right.download_count.should eq(0) - get :download, :id=>@jam_track.id, sample_rate: 48, all_fp: 'all', running_fp: 'running' + get :download, params: { :id=>@jam_track.id, sample_rate: 48, all_fp: 'all', running_fp: 'running' } response.status.should == 302 response.location.should =~ /.*#{Regexp.escape(right.filename(:url_48))}.*/ right.reload @@ -189,11 +187,11 @@ describe ApiJamTracksController, type: :controller do end it "supports multiple bitrates" do - get :download, :id=>@jam_track.id, :sample_rate=>44, all_fp: 'all', running_fp: 'running' + get :download, params: { :id=>@jam_track.id, :sample_rate=>44, all_fp: 'all', running_fp: 'running' } response.status.should == 403 right = JamTrackRight.create(:user=>@user, :jam_track=>@jam_track) - get :download, :id=>@jam_track.id, :sample_rate=>44, all_fp: 'all', running_fp: 'running' + get :download, params: { :id=>@jam_track.id, :sample_rate=>44, all_fp: 'all', running_fp: 'running' } response.status.should == 202 right.download_count.should eq(0) right.private_key_44.should_not be_nil @@ -212,7 +210,7 @@ describe ApiJamTracksController, type: :controller do right.private_key_48.should_not be_nil right.download_count.should eq(0) - get :download, :id=>@jam_track.id, :sample_rate=>44, all_fp: 'all', running_fp: 'running' + get :download, params: { :id=>@jam_track.id, :sample_rate=>44, all_fp: 'all', running_fp: 'running' } response.status.should == 302 response.location.should =~ /.*#{Regexp.escape(right.filename(:url_44))}.*/ right.reload @@ -222,14 +220,14 @@ describe ApiJamTracksController, type: :controller do describe "keys" do it "empty" do - get :keys, jamtracks: {tracks: []} + get :keys, params: { jamtracks: {tracks: []} } response.status.should == 200 json = JSON.parse(response.body) json.length == 0 end it "track with no rights" do - get :keys, jamtracks: { tracks: ["#{@jam_track.id}-44"] } + get :keys, params: { jamtracks: { tracks: ["#{@jam_track.id}-44"] } } response.status.should == 200 json = JSON.parse(response.body) json.length.should == 1 @@ -244,7 +242,7 @@ describe ApiJamTracksController, type: :controller do right = FactoryBot.create(:jam_track_right, user: @user, private_key_44: nil, private_key_48:nil, jam_track: @jam_track) - get :keys, jamtracks: { tracks: ["#{@jam_track.id}-44", "#{@jam_track.id}-48"] } + get :keys, params: { jamtracks: { tracks: ["#{@jam_track.id}-44", "#{@jam_track.id}-48"] } } response.status.should == 200 json = JSON.parse(response.body) json.length.should == 1 @@ -258,7 +256,7 @@ describe ApiJamTracksController, type: :controller do it "track with key" do right = FactoryBot.create(:jam_track_right, user: @user, private_key_44: 'abc', private_key_48:nil, jam_track: @jam_track) - get :keys, jamtracks: { tracks: ["#{@jam_track.id}-44", "#{@jam_track.id}-48"] } + get :keys, params: { jamtracks: { tracks: ["#{@jam_track.id}-44", "#{@jam_track.id}-48"] } } response.status.should == 200 json = JSON.parse(response.body) json.length.should == 1 @@ -273,7 +271,7 @@ describe ApiJamTracksController, type: :controller do it "non-owning user asking for a real track" do right = FactoryBot.create(:jam_track_right, user: FactoryBot.create(:user), private_key_44: 'abc', private_key_48:nil, jam_track: @jam_track) - get :keys, jamtracks: { tracks: ["#{@jam_track.id}-44", "#{@jam_track.id}-48"] } + get :keys, params: { jamtracks: { tracks: ["#{@jam_track.id}-44", "#{@jam_track.id}-48"] } } response.status.should == 200 json = JSON.parse(response.body) json[0]['id'].should == @jam_track.id.to_s @@ -290,8 +288,8 @@ describe ApiJamTracksController, type: :controller do it "success" do right = FactoryBot.create(:jam_track_right, user: @user, signed_44: false, signed_48:false) right.signing_queued_at.should be_nil - post :enqueue, {:format=>'json', :id=>right.jam_track.id, fingerprint: {all: 'all', running: 'running'} } - response.should be_success + post :enqueue, params: { :format=>'json', :id=>right.jam_track.id, fingerprint: {all: 'all', running: 'running'} } + response.should be_successful right.reload right.signing_queued_at.should_not be_nil @@ -302,8 +300,8 @@ describe ApiJamTracksController, type: :controller do it "success" do right = FactoryBot.create(:jam_track_right, user: @user) - get :show_jam_track_right, {:id=>right.jam_track.id} - response.should be_success + get :show_jam_track_right, params: { :id=>right.jam_track.id } + response.should be_successful json = JSON.parse(response.body) json['signing_state'].should eq('QUIET') json['error_count'].should eq(0) @@ -320,7 +318,7 @@ describe ApiJamTracksController, type: :controller do right = JamTrackRight.create(:user=>@user, :jam_track=>@jam_track) right.redeemed = true right.save! - get :download, :id=>@jam_track.id, sample_rate: 48, all_fp: 'all', running_fp: 'running' + get :download, params: { :id=>@jam_track.id, sample_rate: 48, all_fp: 'all', running_fp: 'running' } response.status.should == 202 MachineFingerprint.count.should eq(2) @@ -331,7 +329,7 @@ describe ApiJamTracksController, type: :controller do right = JamTrackRight.create(:user=>user2, :jam_track=>@jam_track) right.redeemed = true right.save! - get :download, :id=>@jam_track.id, sample_rate: 48, all_fp: 'all', running_fp: 'running' + get :download, params: { :id=>@jam_track.id, sample_rate: 48, all_fp: 'all', running_fp: 'running' } response.status.should == 202 # no error for the user... but we should have a FraudAlert @@ -343,8 +341,8 @@ describe ApiJamTracksController, type: :controller do right.redeemed = true right.save! right.signing_queued_at.should be_nil - post :enqueue, {:format=>'json', :id=>right.jam_track.id, fingerprint: {all: 'all', running: 'running'} } - response.should be_success + post :enqueue, params: { :format=>'json', :id=>right.jam_track.id, fingerprint: {all: 'all', running: 'running'} } + response.should be_successful user2 = FactoryBot.create(:user) @@ -354,9 +352,9 @@ describe ApiJamTracksController, type: :controller do right.redeemed = true right.save! right.signing_queued_at.should be_nil - post :enqueue, {:format=>'json', :id=>right.jam_track.id, fingerprint: {all: 'all', running: 'running'} } + post :enqueue, params: { :format=>'json', :id=>right.jam_track.id, fingerprint: {all: 'all', running: 'running'} } response.status.should == 200 - get :download, :id=>@jam_track.id, sample_rate: 48, all_fp: 'all', running_fp: 'running' + get :download, params: { :id=>@jam_track.id, sample_rate: 48, all_fp: 'all', running_fp: 'running' } response.status.should == 202 FraudAlert.count.should eq(1) end diff --git a/web/spec/controllers/api_jamblasters_controller_spec.rb b/web/spec/controllers/api_jamblasters_controller_spec.rb index dcb8a95a1..65ab430f2 100644 --- a/web/spec/controllers/api_jamblasters_controller_spec.rb +++ b/web/spec/controllers/api_jamblasters_controller_spec.rb @@ -17,7 +17,7 @@ describe ApiJamblastersController, type: :controller do it "works" do connection1 = FactoryBot.create(:connection, :user => user, client_id: 'abc1') - get :can_pair, {:format => 'json', jbid: connection1.client_id, user_id: user.id} + get :can_pair, params: { :format => 'json', jbid: connection1.client_id, user_id: user.id } response.status.should == 200 end end @@ -30,21 +30,21 @@ describe ApiJamblastersController, type: :controller do end it "works" do - get :is_allowed, {:format => 'json', jbid: jamblaster.client_id, user_id: user.id} + get :is_allowed, params: { :format => 'json', jbid: jamblaster.client_id, user_id: user.id } response.status.should == 200 end #it "disallows different user" do # user2 = FactoryBot.create(:user) - # get :is_allowed, {:format => 'json', jbid: jamblaster.client_id, user_id: user2.id} + # get :is_allowed, params: { :format => 'json', jbid: jamblaster.client_id, user_id: user2.id } # response.status.should == 403 #end end describe "not already associated" do it "works" do - get :is_allowed, {:format => 'json', jbid: jamblaster.client_id, user_id: user.id} + get :is_allowed, params: { :format => 'json', jbid: jamblaster.client_id, user_id: user.id } response.status.should == 200 end end @@ -58,7 +58,7 @@ describe ApiJamblastersController, type: :controller do end it "works" do - get :auth_users, {:format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no} + get :auth_users, params: { :format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no } response.status.should == 200 json = JSON.parse(response.body) json["pairing"].should be nil @@ -67,7 +67,7 @@ describe ApiJamblastersController, type: :controller do pairing1 = FactoryBot.create(:jamblaster_pairing_request, user: user, jamblaster: jamblaster, vtoken:'token2', sibling_key:nil) - get :auth_users, {:format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no} + get :auth_users, params: { :format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no } response.status.should == 200 json = JSON.parse(response.body) json["pairing"].should be nil @@ -75,7 +75,7 @@ describe ApiJamblastersController, type: :controller do pairing1.activate('abc') pairing1.errors.any?.should be false - get :auth_users, {:format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no} + get :auth_users, params: { :format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no } response.status.should == 200 json = JSON.parse(response.body) json["pairing"]["key"].should eql 'abc' @@ -84,7 +84,7 @@ describe ApiJamblastersController, type: :controller do describe "not already associated" do it "works" do - get :auth_users, {:format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no} + get :auth_users, params: { :format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no } response.status.should == 200 json = JSON.parse(response.body) json["pairing"].should be nil @@ -100,7 +100,7 @@ describe ApiJamblastersController, type: :controller do } it "works" do - get :get_tokens, {:format => 'json'} + get :get_tokens, params: { :format => 'json' } response.status.should == 200 json = JSON.parse(response.body) json.length.should eq(0) @@ -111,7 +111,7 @@ describe ApiJamblastersController, type: :controller do user.jamblasters << jamblaster user.save! - get :get_tokens, {:format => 'json'} + get :get_tokens, params: { :format => 'json' } response.status.should == 200 json = JSON.parse(response.body) json.length.should eq(1) @@ -131,7 +131,7 @@ describe ApiJamblastersController, type: :controller do end it "works" do - post :start_pairing, {:format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken'} + post :start_pairing, params: { :format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken' } response.status.should == 200 json = JSON.parse(response.body) @@ -143,7 +143,7 @@ describe ApiJamblastersController, type: :controller do end it "returns 422 if bogus jamblaster" do - post :start_pairing, {:format => 'json', jbid: 'nada', vtoken: 'vtoken'} + post :start_pairing, params: { :format => 'json', jbid: 'nada', vtoken: 'vtoken' } json = JSON.parse(response.body) response.status.should == 422 json = JSON.parse(response.body) @@ -157,7 +157,7 @@ describe ApiJamblastersController, type: :controller do describe "not already associated" do it "works" do - post :start_pairing, {:format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken'} + post :start_pairing, params: { :format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken' } response.status.should == 200 json = JSON.parse(response.body) @@ -169,7 +169,7 @@ describe ApiJamblastersController, type: :controller do end it "returns 422 if bogus jamblaster" do - post :start_pairing, {:format => 'json', jbid: 'nada', vtoken: 'vtoken'} + post :start_pairing, params: { :format => 'json', jbid: 'nada', vtoken: 'vtoken' } json = JSON.parse(response.body) response.status.should == 422 json = JSON.parse(response.body) @@ -196,7 +196,7 @@ describe ApiJamblastersController, type: :controller do end it "works" do - post :start_pairing, {:format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken2'} + post :start_pairing, params: { :format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken2' } response.status.should == 200 request = JamblasterPairingRequest.where(jamblaster_client_id: jamblaster.client_id, vtoken: 'vtoken2', user_id: user.id).first @@ -205,7 +205,7 @@ describe ApiJamblastersController, type: :controller do request.vtoken.should eq 'vtoken2' request.jamblaster_client_id.should eq jamblaster.client_id - post :login, {:format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no, user_id: user.id, vtoken: 'vtoken2'} + post :login, params: { :format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no, user_id: user.id, vtoken: 'vtoken2' } json = JSON.parse(response.body) response.status.should == 200 end @@ -213,7 +213,7 @@ describe ApiJamblastersController, type: :controller do describe "not already associated" do it "works" do - post :start_pairing, {:format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken2'} + post :start_pairing, params: { :format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken2' } response.status.should == 200 request = JamblasterPairingRequest.where(jamblaster_client_id: jamblaster.client_id, vtoken: 'vtoken2', user_id: user.id).first @@ -222,7 +222,7 @@ describe ApiJamblastersController, type: :controller do request.vtoken.should eq 'vtoken2' request.jamblaster_client_id.should eq jamblaster.client_id - post :login, {:format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no, user_id: user.id, vtoken: 'vtoken2'} + post :login, params: { :format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no, user_id: user.id, vtoken: 'vtoken2' } json = JSON.parse(response.body) response.status.should == 200 end @@ -244,7 +244,7 @@ describe ApiJamblastersController, type: :controller do end it "works" do - post :start_pairing, {:format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken4'} + post :start_pairing, params: { :format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken4' } response.status.should == 200 request = JamblasterPairingRequest.where(jamblaster_client_id: jamblaster.client_id, vtoken: 'vtoken4', user_id: user.id).first @@ -253,16 +253,16 @@ describe ApiJamblastersController, type: :controller do request.vtoken.should eq 'vtoken4' request.jamblaster_client_id.should eq jamblaster.client_id - post :login, {:format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no, user_id: user.id, vtoken: 'vtoken4'} + post :login, params: { :format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no, user_id: user.id, vtoken: 'vtoken4' } json = JSON.parse(response.body) response.status.should == 200 - post :pair, {:format => 'json', vtoken: 'vtoken4', user_id: user.id, jbid: jamblaster.client_id, key: 'abc'} + post :pair, params: { :format => 'json', vtoken: 'vtoken4', user_id: user.id, jbid: jamblaster.client_id, key: 'abc' } response.status.should == 200 json = JSON.parse(response.body) json["id"].should eq jamblaster.id - get :get_tokens, {:format => 'json'} + get :get_tokens, params: { :format => 'json' } response.status.should == 200 json = JSON.parse(response.body) json.length.should eq(1) @@ -273,7 +273,7 @@ describe ApiJamblastersController, type: :controller do describe "not already associated" do it "works" do - post :start_pairing, {:format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken4'} + post :start_pairing, params: { :format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken4' } response.status.should == 200 request = JamblasterPairingRequest.where(jamblaster_client_id: jamblaster.client_id, vtoken: 'vtoken4', user_id: user.id).first @@ -282,19 +282,19 @@ describe ApiJamblastersController, type: :controller do request.vtoken.should eq 'vtoken4' request.jamblaster_client_id.should eq jamblaster.client_id - post :login, {:format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no, user_id: user.id, vtoken: 'vtoken4'} + post :login, params: { :format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no, user_id: user.id, vtoken: 'vtoken4' } json = JSON.parse(response.body) response.status.should == 200 jamblaster.reload jamblaster.users.include?(user).should be false - post :pair, {:format => 'json', vtoken: 'vtoken4', user_id: user.id, jbid: jamblaster.client_id, key: 'abc'} + post :pair, params: { :format => 'json', vtoken: 'vtoken4', user_id: user.id, jbid: jamblaster.client_id, key: 'abc' } response.status.should == 200 json = JSON.parse(response.body) json["id"].should eq jamblaster.id - get :get_tokens, {:format => 'json'} + get :get_tokens, params: { :format => 'json' } response.status.should == 200 json = JSON.parse(response.body) json.length.should eq(1) @@ -306,7 +306,7 @@ describe ApiJamblastersController, type: :controller do end it "across two users" do - post :start_pairing, {:format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken4'} + post :start_pairing, params: { :format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken4' } response.status.should == 200 request = JamblasterPairingRequest.where(jamblaster_client_id: jamblaster.client_id, vtoken: 'vtoken4', user_id: user.id).first @@ -315,19 +315,19 @@ describe ApiJamblastersController, type: :controller do request.vtoken.should eq 'vtoken4' request.jamblaster_client_id.should eq jamblaster.client_id - post :login, {:format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no, user_id: user.id, vtoken: 'vtoken4'} + post :login, params: { :format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no, user_id: user.id, vtoken: 'vtoken4' } json = JSON.parse(response.body) response.status.should == 200 jamblaster.reload jamblaster.users.include?(user).should be false - post :pair, {:format => 'json', vtoken: 'vtoken4', user_id: user.id, jbid: jamblaster.client_id, key: 'abc'} + post :pair, params: { :format => 'json', vtoken: 'vtoken4', user_id: user.id, jbid: jamblaster.client_id, key: 'abc' } response.status.should == 200 json = JSON.parse(response.body) json["id"].should eq jamblaster.id - get :get_tokens, {:format => 'json'} + get :get_tokens, params: { :format => 'json' } response.status.should == 200 json = JSON.parse(response.body) json.length.should eq(1) @@ -342,7 +342,7 @@ describe ApiJamblastersController, type: :controller do controller.current_user = user2 - post :start_pairing, {:format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken5'} + post :start_pairing, params: { :format => 'json', jbid: jamblaster.client_id, vtoken: 'vtoken5' } response.status.should == 200 puts "JSON.parse(response.body) #{JSON.parse(response.body)}" @@ -352,19 +352,19 @@ describe ApiJamblastersController, type: :controller do request.vtoken.should eq 'vtoken5' request.jamblaster_client_id.should eq jamblaster.client_id - post :login, {:format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no, user_id: user2.id, vtoken: 'vtoken5'} + post :login, params: { :format => 'json', jbid: jamblaster.client_id, serial_no: jamblaster.serial_no, user_id: user2.id, vtoken: 'vtoken5' } json = JSON.parse(response.body) response.status.should == 200 jamblaster.reload jamblaster.users.include?(user2).should be false - post :pair, {:format => 'json', vtoken: 'vtoken5', user_id: user2.id, jbid: jamblaster.client_id, key: 'abcd'} + post :pair, params: { :format => 'json', vtoken: 'vtoken5', user_id: user2.id, jbid: jamblaster.client_id, key: 'abcd' } response.status.should == 200 json = JSON.parse(response.body) json["id"].should eq jamblaster.id - get :get_tokens, {:format => 'json'} + get :get_tokens, params: { :format => 'json' } response.status.should == 200 json = JSON.parse(response.body) json.length.should eq(1) @@ -384,17 +384,17 @@ describe ApiJamblastersController, type: :controller do end it "get_tokens" do - get :get_tokens, {:format => 'json'} + get :get_tokens, params: { :format => 'json' } response.status.should == 200 end it "start_pairing" do - post :start_pairing, {:format => 'json'} + post :start_pairing, params: { :format => 'json' } response.status.should == 422 end it "pair" do - post :pair, {:format => 'json'} + post :pair, params: { :format => 'json' } response.status.should == 404 end end @@ -405,17 +405,17 @@ describe ApiJamblastersController, type: :controller do end it "get_tokens" do - get :get_tokens, {:format => 'json'} + get :get_tokens, params: { :format => 'json' } response.status.should == 403 end it "start_pairing" do - post :start_pairing, {:format => 'json'} + post :start_pairing, params: { :format => 'json' } response.status.should == 403 end it "pair" do - post :pair, {:format => 'json'} + post :pair, params: { :format => 'json' } response.status.should == 403 end end diff --git a/web/spec/controllers/api_links_controller_spec.rb b/web/spec/controllers/api_links_controller_spec.rb index 4329dbab5..d8c5f50cd 100644 --- a/web/spec/controllers/api_links_controller_spec.rb +++ b/web/spec/controllers/api_links_controller_spec.rb @@ -17,7 +17,7 @@ describe ApiLinksController, type: :controller do describe "jamtrack_song_index" do it "succeeds with empty data" do - get :jamtrack_song_index, format:'json', affiliate_id: partner1.id + get :jamtrack_song_index, params: { format:'json', affiliate_id: partner1.id } response.status.should eq(200) body = JSON.parse(response.body) body.length.should eq(0) @@ -25,7 +25,7 @@ describe ApiLinksController, type: :controller do it "succeeds with data" do jam_track = FactoryBot.create(:jam_track) - get :jamtrack_song_index, format:'json', affiliate_id: partner1.id + get :jamtrack_song_index, params: { format:'json', affiliate_id: partner1.id } response.status.should eq(200) body = JSON.parse(response.body) body.length.should eq(1) @@ -36,7 +36,7 @@ describe ApiLinksController, type: :controller do describe "jamkazam_general_index" do it "succeeds" do - get :jamkazam_general_index, format:'json', affiliate_id: partner1.id + get :jamkazam_general_index, params: { format:'json', affiliate_id: partner1.id } response.status.should eq(200) body = JSON.parse(response.body) body.length.should eq(3) @@ -68,7 +68,7 @@ describe ApiLinksController, type: :controller do } it "succeeds with no data" do - get :session_index, format:'json', affiliate_id: partner1.id + get :session_index, params: { format:'json', affiliate_id: partner1.id } response.status.should eq(200) body = JSON.parse(response.body) body.length.should eq(0) @@ -77,7 +77,7 @@ describe ApiLinksController, type: :controller do it "succeeds with one scheduled session" do session = MusicSession.create(user_partner1, open_params) - get :session_index, format:'json', affiliate_id: partner1.id + get :session_index, params: { format:'json', affiliate_id: partner1.id } response.status.should eq(200) body = JSON.parse(response.body) body.length.should eq(1) @@ -87,7 +87,7 @@ describe ApiLinksController, type: :controller do describe "recording_index" do it "succeeds with no data" do - get :recording_index, format:'json', affiliate_id: partner1.id + get :recording_index, params: { format:'json', affiliate_id: partner1.id } response.status.should eq(200) body = JSON.parse(response.body) body.length.should eq(0) @@ -95,7 +95,7 @@ describe ApiLinksController, type: :controller do it "succeeds with one recording" do claimed_recording1 = FactoryBot.create(:claimed_recording, user: user_partner1) - get :recording_index, format:'json', affiliate_id: partner1.id + get :recording_index, params: { format:'json', affiliate_id: partner1.id } response.status.should eq(200) body = JSON.parse(response.body) body.length.should eq(1) diff --git a/web/spec/controllers/api_mixes_controller_spec.rb b/web/spec/controllers/api_mixes_controller_spec.rb index 4dd5cf3dd..b8ff014a1 100644 --- a/web/spec/controllers/api_mixes_controller_spec.rb +++ b/web/spec/controllers/api_mixes_controller_spec.rb @@ -13,13 +13,13 @@ describe ApiMixesController, type: :controller do it "is possible" do controller.current_user = mix.recording.owner - get :download, {id: mix.id} + get :download, params: { id: mix.id } response.status.should == 302 mix.reload mix.download_count.should == 1 - get :download, {id: mix.id} + get :download, params: { id: mix.id } response.status.should == 302 mix.reload @@ -31,7 +31,7 @@ describe ApiMixesController, type: :controller do mix.download_count = APP_CONFIG.max_audio_downloads mix.save! controller.current_user = mix.recording.owner - get :download, {format:'json', id: mix.id} + get :download, params: { format:'json', id: mix.id } response.status.should == 404 JSON.parse(response.body, symbolize_names: true)[:message].should == "download limit surpassed" end @@ -44,7 +44,7 @@ describe ApiMixesController, type: :controller do mix.recording.owner.save! controller.current_user = mix.recording.owner - get :download, {format:'json', id: mix.id} + get :download, params: { format:'json', id: mix.id } response.status.should == 302 mix.reload mix.download_count.should == 101 diff --git a/web/spec/controllers/api_music_sessions_controller_spec.rb b/web/spec/controllers/api_music_sessions_controller_spec.rb index db1484dfb..f8700b8fd 100644 --- a/web/spec/controllers/api_music_sessions_controller_spec.rb +++ b/web/spec/controllers/api_music_sessions_controller_spec.rb @@ -23,8 +23,8 @@ describe ApiMusicSessionsController, type: :controller do describe "ams_index" do it "no results" do - get :ams_index, {client_id: conn.client_id} - response.should be_success + get :ams_index, params: { client_id: conn.client_id } + response.should be_successful json = JSON.parse(response.body, :symbolize_names => true) json[:sessions].length.should == 0 end @@ -35,7 +35,7 @@ describe ApiMusicSessionsController, type: :controller do conn.join_the_session(ams.music_session, true, tracks, user, 10) conn.errors.any?.should be false - get :ams_index, {client_id: conn.client_id} + get :ams_index, params: { client_id: conn.client_id } json = JSON.parse(response.body, :symbolize_names => true) json[:sessions].length.should == 1 json[:sessions][0][:active_music_session][:participants][0][:user][:full_score].should be_nil @@ -50,7 +50,7 @@ describe ApiMusicSessionsController, type: :controller do other_conn.join_the_session(ams.music_session, true, tracks, user, 10) other_conn.errors.any?.should be false - get :ams_index, {client_id: conn.client_id} + get :ams_index, params: { client_id: conn.client_id } json = JSON.parse(response.body, :symbolize_names => true) json[:sessions].length.should == 1 json[:sessions][0][:active_music_session][:participants][0][:user][:full_score].should be_nil @@ -63,7 +63,7 @@ describe ApiMusicSessionsController, type: :controller do other_conn.errors.any?.should be false Score.createx(conn.locidispid, conn.client_id, conn.addr, other_conn.locidispid, other_conn.client_id, other_conn.addr, network_score, nil, nil, {auserid: user.id, buserid: other.id}) - get :ams_index, {client_id: conn.client_id} + get :ams_index, params: { client_id: conn.client_id } json = JSON.parse(response.body, :symbolize_names => true) json[:sessions].length.should == 1 json[:sessions][0][:active_music_session][:participants] @@ -87,7 +87,7 @@ describe ApiMusicSessionsController, type: :controller do rsvp_request = FactoryBot.create(:rsvp_request, user: third_user) rsvp_request_rsvp_slot = FactoryBot.create(:rsvp_request_rsvp_slot, chosen:true, rsvp_request: rsvp_request, rsvp_slot:rsvp_slot) - get :ams_index, {client_id: conn.client_id} + get :ams_index, params: { client_id: conn.client_id } json = JSON.parse(response.body, :symbolize_names => true) json[:sessions].length.should == 1 json[:sessions][0][:active_music_session][:participants][0][:user][:full_score].should_not be_nil @@ -113,8 +113,8 @@ describe ApiMusicSessionsController, type: :controller do describe "sms_index" do xit "no results" do - get :sms_index, {client_id: conn.client_id} - response.should be_success + get :sms_index, params: { client_id: conn.client_id } + response.should be_successful json = JSON.parse(response.body, :symbolize_names => true) json[:sessions].length.should == 0 end @@ -123,7 +123,7 @@ describe ApiMusicSessionsController, type: :controller do # create a session with self in it sms = FactoryBot.create(:music_session, creator: user) - get :sms_index, {client_id: conn.client_id} + get :sms_index, params: { client_id: conn.client_id } json = JSON.parse(response.body, :symbolize_names => true) json[:sessions].length.should == 1 json[:sessions][0][:approved_rsvps][0][:id].should == user.id @@ -137,7 +137,7 @@ describe ApiMusicSessionsController, type: :controller do # create a session with someone else in it, but no score sms = FactoryBot.create(:music_session, creator: other) - get :sms_index, {client_id: conn.client_id} + get :sms_index, params: { client_id: conn.client_id } json = JSON.parse(response.body, :symbolize_names => true) json[:sessions].length.should == 1 json[:sessions][0][:approved_rsvps][0][:id].should == other.id @@ -156,7 +156,7 @@ describe ApiMusicSessionsController, type: :controller do Score.createx(invitee.last_jam_locidispid, 'immaterial', 1, conn.locidispid, conn.client_id, conn.addr, network_score, nil, nil, {auserid: invitee.id, buserid: user.id}) - get :sms_index, {client_id: conn.client_id} + get :sms_index, params: { client_id: conn.client_id } json = JSON.parse(response.body, :symbolize_names => true) json[:sessions].length.should == 1 json[:sessions][0][:approved_rsvps][0][:id].should == other.id @@ -173,14 +173,14 @@ describe ApiMusicSessionsController, type: :controller do let(:jam_track) { FactoryBot.create(:jam_track)} it "does not allow someone to open a track unless they are in the session" do - post :jam_track_open, {:format => 'json', id: ams.id, jam_track_id: jam_track.id} + post :jam_track_open, params: { :format => 'json', id: ams.id, jam_track_id: jam_track.id } response.status.should == 403 end it "does not allow someone to open a track unless they own the jam track" do conn.join_the_session(ams.music_session, true, tracks, user, 10) - post :jam_track_open, {:format => 'json', id: ams.id, jam_track_id: jam_track.id} + post :jam_track_open, params: { :format => 'json', id: ams.id, jam_track_id: jam_track.id } response.status.should == 403 end @@ -189,12 +189,12 @@ describe ApiMusicSessionsController, type: :controller do conn.join_the_session(ams.music_session, true, tracks, user, 10) FactoryBot.create(:jam_track_right, jam_track: jam_track, user: user) - post :jam_track_open, {:format => 'json', id: ams.id, jam_track_id: jam_track.id} + post :jam_track_open, params: { :format => 'json', id: ams.id, jam_track_id: jam_track.id } response.status.should == 200 end it "does not allow someone to close a track unless they are in the session" do - post :jam_track_close, {:format => 'json', id: ams.id} + post :jam_track_close, params: { :format => 'json', id: ams.id } response.status.should == 403 end @@ -203,20 +203,19 @@ describe ApiMusicSessionsController, type: :controller do conn.join_the_session(ams.music_session, true, tracks, user, 10) FactoryBot.create(:jam_track_right, jam_track: jam_track, user: user) - post :jam_track_open, {:format => 'json', id: ams.id, jam_track_id: jam_track.id} + post :jam_track_open, params: { :format => 'json', id: ams.id, jam_track_id: jam_track.id } response.status.should == 200 - post :jam_track_close, {:format => 'json', id: ams.id} + post :jam_track_close, params: { :format => 'json', id: ams.id } response.status.should == 200 end it "show.rabl shows jam track info when open" do conn.join_the_session(ams.music_session, true, tracks, user, 10) FactoryBot.create(:jam_track_right, jam_track: jam_track, user: user) - post :jam_track_open, {:format => 'json', id: ams.id, jam_track_id: jam_track.id} - + post :jam_track_open, params: { :format => 'json', id: ams.id, jam_track_id: jam_track.id } # check the show.rabl for jam_track info - get :show, {:format => 'json', id: ams.id} + get :show, params: { :format => 'json', id: ams.id } json = JSON.parse(response.body, :symbolize_names => true) json[:jam_track].should_not be_nil @@ -230,7 +229,7 @@ describe ApiMusicSessionsController, type: :controller do let(:backing_track) { "foo.mp3"} it "does not allow someone to open a track unless they are in the session" do - post :backing_track_open, {:format => 'json', id: ams.id, backing_track_path: backing_track} + post :backing_track_open, params: { :format => 'json', id: ams.id, backing_track_path: backing_track } response.status.should == 403 end @@ -238,7 +237,7 @@ describe ApiMusicSessionsController, type: :controller do pending "connection with client to determine ownership" conn.join_the_session(ams.music_session, true, tracks, user, 10) - post :backing_track_open, {:format => 'json', id: ams.id, backing_track_path: backing_track} + post :backing_track_open, params: { :format => 'json', id: ams.id, backing_track_path: backing_track } response.status.should == 403 end @@ -246,12 +245,12 @@ describe ApiMusicSessionsController, type: :controller do # put the connection of the user into the session, so th conn.join_the_session(ams.music_session, true, tracks, user, 10) - post :backing_track_open, {:format => 'json', id: ams.id, backing_track_path: backing_track} + post :backing_track_open, params: { :format => 'json', id: ams.id, backing_track_path: backing_track } response.status.should == 200 end it "does not allow someone to close a track unless they are in the session" do - post :backing_track_close, {:format => 'json', id: ams.id} + post :backing_track_close, params: { :format => 'json', id: ams.id } response.status.should == 403 end @@ -259,10 +258,10 @@ describe ApiMusicSessionsController, type: :controller do # put the connection of the user into the session, so th conn.join_the_session(ams.music_session, true, tracks, user, 10) - post :backing_track_open, {:format => 'json', id: ams.id, backing_track_path: backing_track} + post :backing_track_open, params: { :format => 'json', id: ams.id, backing_track_path: backing_track } response.status.should == 200 - post :backing_track_close, {:format => 'json', id: ams.id} + post :backing_track_close, params: { :format => 'json', id: ams.id } response.status.should == 200 end end @@ -273,25 +272,25 @@ describe ApiMusicSessionsController, type: :controller do let(:metronome) { "foo.mp3"} it "does not allow someone to open a track unless they are in the session" do - post :metronome_open, {:format => 'json', id: ams.id, metronome_path: metronome} + post :metronome_open, params: { :format => 'json', id: ams.id, metronome_path: metronome } response.status.should == 403 end it "can open it" do conn.join_the_session(ams.music_session, true, tracks, user, 10) - post :metronome_open, {:format => 'json', id: ams.id, metronome_path: metronome} + post :metronome_open, params: { :format => 'json', id: ams.id, metronome_path: metronome } response.status.should == 200 end it "does not allow someone to close a metronome" do - post :metronome_close, {:format => 'json', id: ams.id} + post :metronome_close, params: { :format => 'json', id: ams.id } response.status.should == 403 end it "does allow someone who joied to close a metronome" do conn.join_the_session(ams.music_session, true, tracks, user, 10) - post :metronome_close, {:format => 'json', id: ams.id} + post :metronome_close, params: { :format => 'json', id: ams.id } response.status.should == 200 end @@ -299,10 +298,10 @@ describe ApiMusicSessionsController, type: :controller do # put the connection of the user into the session, so th conn.join_the_session(ams.music_session, true, tracks, user, 10) - post :metronome_open, {:format => 'json', id: ams.id, metronome_path: metronome} + post :metronome_open, params: { :format => 'json', id: ams.id, metronome_path: metronome } response.status.should == 200 - post :metronome_close, {:format => 'json', id: ams.id} + post :metronome_close, params: { :format => 'json', id: ams.id } response.status.should == 200 end end @@ -328,20 +327,20 @@ describe ApiMusicSessionsController, type: :controller do end it "returns 403 for invalid token" do - get :auth, session_id: ams.id, token: 'invalid_token', participants: 2 + get :auth, params: { session_id: ams.id, token: 'invalid_token', participants: 2 } expect(response).to have_http_status(403) expect(response.body).to eq({ code: "invalid_token", message: "No token found for 'invalid_token'" }.to_json) end it "returns 403 if user is not in music session" do ams.users.delete(user) - get :auth, session_id: ams.id, token: temp_token.token, participants: 2 + get :auth, params: { session_id: ams.id, token: temp_token.token, participants: 2 } expect(response).to have_http_status(403) expect(response.body).to eq({ code: "not_in_session", message: "Not a member of the session" }.to_json) end it "returns 404 if token is valid, but session can't be found" do - get :auth, session_id: "bad_session_id", token: temp_token.token, participants: 2 + get :auth, params: { session_id: "bad_session_id", token: temp_token.token, participants: 2 } expect(response).to have_http_status(404) expect(response.body).to eq({ code: "session_ended", message: "The session is over" }.to_json) end @@ -349,13 +348,13 @@ describe ApiMusicSessionsController, type: :controller do it "token expired" do TempToken.where(token: temp_token.token).update_all(expired_at: 1.day.ago) - get :auth, session_id: ams.id, token: temp_token.token, participants: 2 + get :auth, params: { session_id: ams.id, token: temp_token.token, participants: 2 } expect(response).to have_http_status(403) expect(response.body).to eq({ code: "expired_token", message: "The token has expired" }.to_json) end it "returns 200 ok for valid params" do - get :auth, session_id: ams.id, token: temp_token.token, participants: 2 + get :auth, params: { session_id: ams.id, token: temp_token.token, participants: 2 } expect(response).to have_http_status(200) expect(response.body).to eq({ name: user.name, user_id: user.id }.to_json) end diff --git a/web/spec/controllers/api_payment_histories_controller_spec.rb b/web/spec/controllers/api_payment_histories_controller_spec.rb index eb66d1413..a41bd1289 100644 --- a/web/spec/controllers/api_payment_histories_controller_spec.rb +++ b/web/spec/controllers/api_payment_histories_controller_spec.rb @@ -13,9 +13,8 @@ describe ApiPaymentHistoriesController, type: :controller do describe "index" do it "empty" do - get :index, { :format => 'json'} - - response.should be_success + get :index, params: { :format => 'json' } + response.should be_successful body = JSON.parse(response.body) body['next_page'].should be_nil body['entries'].should eq([]) @@ -30,8 +29,8 @@ describe ApiPaymentHistoriesController, type: :controller do shopping_cart = ShoppingCart.create(user, jam_track) sale_line_item = SaleLineItem.create_from_shopping_cart(sale, shopping_cart, nil, 'some_adjustment_uuid', nil) - get :index, { :format => 'json'} - response.should be_success + get :index, params: { :format => 'json' } + response.should be_successful body = JSON.parse(response.body) body['next_page'].should be_nil entries = body['entries'] @@ -45,8 +44,8 @@ describe ApiPaymentHistoriesController, type: :controller do transaction = FactoryBot.create(:recurly_transaction_web_hook, invoice_id: sale.recurly_invoice_id, transaction_type: RecurlyTransactionWebHook::VOID, user: user, transaction_at: 1.minute.from_now) - get :index, { :format => 'json'} - response.should be_success + get :index, params: { :format => 'json' } + response.should be_successful body = JSON.parse(response.body) body['next_page'].should be_nil entries = body['entries'] diff --git a/web/spec/controllers/api_posa_cards_controller_spec.rb b/web/spec/controllers/api_posa_cards_controller_spec.rb index 089d2868d..797bf3835 100644 --- a/web/spec/controllers/api_posa_cards_controller_spec.rb +++ b/web/spec/controllers/api_posa_cards_controller_spec.rb @@ -20,8 +20,8 @@ describe ApiPosaCardsController, type: :controller do describe "activate" do it "works" do request.headers['HTTP_AUTHORIZATION'] = authorization - get :activate, slug: retailer.slug, code: posa_card.code - response.should be_success + get :activate, params: { slug: retailer.slug, code: posa_card.code } + response.should be_successful JSON.parse(response.body)['id'].should eql posa_card.id posa_card.reload posa_card.activated_at.should_not be_nil @@ -33,8 +33,8 @@ describe ApiPosaCardsController, type: :controller do it "works" do controller.current_user = user posa_card.activate(retailer) - get :claim, code: posa_card.code - response.should be_success + get :claim, params: { code: posa_card.code } + response.should be_successful JSON.parse(response.body)['id'].should eql posa_card.id posa_card.reload posa_card.claimed_at.should_not be_nil diff --git a/web/spec/controllers/api_recordings_controller_spec.rb b/web/spec/controllers/api_recordings_controller_spec.rb index 998a134c1..4abee58d8 100644 --- a/web/spec/controllers/api_recordings_controller_spec.rb +++ b/web/spec/controllers/api_recordings_controller_spec.rb @@ -17,16 +17,16 @@ describe ApiRecordingsController, type: :controller do describe "start" do it "should work" do - post :start, {:format => 'json', :music_session_id => @music_session.id} - response.should be_success + post :start, params: { :format => 'json', :music_session_id => @music_session.id } + response.should be_successful response_body = JSON.parse(response.body) response_body['id'].should_not be_nil recording = Recording.find(response_body['id']) end it "should not allow multiple starts" do - post :start, {:format => 'json', :music_session_id => @music_session.id} - post :start, {:format => 'json', :music_session_id => @music_session.id} + post :start, params: { :format => 'json', :music_session_id => @music_session.id } + post :start, params: { :format => 'json', :music_session_id => @music_session.id } response.status.should == 422 response_body = JSON.parse(response.body) response_body["errors"]["music_session"][0].should == ValidationMessages::ALREADY_BEING_RECORDED @@ -39,7 +39,7 @@ describe ApiRecordingsController, type: :controller do claimed_recording = recording.claim(@user, "name", "description", Genre.first, true) @music_session.claimed_recording_start(@user, claimed_recording) @music_session.errors.any?.should be false - post :start, {:format => 'json', :music_session_id => @music_session.id} + post :start, params: { :format => 'json', :music_session_id => @music_session.id } response.status.should == 422 response_body = JSON.parse(response.body) response_body["errors"]["music_session"][0].should == ValidationMessages::ALREADY_PLAYBACK_RECORDING @@ -48,20 +48,20 @@ describe ApiRecordingsController, type: :controller do it "should not allow start by somebody not in the music session" do user2 = FactoryBot.create(:user) controller.current_user = user2 - post :start, {:format => 'json', :music_session_id => @music_session.id} + post :start, params: { :format => 'json', :music_session_id => @music_session.id } response.status.should == 403 end end describe "get" do it "should work" do - post :start, {:format => 'json', :music_session_id => @music_session.id} - response.should be_success + post :start, params: { :format => 'json', :music_session_id => @music_session.id } + response.should be_successful response_body = JSON.parse(response.body) response_body['id'].should_not be_nil recordingId = response_body['id'] - get :show, {:format => 'json', :id => recordingId} - response.should be_success + get :show, params: { :format => 'json', :id => recordingId } + response.should be_successful response_body = JSON.parse(response.body) response_body['id'].should == recordingId end @@ -70,34 +70,34 @@ describe ApiRecordingsController, type: :controller do describe "stop" do it "should work" do - post :start, {:format => 'json', :music_session_id => @music_session.id} + post :start, params: { :format => 'json', :music_session_id => @music_session.id } response_body = JSON.parse(response.body) recording = Recording.find(response_body['id']) - post :stop, {:format => 'json', :id => recording.id} - response.should be_success + post :stop, params: { :format => 'json', :id => recording.id } + response.should be_successful response_body = JSON.parse(response.body) response_body['id'].should_not be_nil Recording.find(response_body['id']).id.should == recording.id end it "should not allow stop on a session not being recorded" do - post :start, {:format => 'json', :music_session_id => @music_session.id} + post :start, params: { :format => 'json', :music_session_id => @music_session.id } response_body = JSON.parse(response.body) recording = Recording.find(response_body['id']) - post :stop, {:format => 'json', :id => recording.id} - post :stop, {:format => 'json', :id => recording.id} + post :stop, params: { :format => 'json', :id => recording.id } + post :stop, params: { :format => 'json', :id => recording.id } response.status.should == 422 response_body = JSON.parse(response.body) end it "should not allow stop on a session requested by a different member" do - post :start, {:format => 'json', :music_session_id => @music_session.id} + post :start, params: { :format => 'json', :music_session_id => @music_session.id } response_body = JSON.parse(response.body) recording = Recording.find(response_body['id']) user2 = FactoryBot.create(:user) controller.current_user = user2 - post :stop, {:format => 'json', :id => recording.id} + post :stop, params: { :format => 'json', :id => recording.id } response.status.should == 403 end end @@ -106,11 +106,11 @@ describe ApiRecordingsController, type: :controller do let(:mix) { FactoryBot.create(:mix) } it "should only allow a user to download a track if they have claimed the recording" do - post :start, {:format => 'json', :music_session_id => @music_session.id} + post :start, params: { :format => 'json', :music_session_id => @music_session.id } response_body = JSON.parse(response.body) recording = Recording.find(response_body['id']) - post :stop, {:format => 'json', :id => recording.id} - response.should be_success + post :stop, params: { :format => 'json', :id => recording.id } + response.should be_successful end @@ -118,13 +118,13 @@ describe ApiRecordingsController, type: :controller do mix.touch recorded_track = mix.recording.recorded_tracks[0] controller.current_user = mix.recording.owner - get :download, {id: recorded_track.recording.id, track_id: recorded_track.client_track_id} + get :download, params: { id: recorded_track.recording.id, track_id: recorded_track.client_track_id } response.status.should == 302 recorded_track.reload recorded_track.download_count.should == 1 - get :download, {id: recorded_track.recording.id, track_id: recorded_track.client_track_id} + get :download, params: { id: recorded_track.recording.id, track_id: recorded_track.client_track_id } response.status.should == 302 recorded_track.reload @@ -138,7 +138,7 @@ describe ApiRecordingsController, type: :controller do recorded_track.download_count = APP_CONFIG.max_audio_downloads recorded_track.save! controller.current_user = recorded_track.user - get :download, {format: 'json', id: recorded_track.recording.id, track_id: recorded_track.client_track_id} + get :download, params: { format: 'json', id: recorded_track.recording.id, track_id: recorded_track.client_track_id } response.status.should == 404 JSON.parse(response.body, symbolize_names: true)[:message].should == "download limit surpassed" end @@ -153,7 +153,7 @@ describe ApiRecordingsController, type: :controller do recorded_track.user.save! controller.current_user = recorded_track.user - get :download, {format: 'json', id: recorded_track.recording.id, track_id: recorded_track.client_track_id} + get :download, params: { format: 'json', id: recorded_track.recording.id, track_id: recorded_track.client_track_id } response.status.should == 302 recorded_track.reload recorded_track.download_count.should == 101 @@ -164,11 +164,11 @@ describe ApiRecordingsController, type: :controller do let(:mix) { FactoryBot.create(:mix) } it "should only allow a user to download a track if they have claimed the recording" do - post :start, {:format => 'json', :music_session_id => @music_session.id} + post :start, params: { :format => 'json', :music_session_id => @music_session.id } response_body = JSON.parse(response.body) recording = Recording.find(response_body['id']) - post :stop, {:format => 'json', :id => recording.id} - response.should be_success + post :stop, params: { :format => 'json', :id => recording.id } + response.should be_successful end @@ -176,13 +176,13 @@ describe ApiRecordingsController, type: :controller do mix.touch recorded_track = mix.recording.recorded_tracks[0] controller.current_user = mix.recording.owner - get :download, {id: recorded_track.recording.id, track_id: recorded_track.client_track_id} + get :download, params: { id: recorded_track.recording.id, track_id: recorded_track.client_track_id } response.status.should == 302 recorded_track.reload recorded_track.download_count.should == 1 - get :download, {id: recorded_track.recording.id, track_id: recorded_track.client_track_id} + get :download, params: { id: recorded_track.recording.id, track_id: recorded_track.client_track_id } response.status.should == 302 recorded_track.reload @@ -196,7 +196,7 @@ describe ApiRecordingsController, type: :controller do recorded_track.download_count = APP_CONFIG.max_audio_downloads recorded_track.save! controller.current_user = recorded_track.user - get :download, {format: 'json', id: recorded_track.recording.id, track_id: recorded_track.client_track_id} + get :download, params: { format: 'json', id: recorded_track.recording.id, track_id: recorded_track.client_track_id } response.status.should == 404 JSON.parse(response.body, symbolize_names: true)[:message].should == "download limit surpassed" end @@ -211,7 +211,7 @@ describe ApiRecordingsController, type: :controller do recorded_track.user.save! controller.current_user = recorded_track.user - get :download, {format: 'json', id: recorded_track.recording.id, track_id: recorded_track.client_track_id} + get :download, params: { format: 'json', id: recorded_track.recording.id, track_id: recorded_track.client_track_id } response.status.should == 302 recorded_track.reload recorded_track.download_count.should == 101 @@ -239,8 +239,8 @@ describe ApiRecordingsController, type: :controller do describe "start" do it "should work" do - post :start, {:format => 'json', :music_session_id => @music_session.id} - response.should be_success + post :start, params: { :format => 'json', :music_session_id => @music_session.id } + response.should be_successful response_body = JSON.parse(response.body) response_body['id'].should_not be_nil recording = Recording.find(response_body['id']) diff --git a/web/spec/controllers/api_recurly_spec.rb b/web/spec/controllers/api_recurly_spec.rb index e648d729f..633e948f2 100644 --- a/web/spec/controllers/api_recurly_spec.rb +++ b/web/spec/controllers/api_recurly_spec.rb @@ -35,7 +35,7 @@ describe ApiRecurlyController, :type=>:controller do it "should send correct error" do @billing_info[:number]='121' - post :create_account, {:format => 'json', :billing_info=>@billing_info, reuse_card_this_time: false, reuse_card_next_time: false} + post :create_account, params: {:format => 'json', :billing_info=>@billing_info, reuse_card_this_time: false, reuse_card_next_time: false} response.status.should == 404 body = JSON.parse(response.body) body['errors'].should have(1).items @@ -43,37 +43,37 @@ describe ApiRecurlyController, :type=>:controller do end it "should create account" do - post :create_account, {:format => 'json',billing_info: @billing_info, reuse_card_this_time: false, reuse_card_next_time: false} - response.should be_success + post :create_account, params: {:format => 'json',billing_info: @billing_info, reuse_card_this_time: false, reuse_card_next_time: false} + response.should be_successful body = JSON.parse(response.body) - response.should be_success + response.should be_successful body['billing_info']['first_name'].should eq(@user.first_name) end it "should retrieve account with no billing info" do - post :create_account, {:format => 'json', reuse_card_this_time: false, reuse_card_next_time: false} - response.should be_success + post :create_account, params: {:format => 'json', reuse_card_this_time: false, reuse_card_next_time: false} + response.should be_successful get :get_account body = JSON.parse(response.body) - response.should be_success + response.should be_successful body['billing_info'].should be_nil end it "should update account" do - post :create_account, {:format => 'json', billing_info: @billing_info, reuse_card_this_time: false, reuse_card_next_time: false} - response.should be_success + post :create_account, params: {:format => 'json', billing_info: @billing_info, reuse_card_this_time: false, reuse_card_next_time: false} + response.should be_successful body = JSON.parse(response.body) body['billing_info']['first_name'].should eq("Person") controller.current_user = @user @billing_info[:first_name] = "Thing" - put :update_account, {:format => 'json', billing_info: @billing_info} + put :update_account, params: {:format => 'json', billing_info: @billing_info} body = JSON.parse(response.body) body['billing_info']['first_name'].should eq("Thing") - get :get_account, { :format => 'json'} - response.should be_success + get :get_account, params: { :format => 'json'} + response.should be_successful body = JSON.parse(response.body) body['billing_info']['first_name'].should eq("Thing") end @@ -81,8 +81,8 @@ describe ApiRecurlyController, :type=>:controller do # Note: We don't have any subscriptions yet: it "should get subscription" do pending "We don't have any subscriptions yet -- uncomment in routes" - get :get_subscription, { :format => 'json'} - response.should be_success + get :get_subscription, params: { :format => 'json'} + response.should be_successful body = JSON.parse(response.body) end @@ -98,19 +98,19 @@ describe ApiRecurlyController, :type=>:controller do # $enable_tracing = true - post :create_account, {:format => 'json', billing_info: @billing_info, reuse_card_this_time: false, reuse_card_next_time: false} - response.should be_success + post :create_account, params: {:format => 'json', billing_info: @billing_info, reuse_card_this_time: false, reuse_card_next_time: false} + response.should be_successful body = JSON.parse(response.body) body['billing_info']['first_name'].should eq("Person") @billing_info[:state] = "NE" - put :update_billing_info, {format: 'json', billing_info: @billing_info} + put :update_billing_info, params: {format: 'json', billing_info: @billing_info} - response.should be_success + response.should be_successful body = JSON.parse(response.body) get :billing_info - response.should be_success + response.should be_successful body = JSON.parse(response.body) end diff --git a/web/spec/controllers/api_retailer_invitations_controller_spec.rb b/web/spec/controllers/api_retailer_invitations_controller_spec.rb index 2e1bc9fa1..185d432f8 100644 --- a/web/spec/controllers/api_retailer_invitations_controller_spec.rb +++ b/web/spec/controllers/api_retailer_invitations_controller_spec.rb @@ -13,13 +13,13 @@ describe ApiRetailerInvitationsController, type: :controller do describe "index" do it "works" do - get :index, id: retailer.id - response.should be_success + get :index, params: { id: retailer.id } + response.should be_successful JSON.parse(response.body)['total_entries'].should eql 0 retailer_invitation_teacher.touch - get :index, id: retailer.id - response.should be_success + get :index, params: { id: retailer.id } + response.should be_successful JSON.parse(response.body)['total_entries'].should eql 1 end @@ -29,8 +29,8 @@ describe ApiRetailerInvitationsController, type: :controller do describe "create" do it "works" do UserMailer.deliveries.clear - post :create, id: retailer.id, first_name: "Seth", last_name: "Call", email: "seth@jamkazam.com", :format => 'json' - response.should be_success + post :create, params: { id: retailer.id, first_name: "Seth", last_name: "Call", email: "seth@jamkazam.com", :format => 'json' } + response.should be_successful UserMailer.deliveries.length.should eql 1 JSON.parse(response.body)['id'].should eql RetailerInvitation.find_by_email("seth@jamkazam.com").id end @@ -39,16 +39,16 @@ describe ApiRetailerInvitationsController, type: :controller do describe "resend" do it "works" do UserMailer.deliveries.clear - post :resend, id: retailer.id, invitation_id: retailer_invitation_teacher.id, :format => 'json' + post :resend, params: { id: retailer.id, invitation_id: retailer_invitation_teacher.id, :format => 'json' } UserMailer.deliveries.length.should eql 1 - response.should be_success + response.should be_successful end end describe "delete" do it "works" do - delete :delete, id: retailer.id, invitation_id: retailer_invitation_teacher.id, :format => 'json' - response.should be_success + delete :delete, params: { id: retailer.id, invitation_id: retailer_invitation_teacher.id, :format => 'json' } + response.should be_successful end end end diff --git a/web/spec/controllers/api_retailers_controller_spec.rb b/web/spec/controllers/api_retailers_controller_spec.rb index 2a88ae200..8a87c6480 100644 --- a/web/spec/controllers/api_retailers_controller_spec.rb +++ b/web/spec/controllers/api_retailers_controller_spec.rb @@ -12,8 +12,8 @@ describe ApiRetailersController, type: :controller do describe "show" do it "works" do - get :show, id: retailer.id - response.should be_success + get :show, params: { id: retailer.id } + response.should be_successful JSON.parse(response.body)['id'].should eql retailer.id end @@ -22,8 +22,8 @@ describe ApiRetailersController, type: :controller do describe "update" do it "works" do - post :update, id: retailer.id, name: "Hardy har", format: 'json' - response.should be_success + post :update, params: { id: retailer.id, name: "Hardy har", format: 'json' } + response.should be_successful json = JSON.parse(response.body) json['name'].should eql "Hardy har" end diff --git a/web/spec/controllers/api_reviews_controller_spec.rb b/web/spec/controllers/api_reviews_controller_spec.rb index 9772b8a6f..ffc7651cf 100644 --- a/web/spec/controllers/api_reviews_controller_spec.rb +++ b/web/spec/controllers/api_reviews_controller_spec.rb @@ -23,8 +23,8 @@ describe ApiReviewsController, type: :controller do describe "create" do it "successful" do - post :create, rating:3, description:"it was ok", target_id: @target.id, target_type:"JamRuby::JamTrack", format: 'json' - response.should be_success + post :create, params: { rating:3, description:"it was ok", target_id: @target.id, target_type:"JamRuby::JamTrack", format: 'json' } + response.should be_successful Review.index.should have(1).items end end @@ -35,15 +35,15 @@ describe ApiReviewsController, type: :controller do end it "basic" do - post :update, id:@review.id, mods: {rating:4, description: "not blah"}, :format=>'json' - response.should be_success + post :update, params: { id:@review.id, mods: {rating:4, description: "not blah"}, :format=>'json' } + response.should be_successful @review.reload @review.rating.should eq(4) @review.description.should eq("not blah") end it "bad identifier" do - post :update, id:2112, mods: {rating:4, description: "not blah"}, :format=>'json' + post :update, params: { id:2112, mods: {rating:4, description: "not blah"}, :format=>'json' } response.status.should eql(404) end end @@ -54,8 +54,8 @@ describe ApiReviewsController, type: :controller do end it "marks review as deleted" do - delete :delete, id:@review.id - response.should be_success + delete :delete, params: { id:@review.id } + response.should be_successful Review.index.should have(0).items Review.index(include_deleted:true).should have(1).items end @@ -70,12 +70,12 @@ describe ApiReviewsController, type: :controller do end it "review summaries" do - get :index, format: 'json' - response.should be_success + get :index, params: { format: 'json' } + response.should be_successful json = JSON.parse(response.body) ReviewSummary.index.should have(2).items - get :index, format: 'json' + get :index, params: { format: 'json' } json = JSON.parse(response.body) json.should have(2).item end @@ -84,13 +84,13 @@ describe ApiReviewsController, type: :controller do ReviewSummary.index.should have(2).items summaries = ReviewSummary.index - get :details, :review_summary_id=>summaries[0].id, format: 'json' - response.should be_success + get :details, params: { :review_summary_id=>summaries[0].id, format: 'json' } + response.should be_successful json = JSON.parse(response.body) json.should have(7).items - get :details, :review_summary_id=>summaries[1].id, format: 'json' - response.should be_success + get :details, params: { :review_summary_id=>summaries[1].id, format: 'json' } + response.should be_successful json = JSON.parse(response.body) json.should have(5).items end @@ -99,13 +99,13 @@ describe ApiReviewsController, type: :controller do summaries = ReviewSummary.index summaries.should have(2).items - get :details, review_summary_id:summaries[0].id, page: 1, per_page: 3, format: 'json' - response.should be_success + get :details, params: { review_summary_id:summaries[0].id, page: 1, per_page: 3, format: 'json' } + response.should be_successful json = JSON.parse(response.body) json.should have(3).items - get :details, review_summary_id:summaries[0].id, page: 3, per_page: 3, format: 'json' - response.should be_success + get :details, params: { review_summary_id:summaries[0].id, page: 3, per_page: 3, format: 'json' } + response.should be_successful json = JSON.parse(response.body) json.should have(1).items end diff --git a/web/spec/controllers/api_school_invitations_controller_spec.rb b/web/spec/controllers/api_school_invitations_controller_spec.rb index b6072baf0..261ece4cc 100644 --- a/web/spec/controllers/api_school_invitations_controller_spec.rb +++ b/web/spec/controllers/api_school_invitations_controller_spec.rb @@ -14,17 +14,17 @@ describe ApiSchoolInvitationsController, type: :controller do describe "index" do it "works" do - get :index, id: school.id, as_teacher: true - response.should be_success + get :index, params: { id: school.id, as_teacher: true } + response.should be_successful JSON.parse(response.body)['total_entries'].should eql 0 school_invitation_teacher.touch - get :index, id: school.id, as_teacher: true - response.should be_success + get :index, params: { id: school.id, as_teacher: true } + response.should be_successful JSON.parse(response.body)['total_entries'].should eql 1 - get :index, id: school.id, as_teacher: false - response.should be_success + get :index, params: { id: school.id, as_teacher: false } + response.should be_successful JSON.parse(response.body)['total_entries'].should eql 0 end @@ -33,9 +33,9 @@ describe ApiSchoolInvitationsController, type: :controller do describe "create" do it "works" do UserMailer.deliveries.clear - post :create, id: school.id, first_name: "Seth", last_name: "Call", email: "seth@jamkazam.com", as_teacher: true, :format => 'json' + post :create, params: { id: school.id, first_name: "Seth", last_name: "Call", email: "seth@jamkazam.com", as_teacher: true, :format => 'json' } UserMailer.deliveries.length.should eql 1 - response.should be_success + response.should be_successful JSON.parse(response.body)['id'].should eql SchoolInvitation.find_by_email("seth@jamkazam.com").id end end @@ -43,16 +43,16 @@ describe ApiSchoolInvitationsController, type: :controller do describe "resend" do it "works" do UserMailer.deliveries.clear - post :resend, id: school.id, invitation_id: school_invitation_teacher.id, :format => 'json' + post :resend, params: { id: school.id, invitation_id: school_invitation_teacher.id, :format => 'json' } UserMailer.deliveries.length.should eql 1 - response.should be_success + response.should be_successful end end describe "delete" do it "works" do - delete :delete, id: school.id, invitation_id: school_invitation_teacher.id, :format => 'json' - response.should be_success + delete :delete, params: { id: school.id, invitation_id: school_invitation_teacher.id, :format => 'json' } + response.should be_successful end end end diff --git a/web/spec/controllers/api_schools_controller_spec.rb b/web/spec/controllers/api_schools_controller_spec.rb index 1592f57d8..066cffc2b 100644 --- a/web/spec/controllers/api_schools_controller_spec.rb +++ b/web/spec/controllers/api_schools_controller_spec.rb @@ -12,8 +12,8 @@ describe ApiSchoolsController, type: :controller do describe "show" do it "works" do - get :show, id: school.id - response.should be_success + get :show, params: { id: school.id } + response.should be_successful JSON.parse(response.body)['id'].should eql school.id end @@ -22,8 +22,8 @@ describe ApiSchoolsController, type: :controller do describe "update" do it "works" do - post :update, id: school.id, name: "Hardy har", scheduling_communication: 'school', format: 'json' - response.should be_success + post :update, params: { id: school.id, name: "Hardy har", scheduling_communication: 'school', format: 'json' } + response.should be_successful json = JSON.parse(response.body) json['name'].should eql "Hardy har" json['scheduling_communication'].should eql 'school' diff --git a/web/spec/controllers/api_scoring_controller_spec.rb b/web/spec/controllers/api_scoring_controller_spec.rb index a8213859f..dab883ade 100644 --- a/web/spec/controllers/api_scoring_controller_spec.rb +++ b/web/spec/controllers/api_scoring_controller_spec.rb @@ -53,8 +53,8 @@ describe ApiScoringController, type: :controller do it 'try work with nobody login and mary' do controller.current_user = nil - get :work, {clientid: @mary_client_id} - response.should_not be_success + get :work, params: { clientid: @mary_client_id } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('not logged in') @@ -62,8 +62,8 @@ describe ApiScoringController, type: :controller do it 'try work with mary login and nothing' do controller.current_user = @mary - get :work, {clientid: ''} - response.should_not be_success + get :work, params: { clientid: '' } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('clientid not specified') @@ -71,8 +71,8 @@ describe ApiScoringController, type: :controller do it 'try work with mary login and bogus' do controller.current_user = @mary - get :work, {clientid: BOGUS_CLIENT_ID} - response.should_not be_success + get :work, params: { clientid: BOGUS_CLIENT_ID } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('session not found') @@ -80,8 +80,8 @@ describe ApiScoringController, type: :controller do it 'try work with mary login and mary' do controller.current_user = @mary - get :work, {clientid: @mary_client_id} - response.should be_success + get :work, params: { clientid: @mary_client_id } + response.should be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 clientid = json[:clientid] @@ -91,8 +91,8 @@ describe ApiScoringController, type: :controller do it 'try work with mike login and mike' do controller.current_user = @mike - get :work, {clientid: @mike_client_id} - response.should be_success + get :work, params: { clientid: @mike_client_id } + response.should be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 clientid = json[:clientid] @@ -102,8 +102,8 @@ describe ApiScoringController, type: :controller do it 'try work with mary login and mike' do controller.current_user = @mary - get :work, {clientid: @mike_client_id} - response.should_not be_success + get :work, params: { clientid: @mike_client_id } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('session not found') @@ -111,8 +111,8 @@ describe ApiScoringController, type: :controller do it 'try work with mike login and mary' do controller.current_user = @mike - get :work, {clientid: @mary_client_id} - response.should_not be_success + get :work, params: { clientid: @mary_client_id } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('session not found') @@ -124,8 +124,8 @@ describe ApiScoringController, type: :controller do it 'try worklist with nobody login and nobody' do controller.current_user = nil - get :worklist, {clientid: ''} - response.should_not be_success + get :worklist, params: { clientid: '' } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('not logged in') @@ -133,8 +133,8 @@ describe ApiScoringController, type: :controller do it 'try worklist with mary login and nobody' do controller.current_user = @mary - get :worklist, {clientid: ''} - response.should_not be_success + get :worklist, params: { clientid: '' } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('clientid not specified') @@ -142,8 +142,8 @@ describe ApiScoringController, type: :controller do it 'try worklist with nobody login and mary' do controller.current_user = nil - get :worklist, {clientid: @mary_client_id} - response.should_not be_success + get :worklist, params: { clientid: @mary_client_id } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('not logged in') @@ -151,8 +151,8 @@ describe ApiScoringController, type: :controller do it 'try worklist with mary login and mary' do controller.current_user = @mary - get :worklist, {clientid: @mary_client_id} - response.should be_success + get :worklist, params: { clientid: @mary_client_id } + response.should be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 clientids = json[:clientids] @@ -164,8 +164,8 @@ describe ApiScoringController, type: :controller do it 'try worklist with mike login and mike' do controller.current_user = @mike - get :worklist, {clientid: @mike_client_id} - response.should be_success + get :worklist, params: { clientid: @mike_client_id } + response.should be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 clientids = json[:clientids] @@ -177,8 +177,8 @@ describe ApiScoringController, type: :controller do it 'try worklist with mary login and mike' do controller.current_user = @mary - get :worklist, {clientid: @mike_client_id} - response.should_not be_success + get :worklist, params: { clientid: @mike_client_id } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('session not found') @@ -190,8 +190,8 @@ describe ApiScoringController, type: :controller do it 'record with nobody login, mary, mary_ip_address, mike, mike_addr, score' do controller.current_user = nil - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('not logged in') @@ -199,8 +199,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, nil, mary_addr, mike, mike_addr, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => nil, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => nil, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('aclientid not specified') @@ -208,8 +208,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, nil, mike, mike_addr, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => nil, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => nil, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('aAddr not specified') @@ -217,8 +217,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, nil, mike_addr, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => nil, :bAddr => MIKE_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => nil, :bAddr => MIKE_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('bclientid not specified') @@ -226,8 +226,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, mike, nil, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => nil, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => nil, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('bAddr not specified') @@ -235,8 +235,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, mike, mike_addr, nil' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => nil} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => nil } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('score not specified or not numeric') @@ -244,8 +244,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, bogus, mary_addr, mike, mike_addr, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => BOGUS_CLIENT_ID, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => BOGUS_CLIENT_ID, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('a\'s session not found') @@ -253,8 +253,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, bogus, mike_addr, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => BOGUS_CLIENT_ID, :bAddr => MIKE_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => BOGUS_CLIENT_ID, :bAddr => MIKE_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('b\'s session not found') @@ -262,8 +262,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, bogus, mike, mike_addr, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => BAD_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => BAD_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('aAddr not valid ip_address') @@ -271,8 +271,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, bogus, mike, mike_addr, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => BOGUS_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => BOGUS_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('a\'s session addr does not match aAddr') @@ -280,8 +280,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, mike, bogus, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => BAD_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => BAD_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('bAddr not valid ip_address') @@ -289,8 +289,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, mike, bogus, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => BOGUS_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => BOGUS_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('b\'s session addr does not match bAddr') @@ -298,8 +298,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mike, mike_addr, mary, mary_addr, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mike_client_id, :aAddr => MIKE_IP_ADDRESS, :bclientid => @mary_client_id, :bAddr => MARY_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mike_client_id, :aAddr => MIKE_IP_ADDRESS, :bclientid => @mary_client_id, :bAddr => MARY_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('a\'s session not found') @@ -307,8 +307,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, mary, mary_addr, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mary_client_id, :bAddr => MARY_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mary_client_id, :bAddr => MARY_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('aclientid is same as bclientid') @@ -316,8 +316,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, mike, mary_addr, score' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MARY_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MARY_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('aAddr and bAddr are the same (to=f)') @@ -325,8 +325,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, mike, mike_addr, -1' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => -1} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => -1 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('score < 0 or score > 999') @@ -334,8 +334,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, mike, mike_addr, 1000' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 1000} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 1000 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('score < 0 or score > 999') @@ -343,8 +343,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, mike, mike_addr, bogus' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 'abc'} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 'abc' } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('score not specified or not numeric') @@ -352,8 +352,8 @@ describe ApiScoringController, type: :controller do it 'record with john login, john, john_addr, mike, mike_addr, bogus' do controller.current_user = @john - post :record, {:format => 'json', :aclientid => @john_client_id, :aAddr => JOHN_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @john_client_id, :aAddr => JOHN_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('a\'s location or isp not found') @@ -361,8 +361,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, john, john_addr, bogus' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @john_client_id, :bAddr => JOHN_IP_ADDRESS, :score => 20} - response.should_not be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @john_client_id, :bAddr => JOHN_IP_ADDRESS, :score => 20 } + response.should_not be_successful json = JSON.parse(response.body, :symbolize_names => true) json.length.should == 1 json[:message].should eql('b\'s location or isp not found') @@ -370,8 +370,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, mike, mike_addr, score (integer)' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20} - response.should be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 20 } + response.should be_successful json = JSON.parse(response.body, :symbolize_names => true) json.should == {message: 'OK (to=f)'} score = Score.findx(MARY_LOCIDISPID, MIKE_LOCIDISPID) @@ -394,8 +394,8 @@ describe ApiScoringController, type: :controller do it 'record with mary login, mary, mary_addr, mike, mike_addr, score (floating pt)' do controller.current_user = @mary - post :record, {:format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 21.234} - response.should be_success + post :record, params: { :format => 'json', :aclientid => @mary_client_id, :aAddr => MARY_IP_ADDRESS, :bclientid => @mike_client_id, :bAddr => MIKE_IP_ADDRESS, :score => 21.234 } + response.should be_successful json = JSON.parse(response.body, :symbolize_names => true) json.should == {message: 'OK (to=f)'} score = Score.findx(MARY_LOCIDISPID, MIKE_LOCIDISPID) diff --git a/web/spec/controllers/api_search_controller_spec.rb b/web/spec/controllers/api_search_controller_spec.rb index d1264e279..f8f7d3f20 100644 --- a/web/spec/controllers/api_search_controller_spec.rb +++ b/web/spec/controllers/api_search_controller_spec.rb @@ -19,9 +19,8 @@ describe ApiSearchController, type: :controller do stub_request(:post, latency_data_uri) .to_return(body: response_body, status: 200) - get :filter, { latency_good: true, latency_fair: true, latency_high: true, format: 'json' } - - response.should be_success + get :filter, params: { latency_good: true, latency_fair: true, latency_high: true, format: 'json' } + response.should be_successful expect(response.content_type).to eq("application/json") expect(response).to render_template(:filter) expect(response).to have_http_status(:created) diff --git a/web/spec/controllers/api_shopping_carts_controller_spec.rb b/web/spec/controllers/api_shopping_carts_controller_spec.rb index fac0b9fa2..74c528059 100644 --- a/web/spec/controllers/api_shopping_carts_controller_spec.rb +++ b/web/spec/controllers/api_shopping_carts_controller_spec.rb @@ -24,7 +24,7 @@ describe ApiShoppingCartsController, type: :controller do end it "add_jamtrack" do - post :add_jamtrack, {:format => 'json', id: jam_track.id} + post :add_jamtrack, params: { :format => 'json', id: jam_track.id } response.status.should == 200 end @@ -34,7 +34,7 @@ describe ApiShoppingCartsController, type: :controller do user.reload user.shopping_carts.count.should eq(1) - get :index, {:format => 'json'} + get :index, params: { :format => 'json' } response.status.should == 200 response_body = JSON.parse(response.body) response_body.length.should eq(1) @@ -43,14 +43,14 @@ describe ApiShoppingCartsController, type: :controller do it "remove_cart" do cart = ShoppingCart.create(user, jam_track) - delete :remove_cart, {:format => 'json', id: cart.id} + delete :remove_cart, params: { :format => 'json', id: cart.id } response.status.should == 200 ShoppingCart.find_by_id(cart.id).should be_nil end it "clears cart" do cart = ShoppingCart.create(user, jam_track) - delete :clear_all, {:format => 'json'} + delete :clear_all, params: { :format => 'json' } response.status.should == 200 ShoppingCart.find_by_id(cart.id).should be_nil end @@ -66,7 +66,7 @@ describe ApiShoppingCartsController, type: :controller do end it "add_jamtrack" do - post :add_jamtrack, {:format => 'json', id: jam_track.id} + post :add_jamtrack, params: { :format => 'json', id: jam_track.id } response.status.should == 200 user.reload user.shopping_carts.count.should eql(1) @@ -75,7 +75,7 @@ describe ApiShoppingCartsController, type: :controller do it "index" do cart = ShoppingCart.create(user, jam_track) - get :index, {:format => 'json'} + get :index, params: { :format => 'json' } response.status.should == 200 response_body = JSON.parse(response.body) response_body.length.should eq(1) @@ -84,14 +84,14 @@ describe ApiShoppingCartsController, type: :controller do it "remove_cart" do cart = ShoppingCart.create(user, jam_track) - delete :remove_cart, {:format => 'json', id: cart.id} + delete :remove_cart, params: { :format => 'json', id: cart.id } response.status.should == 200 ShoppingCart.find_by_id(cart.id).should be_nil end it "clears cart" do cart = ShoppingCart.create(user, jam_track) - delete :clear_all, {:format => 'json'} + delete :clear_all, params: { :format => 'json' } response.status.should == 200 ShoppingCart.find_by_id(cart.id).should be_nil end diff --git a/web/spec/controllers/api_signup_hint_spec.rb b/web/spec/controllers/api_signup_hint_spec.rb index 1bafa164a..a886751b8 100644 --- a/web/spec/controllers/api_signup_hint_spec.rb +++ b/web/spec/controllers/api_signup_hint_spec.rb @@ -11,9 +11,8 @@ describe ApiSignupHintsController, :type=>:controller do end it "creates" do - post :create, {format: :json} - - response.should be_success + post :create, params: { format: :json } + response.should be_successful body = JSON.parse(response.body) body["id"].should_not be_nil @@ -21,16 +20,14 @@ describe ApiSignupHintsController, :type=>:controller do end it "updates" do - post :create, {format: :json, redirect_location: 'hi'} - - response.should be_success + post :create, params: { format: :json, redirect_location: 'hi' } + response.should be_successful body = JSON.parse(response.body) body["redirect_location"].should eq('hi') body["want_jamblaster"].should eq(false) - post :create, {format: :json, redirect_location: 'bye', want_jamblaster: true} - - response.should be_success + post :create, params: { format: :json, redirect_location: 'bye', want_jamblaster: true } + response.should be_successful body = JSON.parse(response.body) body["redirect_location"].should eq('bye') body["want_jamblaster"].should eq(true) diff --git a/web/spec/controllers/api_teachers_controller_spec.rb b/web/spec/controllers/api_teachers_controller_spec.rb index 62efc8bc7..8993c84e7 100644 --- a/web/spec/controllers/api_teachers_controller_spec.rb +++ b/web/spec/controllers/api_teachers_controller_spec.rb @@ -40,8 +40,8 @@ describe ApiTeachersController, type: :controller do end describe "creates" do it "simple" do - post :create, biography: BIO, format: 'json' - response.should be_success + post :create, params: { biography: BIO, format: 'json' } + response.should be_successful user.reload user.teacher.should_not be_nil @@ -50,8 +50,8 @@ describe ApiTeachersController, type: :controller do it "with instruments" do - post :create, biography: BIO, instruments: [instrument1, instrument2], format: 'json' - response.should be_success + post :create, params: { biography: BIO, instruments: [instrument1, instrument2], format: 'json' } + response.should be_successful user.reload user.teacher.should_not be_nil t = user.teacher @@ -72,9 +72,9 @@ describe ApiTeachersController, type: :controller do format: 'json' } - post :create, params + post :create, params: { params } - response.should be_success + response.should be_successful user.reload user.teacher.should_not be_nil t = user.teacher @@ -113,15 +113,15 @@ describe ApiTeachersController, type: :controller do end it "by teacher id" do - get :detail, {:format => 'json', teacher_id: @teacher.id} - response.should be_success + get :detail, params: { :format => 'json', teacher_id: @teacher.id } + response.should be_successful json = JSON.parse(response.body) json["biography"].should==BIO end it "by current user" do - get :detail, {:format => 'json'} - response.should be_success + get :detail, params: { :format => 'json' } + response.should be_successful json = JSON.parse(response.body) json["biography"].should==BIO @@ -130,14 +130,14 @@ describe ApiTeachersController, type: :controller do it "no teacher" do user2 = FactoryBot.create(:user) controller.current_user = user2 - get :detail, {:format => 'json'} + get :detail, params: { :format => 'json' } response.status.should eq(404) end it "and retrieves sub-records" do - get :detail, {:format => 'json', teacher_id: @teacher.id} - response.should be_success + get :detail, params: { :format => 'json', teacher_id: @teacher.id } + response.should be_successful json = JSON.parse(response.body) json["genres"].should have(2).items json["instruments"].should have(2).items @@ -163,8 +163,8 @@ describe ApiTeachersController, type: :controller do end it "deletes" do - delete :delete, {:format => 'json', id: @teacher.id} - response.should be_success + delete :delete, params: { :format => 'json', id: @teacher.id } + response.should be_successful user.reload user.teacher.should be_nil end @@ -183,9 +183,9 @@ describe ApiTeachersController, type: :controller do format: 'json' } - post :update, params + post :update, params: { params } - response.should be_success + response.should be_successful user.reload user.teacher.should_not be_nil t = user.teacher @@ -209,8 +209,8 @@ describe ApiTeachersController, type: :controller do describe "validates" do it "introduction" do - post :create, validate_introduction: true, format: 'json' - response.should_not be_success + post :create, params: { validate_introduction: true, format: 'json' } + response.should_not be_successful response.status.should eq(422) json = JSON.parse(response.body) json['errors'].should have_key('biography') @@ -218,8 +218,8 @@ describe ApiTeachersController, type: :controller do end it "basics" do - post :create, validate_basics: true, format: 'json' - response.should_not be_success + post :create, params: { validate_basics: true, format: 'json' } + response.should_not be_successful response.status.should eq(422) json = JSON.parse(response.body) json['errors'].should have_key('instruments') @@ -227,8 +227,8 @@ describe ApiTeachersController, type: :controller do json['errors'].should have_key('genres') json['errors'].should have_key('languages') - post :create, instruments: [instrument1, instrument2], validate_basics: true, format: 'json' - response.should_not be_success + post :create, params: { instruments: [instrument1, instrument2], validate_basics: true, format: 'json' } + response.should_not be_successful response.status.should eq(422) json = JSON.parse(response.body) json['errors'].should_not have_key('subjects') @@ -252,8 +252,8 @@ describe ApiTeachersController, type: :controller do validate_pricing: true, format: 'json' } - post :create, params - response.should_not be_success + post :create, params: { params } + response.should_not be_successful response.status.should eq(422) json = JSON.parse(response.body) json['errors'].should have_key('offer_pricing') @@ -261,8 +261,8 @@ describe ApiTeachersController, type: :controller do # Add lesson duration and resubmit. We should only get one error now: params[:lesson_duration_45] = true - post :create, params - response.should_not be_success + post :create, params: { params } + response.should_not be_successful response.status.should eq(422) json = JSON.parse(response.body) json['errors'].should have_key('offer_pricing') diff --git a/web/spec/controllers/api_user_syncs_controller_spec.rb b/web/spec/controllers/api_user_syncs_controller_spec.rb index 5deefd714..77c2db68d 100644 --- a/web/spec/controllers/api_user_syncs_controller_spec.rb +++ b/web/spec/controllers/api_user_syncs_controller_spec.rb @@ -13,20 +13,20 @@ describe ApiUserSyncsController, type: :controller do it "requires logged in" do controller.current_user = nil - get :index, {format: 'json', id: ''} + get :index, params: { format: 'json', id: '' } json = JSON.parse(response.body, :symbolize_names => true) json.should == {message: "not logged in"} end it "can return empty results" do - get :index, { :format => 'json', :id => user1.id } + get :index, params: { :format => 'json', :id => user1.id } json = JSON.parse(response.body, :symbolize_names => true) json[:next].should be_nil json[:entries].length.should == 0 end it "deletables" do - post :deletables, { :format => 'json', :id => user1.id, recording_ids: ['1'] } + post :deletables, params: { :format => 'json', :id => user1.id, recording_ids: ['1'] } json = JSON.parse(response.body, :symbolize_names => true) json[:recording_ids].should eq(['1']) end @@ -48,7 +48,7 @@ describe ApiUserSyncsController, type: :controller do it "no claimed_recordings" do # if there are no claims, then no one wants the recording. no usersyncs - get :index, { :format => 'json', :id => user1.id } + get :index, params: { :format => 'json', :id => user1.id } json = JSON.parse(response.body, :symbolize_names => true) json[:next].should be_nil json[:entries].length.should == 0 @@ -58,7 +58,7 @@ describe ApiUserSyncsController, type: :controller do recording1.duration = nil recording1.save! - get :index, { :format => 'json', :id => user1.id } + get :index, params: { :format => 'json', :id => user1.id } json = JSON.parse(response.body, :symbolize_names => true) json[:next].should be_nil json[:entries].length.should == 0 @@ -71,7 +71,7 @@ describe ApiUserSyncsController, type: :controller do recording1.recorded_tracks[0].fully_uploaded = false recording1.recorded_tracks[0].save! - get :index, { :format => 'json', :id => user1.id } + get :index, params: { :format => 'json', :id => user1.id } json = JSON.parse(response.body, :symbolize_names => true) json[:next].should be_nil json[:entries].length.should == 2 @@ -89,7 +89,7 @@ describe ApiUserSyncsController, type: :controller do recorded_track2[:download][:too_many_downloads].should be false controller.current_user = user2 - get :index, { :format => 'json', :id => user2.id } + get :index, params: { :format => 'json', :id => user2.id } json = JSON.parse(response.body, :symbolize_names => true) json[:next].should be_nil json[:entries].length.should == 1 @@ -107,13 +107,13 @@ describe ApiUserSyncsController, type: :controller do FactoryBot.create(:claimed_recording, user: user2, recording: recording1, discarded:false) # it's a length of zero because recorded_tracks default to 'fully_uploaded = true'. so nothing to do for this user - get :index, { :format => 'json', :id => user1.id } + get :index, params: { :format => 'json', :id => user1.id } json = JSON.parse(response.body, :symbolize_names => true) json[:next].should be_nil json[:entries].length.should == 0 controller.current_user = user2 - get :index, { :format => 'json', :id => user2.id } + get :index, params: { :format => 'json', :id => user2.id } json = JSON.parse(response.body, :symbolize_names => true) json[:next].should be_nil json[:entries].length.should == 2 @@ -136,7 +136,7 @@ describe ApiUserSyncsController, type: :controller do recording1.all_discarded = true recording1.save! - get :index, { :format => 'json', :id => user1.id } + get :index, params: { :format => 'json', :id => user1.id } json = JSON.parse(response.body, :symbolize_names => true) json[:next].should be_nil json[:entries].length.should == 0 diff --git a/web/spec/controllers/api_users_controller_spec.rb b/web/spec/controllers/api_users_controller_spec.rb index c98f3359f..28cb653c2 100644 --- a/web/spec/controllers/api_users_controller_spec.rb +++ b/web/spec/controllers/api_users_controller_spec.rb @@ -17,9 +17,9 @@ describe ApiUsersController, type: :controller do let!(:gift_card) {FactoryBot.create(:gift_card)} it "can succeed" do - post :redeem_giftcard, id:user.id, gift_card: gift_card.code, format:'json' + post :redeem_giftcard, params: { id:user.id, gift_card: gift_card.code, format:'json' } - response.should be_success + response.should be_successful user.reload gift_card.reload @@ -33,7 +33,7 @@ describe ApiUsersController, type: :controller do gift_card.user = user gift_card.save! - post :redeem_giftcard, id:user.id, gift_card: gift_card.code, format:'json' + post :redeem_giftcard, params: { id:user.id, gift_card: gift_card.code, format:'json' } response.status.should eq(422) error_data = JSON.parse(response.body) @@ -52,7 +52,7 @@ describe ApiUsersController, type: :controller do gift_card.user = user2 gift_card.save! - post :redeem_giftcard, id:user.id, gift_card: gift_card.code, format:'json' + post :redeem_giftcard, params: { id:user.id, gift_card: gift_card.code, format:'json' } response.status.should eq(422) error_data = JSON.parse(response.body) @@ -71,9 +71,9 @@ describe ApiUsersController, type: :controller do cart1 = ShoppingCart.add_jam_track_to_cart(user, jam_track) cart1.marked_for_redeem.should eq(1) - post :redeem_giftcard, id:user.id, gift_card: gift_card.code, format:'json' + post :redeem_giftcard, params: { id:user.id, gift_card: gift_card.code, format:'json' } - response.should be_success + response.should be_successful user.reload gift_card.reload @@ -93,9 +93,9 @@ describe ApiUsersController, type: :controller do cart1 = ShoppingCart.add_jam_track_to_cart(user, jam_track) cart1.marked_for_redeem.should eq(0) - post :redeem_giftcard, id:user.id, gift_card: gift_card.code, format:'json' + post :redeem_giftcard, params: { id:user.id, gift_card: gift_card.code, format:'json' } - response.should be_success + response.should be_successful user.reload gift_card.reload @@ -118,9 +118,9 @@ describe ApiUsersController, type: :controller do cart1.marked_for_redeem.should eq(0) end - post :redeem_giftcard, id:user.id, gift_card: gift_card.code, format:'json' + post :redeem_giftcard, params: { id:user.id, gift_card: gift_card.code, format:'json' } - response.should be_success + response.should be_successful user.reload gift_card.reload @@ -137,8 +137,8 @@ describe ApiUsersController, type: :controller do describe "create" do it "successful" do email = 'user_create1@jamkazam.com' - post :create, first_name: 'Seth', last_name: 'Call', email: email, password: 'jam123', terms: true, format: 'json' - response.should be_success + post :create, params: { first_name: 'Seth', last_name: 'Call', email: email, password: 'jam123', terms: true, format: 'json' } + response.should be_successful found = User.find_by_email(email) found.city.should be_nil found.state.should be_nil @@ -151,13 +151,13 @@ describe ApiUsersController, type: :controller do it "no first name is OK" do email = 'user_create2@jamkazam.com' - post :create, first_name: nil, last_name: 'Call', email: email, password: 'jam123', terms: true, format: 'json' + post :create, params: { first_name: nil, last_name: 'Call', email: email, password: 'jam123', terms: true, format: 'json' } response.status.should eq(201) end it "no email" do email = nil - post :create, first_name: nil, last_name: 'Call', email: email, password: 'jam123', terms: true, format: 'json' + post :create, params: { first_name: nil, last_name: 'Call', email: email, password: 'jam123', terms: true, format: 'json' } response.status.should eq(422) error_data = JSON.parse(response.body) error_data['errors']['email'].should eq(["can't be blank", "is invalid"]) @@ -165,7 +165,7 @@ describe ApiUsersController, type: :controller do it "short password" do email = nil - post :create, first_name: nil, last_name: 'Call', email: email, password: 'jam', terms: true, format: 'json' + post :create, params: { first_name: nil, last_name: 'Call', email: email, password: 'jam', terms: true, format: 'json' } response.status.should eq(422) error_data = JSON.parse(response.body) error_data['errors']['password'].should eq(["is too short (minimum is 6 characters)"]) @@ -173,7 +173,7 @@ describe ApiUsersController, type: :controller do it "no terms" do email = 'user_create3@jamkazam.com' - post :create, first_name: 'Seth', last_name: 'Call', email: email, password: 'jam123', terms: false, format: 'json' + post :create, params: { first_name: 'Seth', last_name: 'Call', email: email, password: 'jam123', terms: false, format: 'json' } response.status.should eq(422) error_data = JSON.parse(response.body) error_data['errors']['terms_of_service'].should eq(["must be accepted"]) @@ -194,8 +194,8 @@ describe ApiUsersController, type: :controller do :trigger_delete=>true, :target_uid=>"2112" }] - post :update, id:user.id, calendars: cals, :format=>'json' - response.should be_success + post :update, params: { id:user.id, calendars: cals, :format=>'json' } + response.should be_successful user.reload user.calendars.should have(1).items end @@ -203,8 +203,8 @@ describe ApiUsersController, type: :controller do describe "update mod" do it "empty mod" do - post :update, id:user.id, mods: {}, :format=>'json' - response.should be_success + post :update, params: { id:user.id, mods: {}, :format=>'json' } + response.should be_successful user.reload user.mods_json.should == {} end @@ -212,8 +212,8 @@ describe ApiUsersController, type: :controller do it "no_show mod" do user_id = user.id mods = {"no_show" => {"something1" => true}} - post :update, id:user.id, mods: mods, :format=>'json' - response.should be_success + post :update, params: { id:user.id, mods: mods, :format=>'json' } + response.should be_successful # verify that the user object has the mods data user_again = User.find(user_id) @@ -261,8 +261,8 @@ describe ApiUsersController, type: :controller do end next if valid.blank? 2.times do |nn| - get :validate_data, sitetype:sitetype, data: 0==nn ? valid : invalid - response.should be_success + get :validate_data, params: { sitetype:sitetype, data: 0==nn ? valid : invalid } + response.should be_successful json = JSON.parse(response.body) if Utils.recording_source?(sitetype) @@ -280,8 +280,8 @@ describe ApiUsersController, type: :controller do describe "audio_latency" do it "updates both connection and user" do - post :audio_latency, id: user.id, client_id: conn.client_id, audio_latency: 3.5, :format => 'json' - response.should be_success + post :audio_latency, params: { id: user.id, client_id: conn.client_id, audio_latency: 3.5, :format => 'json' } + response.should be_successful conn.reload conn.last_jam_audio_latency.should == 3.5 @@ -292,16 +292,16 @@ describe ApiUsersController, type: :controller do it "if connection does not exist, user is still updated" do - post :audio_latency, id: user.id, client_id: 'nothingness', audio_latency: 3.5, :format => 'json' - response.should be_success + post :audio_latency, params: { id: user.id, client_id: 'nothingness', audio_latency: 3.5, :format => 'json' } + response.should be_successful user.reload conn.user.last_jam_audio_latency.should == 3.5 end it "ignores latencies of 2 or less" do - post :audio_latency, id: user.id, client_id: conn.client_id, audio_latency: 2, :format => 'json' - response.should be_success + post :audio_latency, params: { id: user.id, client_id: conn.client_id, audio_latency: 2, :format => 'json' } + response.should be_successful conn.reload conn.last_jam_audio_latency.should == 5 @@ -321,8 +321,8 @@ describe ApiUsersController, type: :controller do stub_request(:post, latency_data_uri) .to_return( body: response_body, status: 200) - get :get_latencies, id: user.id, user_ids: [user1, user2].map(&:id).join(',') - response.should be_success + get :get_latencies, params: { id: user.id, user_ids: [user1, user2].map(&:id).join(',') } + response.should be_successful JSON.parse(response.body)['users'].size.should eq(2) end end @@ -348,7 +348,7 @@ describe ApiUsersController, type: :controller do it "307 Temporary Redirect to s3" do content_for_file("this is a crash file") - put :crash_dump, client_type: 'MacOSX', version: '1.0', client_version: '1.0', client_id: '1', session_id: '1', timestamp: 1618246569, fsize: '10K', description: "memory_limit_exceeded", crash_context: "Blahblahblab" + put :crash_dump, params: { client_type: 'MacOSX', version: '1.0', client_version: '1.0', client_id: '1', session_id: '1', timestamp: 1618246569, fsize: '10K', description: "memory_limit_exceeded", crash_context: "Blahblahblab" } expect(response).to have_http_status(307) put_file_to_aws(response.location, File.read(CRASH_TEMP_FILE)) end @@ -379,51 +379,51 @@ describe ApiUsersController, type: :controller do let(:user_asset) { FactoryBot.create(:user_asset, user_id: user.id, asset_type: 'video', recording_id: 1000, session_id: 2000, ext_id: 3000) } it "get user_asset by id" do - get :user_assets, id: user_asset.id, format: 'json' + get :user_assets, params: { id: user_asset.id, format: 'json' } expect(response).to have_http_status(307) expect(response.location).to eq(user_asset.read_url) end it "get user_asset by ext_id" do - get :user_assets, ext_id: user_asset.ext_id, format: 'json' + get :user_assets, params: { ext_id: user_asset.ext_id, format: 'json' } expect(response).to have_http_status(307) expect(response.location).to eq(user_asset.read_url) end it "get user_asset by asset_type and recording_id" do - get :user_assets, asset_type: user_asset.asset_type, recording_id: user_asset.recording_id, format: 'json' + get :user_assets, params: { asset_type: user_asset.asset_type, recording_id: user_asset.recording_id, format: 'json' } expect(response).to have_http_status(307) expect(response.location).to eq(user_asset.read_url) end it "get user_asset by asset_type and session_id" do - get :user_assets, asset_type: user_asset.asset_type, session_id: user_asset.session_id, format: 'json' + get :user_assets, params: { asset_type: user_asset.asset_type, session_id: user_asset.session_id, format: 'json' } expect(response).to have_http_status(307) expect(response.location).to eq(user_asset.read_url) end it "returns 404 not_found for invalid id" do - get :user_assets, id: 100, format: 'json' + get :user_assets, params: { id: 100, format: 'json' } expect(response).to have_http_status(404) end it "returns 404 not_found for invalid ext_id" do - get :user_assets, ext_id: 100, format: 'json' + get :user_assets, params: { ext_id: 100, format: 'json' } expect(response).to have_http_status(404) end it "returns 404 not_found for invalid asset_type+recording_id" do - get :user_assets, asset_type: user_asset.asset_type, recording_id: 0 , format: 'json' + get :user_assets, params: { asset_type: user_asset.asset_type, recording_id: 0 , format: 'json' } expect(response).to have_http_status(404) end it "returns 404 not_found for invalid asset_type+session_id" do - get :user_assets, asset_type: user_asset.asset_type, session_id: 0 , format: 'json' + get :user_assets, params: { asset_type: user_asset.asset_type, session_id: 0 , format: 'json' } expect(response).to have_http_status(404) end it "returns message for unsupported params" do - get :user_assets, external_id: 0 , format: 'json' + get :user_assets, params: { external_id: 0 , format: 'json' } expect(response).to have_http_status(415) expect(response.body).to eq("Unsupported query") end diff --git a/web/spec/controllers/music_sessions_controller_spec.rb b/web/spec/controllers/music_sessions_controller_spec.rb index 65ba15a42..78d27e91b 100644 --- a/web/spec/controllers/music_sessions_controller_spec.rb +++ b/web/spec/controllers/music_sessions_controller_spec.rb @@ -22,7 +22,7 @@ describe MusicSessionsController, type: :controller do describe "video conferencing server url" do it "GET /video/room/:music_session_id" do - get :session_video, music_session_id: music_session.id + get :session_video, params: { music_session_id: music_session.id } temp_token = TempToken.order(created_at: :desc).first expect(temp_token.user).to eq(user) video_conf_url = "#{Rails.application.config.video_conferencing_host}/room/#{music_session.id}?token=#{temp_token.token}" diff --git a/web/spec/controllers/sessions_controller_spec.rb b/web/spec/controllers/sessions_controller_spec.rb index 424016ef6..9fb82db33 100644 --- a/web/spec/controllers/sessions_controller_spec.rb +++ b/web/spec/controllers/sessions_controller_spec.rb @@ -8,7 +8,7 @@ describe SessionsController, type: :controller do describe "GET 'new'" do it "should work" do get :signin - response.should be_success + response.should be_successful end it "should have the right title" do @@ -25,13 +25,13 @@ describe SessionsController, type: :controller do end it "should sign the user in" do - post :create, :session => @attr + post :create, params: { :session => @attr } controller.current_user.should == @user controller.signed_in?.should == true end it "should redirect the user to the proper page" do - post :create, :session => @attr + post :create, params: { :session => @attr } response.should redirect_to(client_url) end end diff --git a/web/spec/controllers/share_tokens_controller_spec.rb b/web/spec/controllers/share_tokens_controller_spec.rb index c32d9bc14..1e0b41614 100644 --- a/web/spec/controllers/share_tokens_controller_spec.rb +++ b/web/spec/controllers/share_tokens_controller_spec.rb @@ -9,7 +9,7 @@ describe ShareTokensController, type: :controller do it "resolves music session" do music_session.touch - get :shareable_resolver, :id => music_session.music_session.share_token.token + get :shareable_resolver, params: { :id => music_session.music_session.share_token.token } location_header = response.headers["Location"] location_header.should == music_session_detail_url(music_session.id) @@ -18,7 +18,7 @@ describe ShareTokensController, type: :controller do it "resolves claimed recording" do claimed_recording.touch - get :shareable_resolver, :id => claimed_recording.share_token.token + get :shareable_resolver, params: { :id => claimed_recording.share_token.token } location_header = response.headers["Location"] location_header.should == recording_detail_url(claimed_recording.id) diff --git a/web/spec/factories.rb b/web/spec/factories.rb index 3d62fe664..1f85b09d9 100644 --- a/web/spec/factories.rb +++ b/web/spec/factories.rb @@ -419,38 +419,38 @@ FactoryBot.define do end factory :icecast_admin_authentication, :class => JamRuby::IcecastAdminAuthentication do - source_pass { Faker::Lorem.characters(10) } - admin_user { Faker::Lorem.characters(10) } - admin_pass { Faker::Lorem.characters(10) } - relay_user { Faker::Lorem.characters(10) } - relay_pass { Faker::Lorem.characters(10) } + source_pass { Faker::Lorem.characters(number: 10) } + admin_user { Faker::Lorem.characters(number: 10) } + admin_pass { Faker::Lorem.characters(number: 10) } + relay_user { Faker::Lorem.characters(number: 10) } + relay_pass { Faker::Lorem.characters(number: 10) } end factory :icecast_directory, :class => JamRuby::IcecastDirectory do yp_url_timeout { 15 } - yp_url { Faker::Lorem.characters(10) } + yp_url { Faker::Lorem.characters(number: 10) } end factory :icecast_master_server_relay, :class => JamRuby::IcecastMasterServerRelay do - master_server { Faker::Lorem.characters(10) } + master_server { Faker::Lorem.characters(number: 10) } master_server_port { 8000 } master_update_interval { 120 } - master_username { Faker::Lorem.characters(10) } - master_pass { Faker::Lorem.characters(10) } + master_username { Faker::Lorem.characters(number: 10) } + master_pass { Faker::Lorem.characters(number: 10) } relays_on_demand { 1 } end factory :icecast_path, :class => JamRuby::IcecastPath do - base_dir { Faker::Lorem.characters(10) } - log_dir { Faker::Lorem.characters(10) } - pid_file { Faker::Lorem.characters(10) } - web_root { Faker::Lorem.characters(10) } - admin_root { Faker::Lorem.characters(10) } + base_dir { Faker::Lorem.characters(number: 10) } + log_dir { Faker::Lorem.characters(number: 10) } + pid_file { Faker::Lorem.characters(number: 10) } + web_root { Faker::Lorem.characters(number: 10) } + admin_root { Faker::Lorem.characters(number: 10) } end factory :icecast_logging, :class => JamRuby::IcecastLogging do - access_log { Faker::Lorem.characters(10) } - error_log { Faker::Lorem.characters(10) } + access_log { Faker::Lorem.characters(number: 10) } + error_log { Faker::Lorem.characters(number: 10) } log_level { 3 } log_archive { nil } log_size { 10000 } @@ -461,19 +461,19 @@ FactoryBot.define do end factory :icecast_mount, :class => JamRuby::IcecastMount do - name { "/" + Faker::Lorem.characters(10) } - source_username { Faker::Lorem.characters(10) } - source_pass { Faker::Lorem.characters(10) } + name { "/" + Faker::Lorem.characters(number: 10) } + source_username { Faker::Lorem.characters(number: 10) } + source_pass { Faker::Lorem.characters(number: 10) } max_listeners { 100 } max_listener_duration { 3600 } - fallback_mount { Faker::Lorem.characters(10) } + fallback_mount { Faker::Lorem.characters(number: 10) } fallback_override { 1 } fallback_when_full { 1 } is_public { -1 } - stream_name { Faker::Lorem.characters(10) } - stream_description { Faker::Lorem.characters(10) } - stream_url { Faker::Lorem.characters(10) } - genre { Faker::Lorem.characters(10) } + stream_name { Faker::Lorem.characters(number: 10) } + stream_description { Faker::Lorem.characters(number: 10) } + stream_url { Faker::Lorem.characters(number: 10) } + genre { Faker::Lorem.characters(number: 10) } hidden { 0 } association :server, factory: :icecast_server_with_overrides @@ -498,19 +498,19 @@ FactoryBot.define do factory :icecast_relay, :class => JamRuby::IcecastRelay do port { 8000 } - mount { Faker::Lorem.characters(10) } - server { Faker::Lorem.characters(10) } + mount { Faker::Lorem.characters(number: 10) } + server { Faker::Lorem.characters(number: 10) } on_demand { 1 } end factory :icecast_user_authentication, :class => JamRuby::IcecastUserAuthentication do authentication_type { 'url' } - unused_username { Faker::Lorem.characters(10) } - unused_pass { Faker::Lorem.characters(10) } - mount_add { Faker::Lorem.characters(10) } - mount_remove { Faker::Lorem.characters(10) } - listener_add { Faker::Lorem.characters(10) } - listener_remove { Faker::Lorem.characters(10) } + unused_username { Faker::Lorem.characters(number: 10) } + unused_pass { Faker::Lorem.characters(number: 10) } + mount_add { Faker::Lorem.characters(number: 10) } + mount_remove { Faker::Lorem.characters(number: 10) } + listener_add { Faker::Lorem.characters(number: 10) } + listener_remove { Faker::Lorem.characters(number: 10) } auth_header { 'icecast-auth-user: 1' } timelimit_header { 'icecast-auth-timelimit:' } end @@ -557,18 +557,18 @@ FactoryBot.define do factory :icecast_mount_template, :class => JamRuby::IcecastMountTemplate do sequence(:name) { |n| "name-#{n}"} - source_username { Faker::Lorem.characters(10) } - source_pass { Faker::Lorem.characters(10) } + source_username { Faker::Lorem.characters(number: 10) } + source_pass { Faker::Lorem.characters(number: 10) } max_listeners { 100 } max_listener_duration { 3600 } - fallback_mount { Faker::Lorem.characters(10) } + fallback_mount { Faker::Lorem.characters(number: 10) } fallback_override { 1 } fallback_when_full { 1 } is_public { -1 } - stream_name { Faker::Lorem.characters(10) } - stream_description { Faker::Lorem.characters(10) } - stream_url { Faker::Lorem.characters(10) } - genre { Faker::Lorem.characters(10) } + stream_name { Faker::Lorem.characters(number: 10) } + stream_description { Faker::Lorem.characters(number: 10) } + stream_url { Faker::Lorem.characters(number: 10) } + genre { Faker::Lorem.characters(number: 10) } hidden { 0 } association :authentication, :factory => :icecast_user_authentication end @@ -633,7 +633,7 @@ FactoryBot.define do factory :notification_text_message do description { 'TEXT_MESSAGE' } - message { Faker::Lorem.characters(10) } + message { Faker::Lorem.characters(number: 10) } end end diff --git a/web/spec/features/admin_spec.rb b/web/spec/features/admin_spec.rb index 47dfbf0ad..2b2028028 100644 --- a/web/spec/features/admin_spec.rb +++ b/web/spec/features/admin_spec.rb @@ -7,7 +7,7 @@ describe "Admin", :js => true, :type => :feature, :capybara_feature => true do subject { page } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 10 end diff --git a/web/spec/features/authentication_pages_spec.rb b/web/spec/features/authentication_pages_spec.rb index f5099cd8d..f26db57e8 100644 --- a/web/spec/features/authentication_pages_spec.rb +++ b/web/spec/features/authentication_pages_spec.rb @@ -5,7 +5,7 @@ describe "Authentication", :js => true, :type => :feature, :capybara_feature => subject { page } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 10 end diff --git a/web/spec/features/avatar_spec.rb b/web/spec/features/avatar_spec.rb index 354b445eb..746180dba 100644 --- a/web/spec/features/avatar_spec.rb +++ b/web/spec/features/avatar_spec.rb @@ -5,7 +5,7 @@ describe "Avatar", :js => true, :type => :feature, :capybara_feature => true do subject { page } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 10 end diff --git a/web/spec/features/checkout_spec.rb b/web/spec/features/checkout_spec.rb index 2da319cde..98662bd4e 100644 --- a/web/spec/features/checkout_spec.rb +++ b/web/spec/features/checkout_spec.rb @@ -29,7 +29,7 @@ describe "Checkout", :js => true, :type => :feature, :capybara_feature => true d end before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 20 # these tests are SLOOOOOW diff --git a/web/spec/features/connection_states_spec.rb b/web/spec/features/connection_states_spec.rb index ed4ce4a66..f2b2d80a6 100644 --- a/web/spec/features/connection_states_spec.rb +++ b/web/spec/features/connection_states_spec.rb @@ -4,7 +4,7 @@ if defined?(TEST_CONNECT_STATES) && TEST_CONNECT_STATES describe "ConnectionStates", :js => true, :type => :feature, :capybara_feature => true do before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver @user = FactoryBot.create(:user) end diff --git a/web/spec/features/corp_spec.rb b/web/spec/features/corp_spec.rb index 8e6d365ea..8a83ed63b 100644 --- a/web/spec/features/corp_spec.rb +++ b/web/spec/features/corp_spec.rb @@ -5,7 +5,7 @@ describe "Corp Pages", :js => true, :type => :feature, :capybara_feature => true subject { page } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 10 end diff --git a/web/spec/features/download_spec.rb b/web/spec/features/download_spec.rb index eaa37b40f..ac9ee32f7 100644 --- a/web/spec/features/download_spec.rb +++ b/web/spec/features/download_spec.rb @@ -7,7 +7,7 @@ describe "Download", :js => true, :type => :feature, :capybara_feature => true subject { page } before(:all) do - #Capybara.javascript_driver = :poltergeist + #Capybara.javascript_driver = :cuprite #Capybara.current_driver = Capybara.javascript_driver #Capybara.default_max_wait_time = 10 end diff --git a/web/spec/features/event_spec.rb b/web/spec/features/event_spec.rb index cd38acf72..f3f206b4d 100644 --- a/web/spec/features/event_spec.rb +++ b/web/spec/features/event_spec.rb @@ -5,7 +5,7 @@ describe "Events", :js => true, :type => :feature, :capybara_feature => true, :s subject { page } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 30 # these tests are SLOOOOOW end diff --git a/web/spec/features/getting_started_dialog_spec.rb b/web/spec/features/getting_started_dialog_spec.rb index 8becc773a..82a70a4fd 100644 --- a/web/spec/features/getting_started_dialog_spec.rb +++ b/web/spec/features/getting_started_dialog_spec.rb @@ -5,7 +5,7 @@ describe "Home Screen", :js => true, :type => :feature, :capybara_feature => tru subject { page } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 10 end diff --git a/web/spec/features/home_page_spec.rb b/web/spec/features/home_page_spec.rb index a713777cd..65034cff4 100644 --- a/web/spec/features/home_page_spec.rb +++ b/web/spec/features/home_page_spec.rb @@ -5,7 +5,7 @@ describe "Home Page", :js => true, :type => :feature, :capybara_feature => true subject { page } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 10 end diff --git a/web/spec/features/jam_track_searching_spec.rb b/web/spec/features/jam_track_searching_spec.rb index 326271e8d..2bf1541d2 100644 --- a/web/spec/features/jam_track_searching_spec.rb +++ b/web/spec/features/jam_track_searching_spec.rb @@ -9,7 +9,7 @@ describe "JamTrack Search", :js => true, :type => :feature, :capybara_feature => let(:jt_blues) { FactoryBot.create(:jam_track, :name=>'live dog', genres: [JamRuby::Genre.find('blues')], make_track: true, original_artist: "food dog") } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 30 # these tests are SLOOOOOW end diff --git a/web/spec/features/jamtrack_landing_spec.rb b/web/spec/features/jamtrack_landing_spec.rb index 900160a43..c100f78ad 100644 --- a/web/spec/features/jamtrack_landing_spec.rb +++ b/web/spec/features/jamtrack_landing_spec.rb @@ -9,7 +9,7 @@ describe "JamTrack Landing", :js => true, :type => :feature, :capybara_feature = let(:jt_blues) { FactoryBot.create(:jam_track, :name=>'jt_blues', genres: [JamRuby::Genre.find('blues')], make_track: true, original_artist: "foodbart") } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 30 # these tests are SLOOOOOW end diff --git a/web/spec/features/jamtrack_shopping_spec.rb b/web/spec/features/jamtrack_shopping_spec.rb index 642912e0e..0423f4273 100644 --- a/web/spec/features/jamtrack_shopping_spec.rb +++ b/web/spec/features/jamtrack_shopping_spec.rb @@ -9,7 +9,7 @@ describe "JamTrack Shopping", :js => true, :type => :feature, :capybara_feature let(:jt_blues) { FactoryBot.create(:jam_track, :name=>'jt_blues', genres: [JamRuby::Genre.find('blues')], make_track: true, original_artist: "foodbart") } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 10 # these tests are SLOOOOOW end diff --git a/web/spec/features/oauth_spec.rb b/web/spec/features/oauth_spec.rb index 7e9e1482f..618d64274 100644 --- a/web/spec/features/oauth_spec.rb +++ b/web/spec/features/oauth_spec.rb @@ -6,7 +6,7 @@ describe "OAuth", :slow=>true, :js=>true, :type=>:feature, :capybara_feature=>tr subject { page } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 10 @previous_run_server = Capybara.run_server diff --git a/web/spec/features/recordings_spec.rb b/web/spec/features/recordings_spec.rb index b5be3fdb0..53246a0af 100644 --- a/web/spec/features/recordings_spec.rb +++ b/web/spec/features/recordings_spec.rb @@ -5,7 +5,7 @@ describe "Session Recordings", :js => true, :type => :feature, :capybara_feature subject { page } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 30 # these tests are SLOOOOOW end diff --git a/web/spec/features/twitter_auth_spec.rb b/web/spec/features/twitter_auth_spec.rb index 923b07bab..21546623e 100644 --- a/web/spec/features/twitter_auth_spec.rb +++ b/web/spec/features/twitter_auth_spec.rb @@ -5,7 +5,7 @@ describe "Welcome", :js => true, :type => :feature, :capybara_feature => true d subject { page } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 10 end diff --git a/web/spec/features/user_progression_spec.rb b/web/spec/features/user_progression_spec.rb index 27a5e2431..9c7495e68 100644 --- a/web/spec/features/user_progression_spec.rb +++ b/web/spec/features/user_progression_spec.rb @@ -7,7 +7,7 @@ describe "User Progression", :js => true, :type => :feature, :capybara_feature subject { page } before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 10 @old_recaptcha=Rails.application.config.recaptcha_enable diff --git a/web/spec/features/youtube_spec.rb b/web/spec/features/youtube_spec.rb index 89d7c4f11..54632cbad 100644 --- a/web/spec/features/youtube_spec.rb +++ b/web/spec/features/youtube_spec.rb @@ -8,7 +8,7 @@ describe "YouTube", :slow=>true, :js=>true, :type => :feature, :capybara_feature # Authenticate with a test google account. This should create # a UserAuthorization record, just as if a real user logged into google: before(:all) do - Capybara.javascript_driver = :poltergeist + Capybara.javascript_driver = :cuprite Capybara.current_driver = Capybara.javascript_driver Capybara.default_max_wait_time = 10 @previous_run_server = Capybara.run_server diff --git a/web/spec/requests/active_music_sessions_api_spec.rb b/web/spec/requests/active_music_sessions_api_spec.rb index 3b0a18f6d..457f83382 100755 --- a/web/spec/requests/active_music_sessions_api_spec.rb +++ b/web/spec/requests/active_music_sessions_api_spec.rb @@ -343,11 +343,10 @@ describe "Active Music Session API ", :type => :api do post '/api/sessions.json', defopts.to_json, "CONTENT_TYPE" => 'application/json' last_response.status.should eql(201) - # now fetch it's data - music_session = JSON.parse(last_response.body) - post "/api/sessions/#{music_session["id"]}/participants", defpart.merge({ :client_id => client.client_id, :tracks => [{"instrument_id" => "mom", "sound" => "mono", "client_track_id" => "client_track_guid"}] }).to_json, "CONTENT_TYPE" => 'application/json' - last_response.status.should eql(404) - + # now fetch it's data + music_session = JSON.parse(last_response.body) + post "/api/sessions/#{music_session["id"]}/participants.json", defpart.merge({ :client_id => client.client_id, :tracks => [{"instrument_id" => "mom", "sound" => "mono", "client_track_id" => "client_track_guid"}] }).to_json, "CONTENT_TYPE" => 'application/json' + last_response.status.should eql(404) # check that the transaction was rolled back ActiveMusicSession.all().length.should == original_count end diff --git a/web/spec/requests/sessions_controller_spec.rb b/web/spec/requests/sessions_controller_spec.rb index ff1d24344..203fc608d 100644 --- a/web/spec/requests/sessions_controller_spec.rb +++ b/web/spec/requests/sessions_controller_spec.rb @@ -90,7 +90,7 @@ describe SessionsController, type: :api do user = User.find_by_email('test_oauth@example.com') user.should_not be_nil user.first_name.should == "FirstName" - response.should be_success + response.should be_successful # also verify that a second visit does *not* create another new user lambda do diff --git a/web/spec/spec_helper.rb b/web/spec/spec_helper.rb index 49fe14bbd..3ca0a22d8 100644 --- a/web/spec/spec_helper.rb +++ b/web/spec/spec_helper.rb @@ -117,13 +117,17 @@ ActiveRecord::Base.establish_connection(YAML::load(File.open('config/database.ym # need to restart spork for it take effect. # This file is copied to spec/ when you run 'rails generate rspec:install' bputs "before load environment" -begin - require File.expand_path("../../config/environment", __FILE__) -rescue => e - bputs "exception in load environment" - bputs "e: #{e}" -end - + begin + require File.expand_path("../../config/environment", __FILE__) + Dir[File.expand_path("../../app/helpers/*.rb", __FILE__)].each do |file| + require file + end + require File.expand_path("../../app/controllers/application_controller", __FILE__) + rescue => e + puts "exception in load environment" + puts "e: #{e}" + puts e.backtrace + end bputs "before loading rails" require 'rspec/rails' # require 'rspec/autorun' @@ -135,15 +139,20 @@ bputs "before load capybara" require 'webdrivers' require 'capybara/rspec' require 'capybara-screenshot/rspec' + require 'capybara/cuprite' # require 'capybara/poltergeist' bputs "before register capybara" Capybara::Screenshot::RSpec.add_link_to_screenshot_for_failed_examples = true Capybara::Screenshot.prune_strategy = :keep_last_run -# Capybara.register_driver :poltergeist do |app| + Capybara.register_driver :cuprite do |app| + Capybara::Cuprite::Driver.new(app, window_size: [1200, 800]) + end + Capybara.javascript_driver = :cuprite +# Capybara.register_driver :cuprite do |app| # # '--load-images=no' # driver = Capybara::Poltergeist::Driver.new(app, { debug: false, phantomjs_logger: File.open('log/phantomjs.out', 'w'), phantomjs_options: ['--ignore-ssl-errors=yes'] }) # end -# Capybara.javascript_driver = :poltergeist +# Capybara.javascript_driver = :cuprite Capybara.default_max_wait_time = 10 Capybara.default_driver = :selenium Capybara.server = :puma @@ -153,10 +162,10 @@ Capybara.server = :puma #end # if defined?(TEST_CONNECT_STATES) && TEST_CONNECT_STATES # TEST_CONNECT_STATE_JS_CONSOLE_IO = File.open(TEST_CONNECT_STATE_JS_CONSOLE, 'w') -# Capybara.register_driver :poltergeist do |app| +# Capybara.register_driver :cuprite do |app| # Capybara::Poltergeist::Driver.new(app, { phantomjs_logger: TEST_CONNECT_STATE_JS_CONSOLE_IO }) # end - #Capybara.javascript_driver = :poltergeist + #Capybara.javascript_driver = :cuprite # end Capybara.configure do |config| config.match = :one @@ -173,15 +182,17 @@ Capybara.server = :puma Capybara::Selenium::Driver.new(app, :profile => profile) end - # Requires supporting ruby files with custom matchers and macros, etc, - # in spec/support/ and its subdirectories. - Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} - require Rails.root.join("spec/factories.rb") - puts "DEBUG: Loaded factories: #{FactoryBot.factories.map(&:name)}" - - #ActiveRecord::Base.logger = Logger.new(STDOUT) if defined?(ActiveRecord::Base) - - RSpec.configure do |config| + # Requires supporting ruby files with custom matchers and macros, etc, + # in spec/support/ and its subdirectories. + Dir[Rails.root.join("spec/support/**/*.rb")].each {|f| require f} + + #ActiveRecord::Base.logger = Logger.new(STDOUT) if defined?(ActiveRecord::Base) +RSpec.configure do |config| + include JamRuby + config.render_views + config.include RSpec::Rails::RequestExampleGroup, type: :request, file_path: /spec\/api/ + config.include RSpec::Rails::ControllerExampleGroup, type: :controller + config.include Capybara::DSL # ## Mock Framework # @@ -237,11 +248,9 @@ Capybara.server = :puma end config.before(:each) do |example| - #if example.metadata[:js] && (Capybara.current_driver.nil? || Capybara.current_driver.empty? || Capybara.current_driver==:selenium) - # page.driver.resize(1920, 1080) - # page.driver.headers = { 'User-Agent' => 'Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0' } - #end - + allow(Stripe::Token).to receive(:create).and_return(double(:id => 'tok_123')) + allow(Stripe::Customer).to receive(:create).and_return(double(:id => 'cus_123', :email => 'test@example.com')) + allow(Stripe::Customer).to receive(:retrieve).and_return(double(:id => 'cus_123', :email => 'test@example.com', :save => true)) end config.before(:each, :js => true) do diff --git a/web/spec/support/utilities.rb b/web/spec/support/utilities.rb index e03cadb35..eb0f8e941 100644 --- a/web/spec/support/utilities.rb +++ b/web/spec/support/utilities.rb @@ -124,7 +124,7 @@ end def set_cookie(k, v) case Capybara.current_session.driver - when Capybara::Poltergeist::Driver + when Capybara::Cuprite::Driver page.driver.set_cookie(k,v) when Capybara::RackTest::Driver headers = {}