panda_pal 5.4.0 → 5.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/models/panda_pal/organization.rb +4 -0
- data/app/models/panda_pal/organization_concerns/task_scheduling.rb +12 -6
- data/config/initializers/apartment.rb +1 -1
- data/lib/panda_pal/helpers/session_replacement.rb +5 -2
- data/lib/panda_pal/version.rb +1 -1
- data/lib/panda_pal.rb +1 -1
- data/panda_pal.gemspec +0 -1
- metadata +34 -59
- data/app/lib/panda_pal/batch_processor.rb +0 -41
- data/spec/dummy/log/development.log +0 -56
- data/spec/dummy/log/test.log +0 -83348
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 3ec5567515a06e761a0cb06597380d4a10a9454f58f903466f5871757323dc7c
         | 
| 4 | 
            +
              data.tar.gz: 418a9fe6dc99d53b6775b65c425db8c8c02aadf0adb2d92673934094bc26f3d7
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 067dbe50e329437ada560115134fe992b3522e4bf971e73c9a22a375dd3803e5aa4897b1cf4af66fc1e31d8f905233d601a910cadaca740cd0a21a8c5d495831
         | 
| 7 | 
            +
              data.tar.gz: 1d5ffae5cd2f7a884799a23ae73e5d3935d2f64ff1397dc506a364c34de916e317f1098de64549f5e1c15fd033090a31646f171e3b779dcb45006a7251741460
         | 
| @@ -160,7 +160,7 @@ module PandaPal | |
| 160 160 | 
             
                  private
         | 
| 161 161 |  | 
| 162 162 | 
             
                  def unschedule_tasks(new_task_keys = nil)
         | 
| 163 | 
            -
                    current_schedules = Sidekiq.get_schedule.select { |k,v| k. | 
| 163 | 
            +
                    current_schedules = Sidekiq.get_schedule.select { |k,v| k.start_with?("org:#{name}-") }
         | 
| 164 164 | 
             
                    del_tasks = current_schedules.keys
         | 
| 165 165 | 
             
                    del_tasks -= new_task_keys if new_task_keys
         | 
| 166 166 | 
             
                    del_tasks.each do |k|
         | 
| @@ -198,13 +198,19 @@ module PandaPal | |
| 198 198 |  | 
| 199 199 | 
             
                      Apartment::Tenant.switch(org.name) do
         | 
| 200 200 | 
             
                        if worker.is_a?(Proc)
         | 
| 201 | 
            -
                          org.instance_exec(&worker)
         | 
| 201 | 
            +
                          return org.instance_exec(&worker)
         | 
| 202 202 | 
             
                        elsif worker.is_a?(Symbol)
         | 
| 203 | 
            -
                          org.send(worker)
         | 
| 203 | 
            +
                          return org.send(worker)
         | 
| 204 204 | 
             
                        elsif worker.is_a?(String)
         | 
| 205 | 
            -
                          worker.constantize | 
| 206 | 
            -
                         | 
| 207 | 
            -
             | 
| 205 | 
            +
                          worker = worker.constantize
         | 
| 206 | 
            +
                        end
         | 
| 207 | 
            +
             | 
| 208 | 
            +
                        if worker.is_a?(Class)
         | 
| 209 | 
            +
                          if worker.respond_to?(:perform_async)
         | 
| 210 | 
            +
                            worker.perform_async
         | 
| 211 | 
            +
                          else
         | 
| 212 | 
            +
                            worker.perform_later
         | 
| 213 | 
            +
                          end
         | 
| 208 214 | 
             
                        end
         | 
| 209 215 | 
             
                      end
         | 
| 210 216 | 
             
                    end
         | 
| @@ -12,7 +12,7 @@ end | |
| 12 12 | 
             
            Rails.application.config.middleware.use Apartment::Elevators::Generic, lambda { |request|
         | 
| 13 13 | 
             
              if match = request.path.match(/\/(?:orgs?|organizations?)\/(\d+)/)
         | 
| 14 14 | 
             
                PandaPal::Organization.find_by(id: match[1]).try(:name)
         | 
| 15 | 
            -
              elsif request.path. | 
| 15 | 
            +
              elsif request.path.start_with?('/rails/active_storage/blobs/')
         | 
| 16 16 | 
             
                PandaPal::Organization.find_by(id: request.params['organization_id']).try(:name)
         | 
| 17 17 | 
             
              end
         | 
| 18 18 | 
             
            }
         | 
| @@ -5,8 +5,11 @@ module PandaPal::Helpers | |
| 5 5 | 
             
                extend ActiveSupport::Concern
         | 
| 6 6 |  | 
| 7 7 | 
             
                included do
         | 
| 8 | 
            -
                   | 
| 9 | 
            -
                   | 
| 8 | 
            +
                  # ActionController::API does not use views, so helper_method would not be defined
         | 
| 9 | 
            +
                  unless name == "ActionController::API"
         | 
| 10 | 
            +
                    helper_method :link_nonce, :current_session, :current_session_data
         | 
| 11 | 
            +
                    helper_method :link_with_session_to, :url_with_session, :session_url_for
         | 
| 12 | 
            +
                  end
         | 
| 10 13 |  | 
| 11 14 | 
             
                  prepend_around_action :monkeypatch_flash
         | 
| 12 15 | 
             
                  prepend_around_action :auto_save_session
         | 
    
        data/lib/panda_pal/version.rb
    CHANGED
    
    
    
        data/lib/panda_pal.rb
    CHANGED
    
    | @@ -91,7 +91,7 @@ module PandaPal | |
| 91 91 |  | 
| 92 92 | 
             
              def self.normalize_ext_type(type)
         | 
| 93 93 | 
             
                type = type.to_s
         | 
| 94 | 
            -
                type = "#{self.to_s}::#{type}" unless type. | 
| 94 | 
            +
                type = "#{self.to_s}::#{type}" unless type.start_with?('::') || type.start_with?(self.to_s)
         | 
| 95 95 | 
             
                type
         | 
| 96 96 | 
             
              end
         | 
| 97 97 |  | 
    
        data/panda_pal.gemspec
    CHANGED
    
    | @@ -17,7 +17,6 @@ Gem::Specification.new do |s| | |
| 17 17 |  | 
| 18 18 | 
             
              s.add_dependency "rails", ">= 4.2"
         | 
| 19 19 | 
             
              s.add_dependency 'ros-apartment', '~> 2.2'
         | 
| 20 | 
            -
              s.add_dependency 'pg', '>= 0.20', '< 1.0.0'
         | 
| 21 20 | 
             
              s.add_dependency 'ims-lti', '~> 1.2.4'
         | 
| 22 21 | 
             
              s.add_dependency 'browser', '2.5.0'
         | 
| 23 22 | 
             
              s.add_dependency 'attr_encrypted', '~> 3.0.0'
         | 
    
        metadata
    CHANGED
    
    | @@ -1,14 +1,14 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: panda_pal
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 5.4. | 
| 4 | 
            +
              version: 5.4.4
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Instructure ProServe
         | 
| 8 8 | 
             
            autorequire: 
         | 
| 9 9 | 
             
            bindir: bin
         | 
| 10 10 | 
             
            cert_chain: []
         | 
| 11 | 
            -
            date: 2021- | 
| 11 | 
            +
            date: 2021-10-20 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies:
         | 
| 13 13 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 14 14 | 
             
              name: rails
         | 
| @@ -38,26 +38,6 @@ dependencies: | |
| 38 38 | 
             
                - - "~>"
         | 
| 39 39 | 
             
                  - !ruby/object:Gem::Version
         | 
| 40 40 | 
             
                    version: '2.2'
         | 
| 41 | 
            -
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            -
              name: pg
         | 
| 43 | 
            -
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            -
                requirements:
         | 
| 45 | 
            -
                - - ">="
         | 
| 46 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            -
                    version: '0.20'
         | 
| 48 | 
            -
                - - "<"
         | 
| 49 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 50 | 
            -
                    version: 1.0.0
         | 
| 51 | 
            -
              type: :runtime
         | 
| 52 | 
            -
              prerelease: false
         | 
| 53 | 
            -
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 54 | 
            -
                requirements:
         | 
| 55 | 
            -
                - - ">="
         | 
| 56 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 57 | 
            -
                    version: '0.20'
         | 
| 58 | 
            -
                - - "<"
         | 
| 59 | 
            -
                  - !ruby/object:Gem::Version
         | 
| 60 | 
            -
                    version: 1.0.0
         | 
| 61 41 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 62 42 | 
             
              name: ims-lti
         | 
| 63 43 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -222,7 +202,6 @@ files: | |
| 222 202 | 
             
            - app/lib/lti_xml/base_platform.rb
         | 
| 223 203 | 
             
            - app/lib/lti_xml/bridge_platform.rb
         | 
| 224 204 | 
             
            - app/lib/lti_xml/canvas_platform.rb
         | 
| 225 | 
            -
            - app/lib/panda_pal/batch_processor.rb
         | 
| 226 205 | 
             
            - app/lib/panda_pal/launch_url_helpers.rb
         | 
| 227 206 | 
             
            - app/lib/panda_pal/lti_jwt_validator.rb
         | 
| 228 207 | 
             
            - app/lib/panda_pal/misc_helper.rb
         | 
| @@ -286,8 +265,6 @@ files: | |
| 286 265 | 
             
            - spec/dummy/config/routes.rb
         | 
| 287 266 | 
             
            - spec/dummy/config/secrets.yml
         | 
| 288 267 | 
             
            - spec/dummy/db/schema.rb
         | 
| 289 | 
            -
            - spec/dummy/log/development.log
         | 
| 290 | 
            -
            - spec/dummy/log/test.log
         | 
| 291 268 | 
             
            - spec/dummy/public/404.html
         | 
| 292 269 | 
             
            - spec/dummy/public/422.html
         | 
| 293 270 | 
             
            - spec/dummy/public/500.html
         | 
| @@ -324,47 +301,45 @@ signing_key: | |
| 324 301 | 
             
            specification_version: 4
         | 
| 325 302 | 
             
            summary: LTI mountable engine
         | 
| 326 303 | 
             
            test_files:
         | 
| 304 | 
            +
            - spec/rails_helper.rb
         | 
| 305 | 
            +
            - spec/models/panda_pal/organization_spec.rb
         | 
| 306 | 
            +
            - spec/models/panda_pal/session_spec.rb
         | 
| 307 | 
            +
            - spec/models/panda_pal/organization/settings_validation_spec.rb
         | 
| 308 | 
            +
            - spec/models/panda_pal/organization/task_scheduling_spec.rb
         | 
| 327 309 | 
             
            - spec/spec_helper.rb
         | 
| 328 | 
            -
            - spec/dummy/ | 
| 310 | 
            +
            - spec/dummy/db/schema.rb
         | 
| 311 | 
            +
            - spec/dummy/public/422.html
         | 
| 312 | 
            +
            - spec/dummy/public/favicon.ico
         | 
| 313 | 
            +
            - spec/dummy/public/404.html
         | 
| 314 | 
            +
            - spec/dummy/public/500.html
         | 
| 315 | 
            +
            - spec/dummy/Rakefile
         | 
| 329 316 | 
             
            - spec/dummy/app/views/layouts/application.html.erb
         | 
| 330 | 
            -
            - spec/dummy/app/ | 
| 331 | 
            -
            - spec/dummy/app/assets/stylesheets/application.css
         | 
| 317 | 
            +
            - spec/dummy/app/controllers/application_controller.rb
         | 
| 332 318 | 
             
            - spec/dummy/app/helpers/application_helper.rb
         | 
| 333 | 
            -
            - spec/dummy/ | 
| 334 | 
            -
            - spec/dummy/ | 
| 335 | 
            -
            - spec/dummy/bin/bundle
         | 
| 336 | 
            -
            - spec/dummy/bin/rails
         | 
| 319 | 
            +
            - spec/dummy/app/assets/stylesheets/application.css
         | 
| 320 | 
            +
            - spec/dummy/app/assets/javascripts/application.js
         | 
| 337 321 | 
             
            - spec/dummy/config/secrets.yml
         | 
| 338 | 
            -
            - spec/dummy/config/routes.rb
         | 
| 339 | 
            -
            - spec/dummy/config/locales/en.yml
         | 
| 340 | 
            -
            - spec/dummy/config/environments/production.rb
         | 
| 341 | 
            -
            - spec/dummy/config/environments/development.rb
         | 
| 342 | 
            -
            - spec/dummy/config/environments/test.rb
         | 
| 343 | 
            -
            - spec/dummy/config/environment.rb
         | 
| 344 322 | 
             
            - spec/dummy/config/application.rb
         | 
| 345 | 
            -
            - spec/dummy/config/database.yml
         | 
| 346 | 
            -
            - spec/dummy/config/boot.rb
         | 
| 347 | 
            -
            - spec/dummy/config/initializers/backtrace_silencers.rb
         | 
| 348 | 
            -
            - spec/dummy/config/initializers/mime_types.rb
         | 
| 349 | 
            -
            - spec/dummy/config/initializers/filter_parameter_logging.rb
         | 
| 350 323 | 
             
            - spec/dummy/config/initializers/session_store.rb
         | 
| 351 324 | 
             
            - spec/dummy/config/initializers/wrap_parameters.rb
         | 
| 352 | 
            -
            - spec/dummy/config/initializers/cookies_serializer.rb
         | 
| 353 325 | 
             
            - spec/dummy/config/initializers/inflections.rb
         | 
| 354 | 
            -
            - spec/dummy/config. | 
| 355 | 
            -
            - spec/dummy/ | 
| 356 | 
            -
            - spec/dummy/ | 
| 357 | 
            -
            - spec/dummy/ | 
| 358 | 
            -
            - spec/dummy/ | 
| 359 | 
            -
            - spec/dummy/ | 
| 360 | 
            -
            - spec/dummy/ | 
| 361 | 
            -
            - spec/dummy/ | 
| 362 | 
            -
            - spec/dummy/ | 
| 326 | 
            +
            - spec/dummy/config/initializers/filter_parameter_logging.rb
         | 
| 327 | 
            +
            - spec/dummy/config/initializers/mime_types.rb
         | 
| 328 | 
            +
            - spec/dummy/config/initializers/backtrace_silencers.rb
         | 
| 329 | 
            +
            - spec/dummy/config/initializers/cookies_serializer.rb
         | 
| 330 | 
            +
            - spec/dummy/config/environments/development.rb
         | 
| 331 | 
            +
            - spec/dummy/config/environments/test.rb
         | 
| 332 | 
            +
            - spec/dummy/config/environments/production.rb
         | 
| 333 | 
            +
            - spec/dummy/config/database.yml
         | 
| 334 | 
            +
            - spec/dummy/config/boot.rb
         | 
| 335 | 
            +
            - spec/dummy/config/routes.rb
         | 
| 336 | 
            +
            - spec/dummy/config/environment.rb
         | 
| 337 | 
            +
            - spec/dummy/config/locales/en.yml
         | 
| 363 338 | 
             
            - spec/dummy/README.rdoc
         | 
| 364 | 
            -
            - spec/ | 
| 365 | 
            -
            - spec/ | 
| 366 | 
            -
            - spec/ | 
| 367 | 
            -
            - spec/ | 
| 368 | 
            -
            - spec/ | 
| 339 | 
            +
            - spec/dummy/config.ru
         | 
| 340 | 
            +
            - spec/dummy/bin/bundle
         | 
| 341 | 
            +
            - spec/dummy/bin/rake
         | 
| 342 | 
            +
            - spec/dummy/bin/setup
         | 
| 343 | 
            +
            - spec/dummy/bin/rails
         | 
| 369 344 | 
             
            - spec/factories/panda_pal_organizations.rb
         | 
| 370 | 
            -
            - spec/ | 
| 345 | 
            +
            - spec/factories/panda_pal_sessions.rb
         | 
| @@ -1,41 +0,0 @@ | |
| 1 | 
            -
            module PandaPal
         | 
| 2 | 
            -
              # An array that "processes" after so many items are added.
         | 
| 3 | 
            -
              #
         | 
| 4 | 
            -
              # Example Usage:
         | 
| 5 | 
            -
              #   batches = BatchProcessor.new(of: 1000) do |batch|
         | 
| 6 | 
            -
              #     # Process the batch somehow
         | 
| 7 | 
            -
              #   end
         | 
| 8 | 
            -
              #   enumerator_of_some_kind.each { |item| batches << item }
         | 
| 9 | 
            -
              #   batches.flush
         | 
| 10 | 
            -
              class BatchProcessor
         | 
| 11 | 
            -
                attr_reader :batch_size
         | 
| 12 | 
            -
             | 
| 13 | 
            -
                def initialize(of: 1000, &blk)
         | 
| 14 | 
            -
                  @batch_size = of
         | 
| 15 | 
            -
                  @block = blk
         | 
| 16 | 
            -
                  @current_batch = []
         | 
| 17 | 
            -
                end
         | 
| 18 | 
            -
             | 
| 19 | 
            -
                def <<(item)
         | 
| 20 | 
            -
                  @current_batch << item
         | 
| 21 | 
            -
                  process_batch if @current_batch.count >= batch_size
         | 
| 22 | 
            -
                end
         | 
| 23 | 
            -
             | 
| 24 | 
            -
                def add_all(items)
         | 
| 25 | 
            -
                  items.each do |i|
         | 
| 26 | 
            -
                    self << i
         | 
| 27 | 
            -
                  end
         | 
| 28 | 
            -
                end
         | 
| 29 | 
            -
             | 
| 30 | 
            -
                def flush
         | 
| 31 | 
            -
                  process_batch if @current_batch.present?
         | 
| 32 | 
            -
                end
         | 
| 33 | 
            -
             | 
| 34 | 
            -
                protected
         | 
| 35 | 
            -
             | 
| 36 | 
            -
                def process_batch
         | 
| 37 | 
            -
                  @block.call(@current_batch)
         | 
| 38 | 
            -
                  @current_batch = []
         | 
| 39 | 
            -
                end
         | 
| 40 | 
            -
              end
         | 
| 41 | 
            -
            end
         | 
| @@ -1,56 +0,0 @@ | |
| 1 | 
            -
              [1m[35m (1.2ms)[0m  [1m[35mDROP DATABASE IF EXISTS "panda_pal_development"[0m
         | 
| 2 | 
            -
              [1m[35m (0.2ms)[0m  [1m[35mDROP DATABASE IF EXISTS "panda_pal_test"[0m
         | 
| 3 | 
            -
              [1m[35m (82.9ms)[0m  [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
         | 
| 4 | 
            -
              [1m[35m (11.8ms)[0m  [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
         | 
| 5 | 
            -
              [1m[35m (0.3ms)[0m  [1m[34mSELECT pg_try_advisory_lock(7878782013693407355);[0m
         | 
| 6 | 
            -
              [1m[35m (2.8ms)[0m  [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
         | 
| 7 | 
            -
              [1m[36mActiveRecord::InternalMetadata Load (2.2ms)[0m  [1m[34mSELECT  "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m  [["key", "environment"], ["LIMIT", 1]]
         | 
| 8 | 
            -
              [1m[35m (0.2ms)[0m  [1m[35mBEGIN[0m
         | 
| 9 | 
            -
              [1m[35mSQL (3.2ms)[0m  [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m  [["key", "environment"], ["value", "development"], ["created_at", "2020-04-30 16:44:35.134620"], ["updated_at", "2020-04-30 16:44:35.134620"]]
         | 
| 10 | 
            -
              [1m[35m (0.6ms)[0m  [1m[35mCOMMIT[0m
         | 
| 11 | 
            -
              [1m[35m (0.3ms)[0m  [1m[34mSELECT pg_advisory_unlock(7878782013693407355)[0m
         | 
| 12 | 
            -
              [1m[35m (0.2ms)[0m  [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
         | 
| 13 | 
            -
              [1m[35m (0.5ms)[0m  [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
         | 
| 14 | 
            -
              [1m[35m (0.1ms)[0m  [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
         | 
| 15 | 
            -
              [1m[35m (211.6ms)[0m  [1m[35mDROP DATABASE IF EXISTS "panda_pal_development"[0m
         | 
| 16 | 
            -
              [1m[35m (247.6ms)[0m  [1m[35mDROP DATABASE IF EXISTS "panda_pal_test"[0m
         | 
| 17 | 
            -
              [1m[35mSQL (0.4ms)[0m  [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
         | 
| 18 | 
            -
              [1m[35m (8.5ms)[0m  [1m[35mDROP TABLE IF EXISTS "panda_pal_organizations" CASCADE[0m
         | 
| 19 | 
            -
              [1m[35m (14.4ms)[0m  [1m[35mCREATE TABLE "panda_pal_organizations" ("id" bigserial primary key, "name" character varying, "key" character varying, "secret" character varying, "canvas_account_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "salesforce_id" character varying, "encrypted_settings" text, "encrypted_settings_iv" character varying)[0m
         | 
| 20 | 
            -
              [1m[35m (2.5ms)[0m  [1m[35mCREATE UNIQUE INDEX  "index_panda_pal_organizations_on_key" ON "panda_pal_organizations"  ("key")[0m
         | 
| 21 | 
            -
              [1m[35m (2.6ms)[0m  [1m[35mCREATE UNIQUE INDEX  "index_panda_pal_organizations_on_name" ON "panda_pal_organizations"  ("name")[0m
         | 
| 22 | 
            -
              [1m[35m (0.2ms)[0m  [1m[35mDROP TABLE IF EXISTS "panda_pal_sessions" CASCADE[0m
         | 
| 23 | 
            -
              [1m[35m (6.5ms)[0m  [1m[35mCREATE TABLE "panda_pal_sessions" ("id" bigserial primary key, "session_key" character varying, "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "panda_pal_organization_id" integer)[0m
         | 
| 24 | 
            -
              [1m[35m (1.9ms)[0m  [1m[35mCREATE  INDEX  "index_panda_pal_sessions_on_panda_pal_organization_id" ON "panda_pal_sessions"  ("panda_pal_organization_id")[0m
         | 
| 25 | 
            -
              [1m[35m (2.5ms)[0m  [1m[35mCREATE UNIQUE INDEX  "index_panda_pal_sessions_on_session_key" ON "panda_pal_sessions"  ("session_key")[0m
         | 
| 26 | 
            -
              [1m[35m (3.5ms)[0m  [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
         | 
| 27 | 
            -
              [1m[35m (1.4ms)[0m  [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
         | 
| 28 | 
            -
              [1m[35m (0.6ms)[0m  [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20171205194657)[0m
         | 
| 29 | 
            -
              [1m[35m (47.2ms)[0m  [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
         | 
| 30 | 
            -
              [1m[36mActiveRecord::InternalMetadata Load (1.0ms)[0m  [1m[34mSELECT  "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m  [["key", "environment"], ["LIMIT", 1]]
         | 
| 31 | 
            -
              [1m[35m (0.4ms)[0m  [1m[35mBEGIN[0m
         | 
| 32 | 
            -
              [1m[35mSQL (0.4ms)[0m  [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m  [["key", "environment"], ["value", "development"], ["created_at", "2020-04-30 17:00:14.956327"], ["updated_at", "2020-04-30 17:00:14.956327"]]
         | 
| 33 | 
            -
              [1m[35m (0.5ms)[0m  [1m[35mCOMMIT[0m
         | 
| 34 | 
            -
              [1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m  [1m[34mSELECT  "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m  [["key", "environment"], ["LIMIT", 1]]
         | 
| 35 | 
            -
              [1m[35m (0.1ms)[0m  [1m[35mBEGIN[0m
         | 
| 36 | 
            -
              [1m[35m (0.2ms)[0m  [1m[35mCOMMIT[0m
         | 
| 37 | 
            -
              [1m[35mSQL (0.4ms)[0m  [1m[35mCREATE EXTENSION IF NOT EXISTS "plpgsql"[0m
         | 
| 38 | 
            -
              [1m[35m (0.3ms)[0m  [1m[35mDROP TABLE IF EXISTS "panda_pal_organizations" CASCADE[0m
         | 
| 39 | 
            -
              [1m[35m (52.5ms)[0m  [1m[35mCREATE TABLE "panda_pal_organizations" ("id" bigserial primary key, "name" character varying, "key" character varying, "secret" character varying, "canvas_account_id" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "salesforce_id" character varying, "encrypted_settings" text, "encrypted_settings_iv" character varying)[0m
         | 
| 40 | 
            -
              [1m[35m (2.4ms)[0m  [1m[35mCREATE UNIQUE INDEX  "index_panda_pal_organizations_on_key" ON "panda_pal_organizations"  ("key")[0m
         | 
| 41 | 
            -
              [1m[35m (1.9ms)[0m  [1m[35mCREATE UNIQUE INDEX  "index_panda_pal_organizations_on_name" ON "panda_pal_organizations"  ("name")[0m
         | 
| 42 | 
            -
              [1m[35m (0.2ms)[0m  [1m[35mDROP TABLE IF EXISTS "panda_pal_sessions" CASCADE[0m
         | 
| 43 | 
            -
              [1m[35m (6.0ms)[0m  [1m[35mCREATE TABLE "panda_pal_sessions" ("id" bigserial primary key, "session_key" character varying, "data" text, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL, "panda_pal_organization_id" integer)[0m
         | 
| 44 | 
            -
              [1m[35m (1.8ms)[0m  [1m[35mCREATE  INDEX  "index_panda_pal_sessions_on_panda_pal_organization_id" ON "panda_pal_sessions"  ("panda_pal_organization_id")[0m
         | 
| 45 | 
            -
              [1m[35m (1.8ms)[0m  [1m[35mCREATE UNIQUE INDEX  "index_panda_pal_sessions_on_session_key" ON "panda_pal_sessions"  ("session_key")[0m
         | 
| 46 | 
            -
              [1m[35m (4.8ms)[0m  [1m[35mCREATE TABLE "schema_migrations" ("version" character varying NOT NULL PRIMARY KEY)[0m
         | 
| 47 | 
            -
              [1m[35m (0.9ms)[0m  [1m[34mSELECT "schema_migrations"."version" FROM "schema_migrations" ORDER BY "schema_migrations"."version" ASC[0m
         | 
| 48 | 
            -
              [1m[35m (4.0ms)[0m  [1m[32mINSERT INTO "schema_migrations" (version) VALUES (20171205194657)[0m
         | 
| 49 | 
            -
              [1m[35m (6.5ms)[0m  [1m[35mCREATE TABLE "ar_internal_metadata" ("key" character varying NOT NULL PRIMARY KEY, "value" character varying, "created_at" timestamp NOT NULL, "updated_at" timestamp NOT NULL)[0m
         | 
| 50 | 
            -
              [1m[36mActiveRecord::InternalMetadata Load (2.5ms)[0m  [1m[34mSELECT  "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m  [["key", "environment"], ["LIMIT", 1]]
         | 
| 51 | 
            -
              [1m[35m (0.1ms)[0m  [1m[35mBEGIN[0m
         | 
| 52 | 
            -
              [1m[35mSQL (5.0ms)[0m  [1m[32mINSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES ($1, $2, $3, $4) RETURNING "key"[0m  [["key", "environment"], ["value", "development"], ["created_at", "2020-04-30 17:00:15.126316"], ["updated_at", "2020-04-30 17:00:15.126316"]]
         | 
| 53 | 
            -
              [1m[35m (0.4ms)[0m  [1m[35mCOMMIT[0m
         | 
| 54 | 
            -
              [1m[36mActiveRecord::InternalMetadata Load (0.2ms)[0m  [1m[34mSELECT  "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = $1 LIMIT $2[0m  [["key", "environment"], ["LIMIT", 1]]
         | 
| 55 | 
            -
              [1m[35m (0.2ms)[0m  [1m[35mBEGIN[0m
         | 
| 56 | 
            -
              [1m[35m (0.1ms)[0m  [1m[35mCOMMIT[0m
         |