panda_pal 5.8.0 → 5.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35907d0726df7ab474a251eedff8ff28a5d96fbf4996566454c777e20443d90d
4
- data.tar.gz: 4f883c646c445d4a0a8ad918c669308c17a2a8392818e4645a5d9efdce5ee0e2
3
+ metadata.gz: 732dbb8785b96326d0d10cd6e602cbecaffe5cb4c6ee8b1b6ce7722cb5611ea5
4
+ data.tar.gz: 8ed7ae8382b0a7cd6534f5bc75bf403d9666b7fdce00d6b6f80c79bc68c2721f
5
5
  SHA512:
6
- metadata.gz: 4f259a0c7c5928892748bd08f88b259adc5e7bb41f90f7f71e90a6c7c5e37e7a243ad426d34a4ad6b59857891e2430a7f7860cbd15938f11eaae0f74f6571247
7
- data.tar.gz: 10a665a5f0d00604f623a863255435c4f85b850de0e175dc1ef29417a83a0263c41d3ff6a7016bda9e74b2abe558da18ebb9ee87b21503aeb8920fada15c1b91
6
+ metadata.gz: 9f55395d5b346c6f9a5c9d6f31716ed3b9ab2aa616cb46ff7e31b5b184703d8d087ce4b47b536d736a5e22e0da0d5ccf14bbc3e0d4cead243487ddb303a24d24
7
+ data.tar.gz: bd19857f79323ab6fa4f50c79e66bddf436a54344e02dab3794a95ee8cc2d54d0566ce764ddd42c88c838702279d4b4907a122a552ebf5f75f04e5438410d54f
data/README.md CHANGED
@@ -27,7 +27,7 @@ As of version 5.5.0, LTIs can be installed into Canvas via the console:
27
27
  org.install_lti(
28
28
  host: "https://your_lti.herokuapp.com",
29
29
  context: "account/self", # (Optional) Or "account/3", "course/1", etc
30
- exists: :error, # (Optional) Action to take if an LTI with the same Key already exists. Options are :error, :replace, :duplicate
30
+ exists: :error, # (Optional) Action to take if an LTI with the same Key already exists. Options are :error, :replace, :duplicate, :update
31
31
  version: "v1p3", # (Optional, default `v1p3`) LTI Version. Accepts `v1p0` or `v1p3`.
32
32
  dedicated_deployment: false, # (Optional) If true, the Organization will be updated to link to a single deployment rather then to the general LTI Key. (experimental, LTI 1.3 only)
33
33
  )
@@ -3,6 +3,8 @@ require 'ims/lti'
3
3
  require 'attr_encrypted'
4
4
  require 'secure_headers'
5
5
 
6
+ require_relative './helpers/console_helpers'
7
+
6
8
  module PandaPal
7
9
  class Engine < ::Rails::Engine
8
10
  config.autoload_once_paths += Dir["#{config.root}/lib/**/"]
@@ -39,16 +41,11 @@ module PandaPal
39
41
 
40
42
  initializer 'Sidekiq Scheduler Hooks' do
41
43
  ActiveSupport.on_load(:active_record) do
42
- if defined?(Sidekiq) && Sidekiq.server? # && PandaPal::Organization.respond_to?(:sync_schedules)
44
+ if defined?(Sidekiq) && Sidekiq.server?
43
45
 
44
46
  Rails.application.reloader.to_prepare do
45
47
  PandaPal::Organization.sync_schedules if PandaPal::Organization.respond_to?(:sync_schedules)
46
48
  end
47
- # PandaPal::Organization.sync_schedules
48
-
49
- # ActiveSupport::Reloader.to_prepare do
50
- # PandaPal::Organization.sync_schedules
51
- # end
52
49
  end
53
50
  end
54
51
  end
@@ -90,22 +87,22 @@ module PandaPal
90
87
  env = ENV["SENTRY_CURRENT_ENV"].presence || "PROD"
91
88
 
92
89
  if env.downcase.include?("prod")
93
- Pry::Helpers::Text.red(env)
90
+ PandaPal::ConsoleHelpers.red(env)
94
91
  else
95
- Pry::Helpers::Text.cyan(env)
92
+ PandaPal::ConsoleHelpers.cyan(env)
96
93
  end
97
94
  elsif Rails.env.development?
98
- Pry::Helpers::Text.cyan("dev")
95
+ PandaPal::ConsoleHelpers.cyan("dev")
99
96
  elsif Rails.env.test?
100
- Pry::Helpers::Text.cyan("test")
97
+ PandaPal::ConsoleHelpers.cyan("test")
101
98
  end
102
99
  end
103
100
 
104
101
  def _panda_pal_console_prefix
105
102
  pfx = [
106
- Pry::Helpers::Text.cyan(_panda_pal_short_console_app_name),
103
+ PandaPal::ConsoleHelpers.cyan(_panda_pal_short_console_app_name),
107
104
  _panda_pal_console_env,
108
- Pry::Helpers::Text.cyan(Apartment::Tenant.current),
105
+ PandaPal::ConsoleHelpers.cyan(Apartment::Tenant.current),
109
106
  ].compact.join('-')
110
107
  pfx
111
108
  end
@@ -0,0 +1,27 @@
1
+ module PandaPal
2
+ module ConsoleHelpers
3
+ extend self
4
+
5
+ COLORS = {
6
+ "black" => 0,
7
+ "red" => 1,
8
+ "green" => 2,
9
+ "yellow" => 3,
10
+ "blue" => 4,
11
+ "purple" => 5,
12
+ "magenta" => 5,
13
+ "cyan" => 6,
14
+ "white" => 7
15
+ }.freeze
16
+
17
+ COLORS.each_pair do |color, value|
18
+ define_method color do |text|
19
+ "\033[0;#{30 + value}m#{text}\033[0m"
20
+ end
21
+
22
+ define_method "bright_#{color}" do |text|
23
+ "\033[1;#{30 + value}m#{text}\033[0m"
24
+ end
25
+ end
26
+ end
27
+ end
@@ -1,3 +1,3 @@
1
1
  module PandaPal
2
- VERSION = "5.8.0"
2
+ VERSION = "5.8.1"
3
3
  end
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.8.0
4
+ version: 5.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Instructure ProServe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-07-11 00:00:00.000000000 Z
11
+ date: 2023-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -334,6 +334,7 @@ files:
334
334
  - lib/panda_pal.rb
335
335
  - lib/panda_pal/engine.rb
336
336
  - lib/panda_pal/helpers.rb
337
+ - lib/panda_pal/helpers/console_helpers.rb
337
338
  - lib/panda_pal/helpers/controller_helper.rb
338
339
  - lib/panda_pal/helpers/misc_helper.rb
339
340
  - lib/panda_pal/helpers/route_helper.rb