amazon-chime-sdk-rails 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (146) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +87 -0
  3. data/.rspec +2 -0
  4. data/.travis.yml +47 -0
  5. data/.yardopts +6 -0
  6. data/CHANGELOG.md +3 -0
  7. data/Gemfile +25 -0
  8. data/LICENSE +21 -0
  9. data/README.md +1109 -0
  10. data/Rakefile +20 -0
  11. data/amazon-chime-sdk-rails.gemspec +29 -0
  12. data/gemfiles/Gemfile.rails-5.0 +25 -0
  13. data/gemfiles/Gemfile.rails-5.1 +25 -0
  14. data/gemfiles/Gemfile.rails-5.2 +25 -0
  15. data/gemfiles/Gemfile.rails-6.0 +25 -0
  16. data/lib/amazon-chime-sdk-rails.rb +37 -0
  17. data/lib/chime_sdk/config.rb +90 -0
  18. data/lib/chime_sdk/controller/attendees.rb +128 -0
  19. data/lib/chime_sdk/controller/common.rb +202 -0
  20. data/lib/chime_sdk/controller/meetings.rb +192 -0
  21. data/lib/chime_sdk/meeting_coordinator.rb +184 -0
  22. data/lib/chime_sdk/version.rb +4 -0
  23. data/lib/generators/chime_sdk/controllers_generator.rb +104 -0
  24. data/lib/generators/chime_sdk/install_generator.rb +27 -0
  25. data/lib/generators/chime_sdk/js_generator.rb +67 -0
  26. data/lib/generators/chime_sdk/views_generator.rb +43 -0
  27. data/lib/generators/templates/chime_sdk.rb +28 -0
  28. data/lib/generators/templates/controllers/README +35 -0
  29. data/lib/generators/templates/controllers/meeting_attendees_controller.rb +106 -0
  30. data/lib/generators/templates/controllers/meetings_controller.rb +146 -0
  31. data/lib/generators/templates/views/meetings/index.html.erb +27 -0
  32. data/lib/generators/templates/views/meetings/show.html.erb +136 -0
  33. data/spec/factories/rooms.rb +5 -0
  34. data/spec/factories/users.rb +8 -0
  35. data/spec/generators/controllers_generator_spec.rb +113 -0
  36. data/spec/generators/install_generator_spec.rb +24 -0
  37. data/spec/generators/js_generator_spec.rb +26 -0
  38. data/spec/generators/views_generator_spec.rb +46 -0
  39. data/spec/rails_app/Rakefile +15 -0
  40. data/spec/rails_app/app/assets/config/manifest.js +2 -0
  41. data/spec/rails_app/app/assets/images/.keep +0 -0
  42. data/spec/rails_app/app/assets/javascripts/.keep +0 -0
  43. data/spec/rails_app/app/assets/stylesheets/application.css +15 -0
  44. data/spec/rails_app/app/assets/stylesheets/scaffolds.scss +65 -0
  45. data/spec/rails_app/app/controllers/api/meeting_attendees_controller.rb +3 -0
  46. data/spec/rails_app/app/controllers/api/meetings_controller.rb +3 -0
  47. data/spec/rails_app/app/controllers/api/rooms_controller.rb +3 -0
  48. data/spec/rails_app/app/controllers/application_controller.rb +11 -0
  49. data/spec/rails_app/app/controllers/entries_controller.rb +47 -0
  50. data/spec/rails_app/app/controllers/meeting_attendees_controller.rb +121 -0
  51. data/spec/rails_app/app/controllers/meetings_controller.rb +162 -0
  52. data/spec/rails_app/app/controllers/rooms_controller.rb +76 -0
  53. data/spec/rails_app/app/controllers/spa_controller.rb +6 -0
  54. data/spec/rails_app/app/javascript/App.vue +50 -0
  55. data/spec/rails_app/app/javascript/channels/consumer.js +6 -0
  56. data/spec/rails_app/app/javascript/channels/index.js +5 -0
  57. data/spec/rails_app/app/javascript/components/DeviseTokenAuth.vue +84 -0
  58. data/spec/rails_app/app/javascript/components/meetings/Index.vue +100 -0
  59. data/spec/rails_app/app/javascript/components/meetings/Meeting.vue +178 -0
  60. data/spec/rails_app/app/javascript/components/rooms/Index.vue +53 -0
  61. data/spec/rails_app/app/javascript/components/rooms/Show.vue +91 -0
  62. data/spec/rails_app/app/javascript/packs/application.js +17 -0
  63. data/spec/rails_app/app/javascript/packs/spa.js +14 -0
  64. data/spec/rails_app/app/javascript/router/index.js +74 -0
  65. data/spec/rails_app/app/javascript/store/index.js +37 -0
  66. data/spec/rails_app/app/models/application_record.rb +3 -0
  67. data/spec/rails_app/app/models/entry.rb +5 -0
  68. data/spec/rails_app/app/models/room.rb +12 -0
  69. data/spec/rails_app/app/models/user.rb +6 -0
  70. data/spec/rails_app/app/views/devise/registrations/new.html.erb +34 -0
  71. data/spec/rails_app/app/views/layouts/_header.html.erb +20 -0
  72. data/spec/rails_app/app/views/layouts/application.html.erb +18 -0
  73. data/spec/rails_app/app/views/meetings/index.html.erb +28 -0
  74. data/spec/rails_app/app/views/meetings/show.html.erb +136 -0
  75. data/spec/rails_app/app/views/rooms/_form.html.erb +22 -0
  76. data/spec/rails_app/app/views/rooms/_room.json.jbuilder +7 -0
  77. data/spec/rails_app/app/views/rooms/edit.html.erb +6 -0
  78. data/spec/rails_app/app/views/rooms/index.html.erb +27 -0
  79. data/spec/rails_app/app/views/rooms/index.json.jbuilder +1 -0
  80. data/spec/rails_app/app/views/rooms/new.html.erb +5 -0
  81. data/spec/rails_app/app/views/rooms/show.html.erb +42 -0
  82. data/spec/rails_app/app/views/rooms/show.json.jbuilder +1 -0
  83. data/spec/rails_app/app/views/spa/index.html.erb +1 -0
  84. data/spec/rails_app/babel.config.js +72 -0
  85. data/spec/rails_app/bin/bundle +114 -0
  86. data/spec/rails_app/bin/rails +9 -0
  87. data/spec/rails_app/bin/rake +9 -0
  88. data/spec/rails_app/bin/setup +36 -0
  89. data/spec/rails_app/bin/spring +17 -0
  90. data/spec/rails_app/bin/webpack +18 -0
  91. data/spec/rails_app/bin/webpack-dev-server +18 -0
  92. data/spec/rails_app/bin/yarn +11 -0
  93. data/spec/rails_app/config.ru +5 -0
  94. data/spec/rails_app/config/application.rb +21 -0
  95. data/spec/rails_app/config/boot.rb +4 -0
  96. data/spec/rails_app/config/cable.yml +10 -0
  97. data/spec/rails_app/config/credentials.yml.enc +1 -0
  98. data/spec/rails_app/config/database.yml +25 -0
  99. data/spec/rails_app/config/environment.rb +14 -0
  100. data/spec/rails_app/config/environments/development.rb +62 -0
  101. data/spec/rails_app/config/environments/production.rb +112 -0
  102. data/spec/rails_app/config/environments/test.rb +49 -0
  103. data/spec/rails_app/config/initializers/application_controller_renderer.rb +8 -0
  104. data/spec/rails_app/config/initializers/assets.rb +15 -0
  105. data/spec/rails_app/config/initializers/backtrace_silencers.rb +7 -0
  106. data/spec/rails_app/config/initializers/chime_sdk.rb +28 -0
  107. data/spec/rails_app/config/initializers/content_security_policy.rb +30 -0
  108. data/spec/rails_app/config/initializers/cookies_serializer.rb +5 -0
  109. data/spec/rails_app/config/initializers/devise.rb +311 -0
  110. data/spec/rails_app/config/initializers/devise_token_auth.rb +60 -0
  111. data/spec/rails_app/config/initializers/filter_parameter_logging.rb +4 -0
  112. data/spec/rails_app/config/initializers/inflections.rb +16 -0
  113. data/spec/rails_app/config/initializers/mime_types.rb +4 -0
  114. data/spec/rails_app/config/initializers/wrap_parameters.rb +14 -0
  115. data/spec/rails_app/config/locales/devise.en.yml +65 -0
  116. data/spec/rails_app/config/locales/en.yml +33 -0
  117. data/spec/rails_app/config/puma.rb +38 -0
  118. data/spec/rails_app/config/routes.rb +24 -0
  119. data/spec/rails_app/config/secrets.yml +8 -0
  120. data/spec/rails_app/config/spring.rb +6 -0
  121. data/spec/rails_app/config/storage.yml +34 -0
  122. data/spec/rails_app/config/webpack/development.js +5 -0
  123. data/spec/rails_app/config/webpack/environment.js +7 -0
  124. data/spec/rails_app/config/webpack/loaders/vue.js +6 -0
  125. data/spec/rails_app/config/webpack/production.js +5 -0
  126. data/spec/rails_app/config/webpack/test.js +5 -0
  127. data/spec/rails_app/config/webpacker.yml +97 -0
  128. data/spec/rails_app/db/migrate/20200912140231_devise_create_users.rb +45 -0
  129. data/spec/rails_app/db/migrate/20200912140352_add_tokens_to_users.rb +12 -0
  130. data/spec/rails_app/db/migrate/20200912140657_create_rooms.rb +9 -0
  131. data/spec/rails_app/db/migrate/20200912140749_create_entries.rb +10 -0
  132. data/spec/rails_app/db/schema.rb +49 -0
  133. data/spec/rails_app/db/seeds.rb +41 -0
  134. data/spec/rails_app/log/.keep +0 -0
  135. data/spec/rails_app/package.json +23 -0
  136. data/spec/rails_app/postcss.config.js +12 -0
  137. data/spec/rails_app/public/404.html +67 -0
  138. data/spec/rails_app/public/422.html +67 -0
  139. data/spec/rails_app/public/500.html +66 -0
  140. data/spec/rails_app/public/favicon.ico +0 -0
  141. data/spec/rails_app/public/robots.txt +1 -0
  142. data/spec/rails_app/tmp/.keep +0 -0
  143. data/spec/requests/atendees_spec.rb +182 -0
  144. data/spec/requests/meetings_spec.rb +433 -0
  145. data/spec/spec_helper.rb +35 -0
  146. metadata +400 -0
@@ -0,0 +1,60 @@
1
+ # frozen_string_literal: true
2
+
3
+ DeviseTokenAuth.setup do |config|
4
+ # By default the authorization headers will change after each request. The
5
+ # client is responsible for keeping track of the changing tokens. Change
6
+ # this to false to prevent the Authorization header from changing after
7
+ # each request.
8
+ # config.change_headers_on_each_request = true
9
+
10
+ # By default, users will need to re-authenticate after 2 weeks. This setting
11
+ # determines how long tokens will remain valid after they are issued.
12
+ # config.token_lifespan = 2.weeks
13
+
14
+ # Limiting the token_cost to just 4 in testing will increase the performance of
15
+ # your test suite dramatically. The possible cost value is within range from 4
16
+ # to 31. It is recommended to not use a value more than 10 in other environments.
17
+ config.token_cost = Rails.env.test? ? 4 : 10
18
+
19
+ # Sets the max number of concurrent devices per user, which is 10 by default.
20
+ # After this limit is reached, the oldest tokens will be removed.
21
+ # config.max_number_of_devices = 10
22
+
23
+ # Sometimes it's necessary to make several requests to the API at the same
24
+ # time. In this case, each request in the batch will need to share the same
25
+ # auth token. This setting determines how far apart the requests can be while
26
+ # still using the same auth token.
27
+ # config.batch_request_buffer_throttle = 5.seconds
28
+
29
+ # This route will be the prefix for all oauth2 redirect callbacks. For
30
+ # example, using the default '/omniauth', the github oauth2 provider will
31
+ # redirect successful authentications to '/omniauth/github/callback'
32
+ # config.omniauth_prefix = "/omniauth"
33
+
34
+ # By default sending current password is not needed for the password update.
35
+ # Uncomment to enforce current_password param to be checked before all
36
+ # attribute updates. Set it to :password if you want it to be checked only if
37
+ # password is updated.
38
+ # config.check_current_password_before_update = :attributes
39
+
40
+ # By default we will use callbacks for single omniauth.
41
+ # It depends on fields like email, provider and uid.
42
+ # config.default_callbacks = true
43
+
44
+ # Makes it possible to change the headers names
45
+ # config.headers_names = {:'access-token' => 'access-token',
46
+ # :'client' => 'client',
47
+ # :'expiry' => 'expiry',
48
+ # :'uid' => 'uid',
49
+ # :'token-type' => 'token-type' }
50
+
51
+ # By default, only Bearer Token authentication is implemented out of the box.
52
+ # If, however, you wish to integrate with legacy Devise authentication, you can
53
+ # do so by enabling this flag. NOTE: This feature is highly experimental!
54
+ # config.enable_standard_devise_support = false
55
+
56
+ # By default DeviseTokenAuth will not send confirmation email, even when including
57
+ # devise confirmable module. If you want to use devise confirmable module and
58
+ # send email, set it to true. (This is a setting for compatibility)
59
+ # config.send_confirmation_email = true
60
+ end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Configure sensitive parameters which will be filtered from the log file.
4
+ Rails.application.config.filter_parameters += [:password]
@@ -0,0 +1,16 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new inflection rules using the following format. Inflections
4
+ # are locale specific, and you may define rules for as many different
5
+ # locales as you wish. All of these examples are active by default:
6
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
+ # inflect.plural /^(ox)$/i, '\1en'
8
+ # inflect.singular /^(ox)en/i, '\1'
9
+ # inflect.irregular 'person', 'people'
10
+ # inflect.uncountable %w( fish sheep )
11
+ # end
12
+
13
+ # These inflection rules are supported but not enabled by default:
14
+ # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
+ # inflect.acronym 'RESTful'
16
+ # end
@@ -0,0 +1,4 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # This file contains settings for ActionController::ParamsWrapper which
4
+ # is enabled by default.
5
+
6
+ # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
+ ActiveSupport.on_load(:action_controller) do
8
+ wrap_parameters format: [:json]
9
+ end
10
+
11
+ # To enable root element in JSON for ActiveRecord objects.
12
+ # ActiveSupport.on_load(:active_record) do
13
+ # self.include_root_in_json = true
14
+ # end
@@ -0,0 +1,65 @@
1
+ # Additional translations at https://github.com/heartcombo/devise/wiki/I18n
2
+
3
+ en:
4
+ devise:
5
+ confirmations:
6
+ confirmed: "Your email address has been successfully confirmed."
7
+ send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
8
+ send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
9
+ failure:
10
+ already_authenticated: "You are already signed in."
11
+ inactive: "Your account is not activated yet."
12
+ invalid: "Invalid %{authentication_keys} or password."
13
+ locked: "Your account is locked."
14
+ last_attempt: "You have one more attempt before your account is locked."
15
+ not_found_in_database: "Invalid %{authentication_keys} or password."
16
+ timeout: "Your session expired. Please sign in again to continue."
17
+ unauthenticated: "You need to sign in or sign up before continuing."
18
+ unconfirmed: "You have to confirm your email address before continuing."
19
+ mailer:
20
+ confirmation_instructions:
21
+ subject: "Confirmation instructions"
22
+ reset_password_instructions:
23
+ subject: "Reset password instructions"
24
+ unlock_instructions:
25
+ subject: "Unlock instructions"
26
+ email_changed:
27
+ subject: "Email Changed"
28
+ password_change:
29
+ subject: "Password Changed"
30
+ omniauth_callbacks:
31
+ failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
32
+ success: "Successfully authenticated from %{kind} account."
33
+ passwords:
34
+ no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
35
+ send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
36
+ send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
37
+ updated: "Your password has been changed successfully. You are now signed in."
38
+ updated_not_active: "Your password has been changed successfully."
39
+ registrations:
40
+ destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
41
+ signed_up: "Welcome! You have signed up successfully."
42
+ signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
43
+ signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
44
+ signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
45
+ update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirmation link to confirm your new email address."
46
+ updated: "Your account has been updated successfully."
47
+ updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again"
48
+ sessions:
49
+ signed_in: "Signed in successfully."
50
+ signed_out: "Signed out successfully."
51
+ already_signed_out: "Signed out successfully."
52
+ unlocks:
53
+ send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
54
+ send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
55
+ unlocked: "Your account has been unlocked successfully. Please sign in to continue."
56
+ errors:
57
+ messages:
58
+ already_confirmed: "was already confirmed, please try signing in"
59
+ confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
60
+ expired: "has expired, please request a new one"
61
+ not_found: "not found"
62
+ not_locked: "was not locked"
63
+ not_saved:
64
+ one: "1 error prohibited this %{resource} from being saved:"
65
+ other: "%{count} errors prohibited this %{resource} from being saved:"
@@ -0,0 +1,33 @@
1
+ # Files in the config/locales directory are used for internationalization
2
+ # and are automatically loaded by Rails. If you want to use locales other
3
+ # than English, add the necessary files in this directory.
4
+ #
5
+ # To use the locales, use `I18n.t`:
6
+ #
7
+ # I18n.t 'hello'
8
+ #
9
+ # In views, this is aliased to just `t`:
10
+ #
11
+ # <%= t('hello') %>
12
+ #
13
+ # To use a different locale, set it with `I18n.locale`:
14
+ #
15
+ # I18n.locale = :es
16
+ #
17
+ # This would use the information in config/locales/es.yml.
18
+ #
19
+ # The following keys must be escaped otherwise they will not be retrieved by
20
+ # the default I18n backend:
21
+ #
22
+ # true, false, on, off, yes, no
23
+ #
24
+ # Instead, surround them with single quotes.
25
+ #
26
+ # en:
27
+ # 'true': 'foo'
28
+ #
29
+ # To learn more, please read the Rails Internationalization guide
30
+ # available at https://guides.rubyonrails.org/i18n.html.
31
+
32
+ en:
33
+ hello: "Hello world"
@@ -0,0 +1,38 @@
1
+ # Puma can serve each request in a thread from an internal thread pool.
2
+ # The `threads` method setting takes two numbers: a minimum and maximum.
3
+ # Any libraries that use thread pools should be configured to match
4
+ # the maximum value specified for Puma. Default is set to 5 threads for minimum
5
+ # and maximum; this matches the default thread size of Active Record.
6
+ #
7
+ max_threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
8
+ min_threads_count = ENV.fetch("RAILS_MIN_THREADS") { max_threads_count }
9
+ threads min_threads_count, max_threads_count
10
+
11
+ # Specifies the `port` that Puma will listen on to receive requests; default is 3000.
12
+ #
13
+ port ENV.fetch("PORT") { 3000 }
14
+
15
+ # Specifies the `environment` that Puma will run in.
16
+ #
17
+ environment ENV.fetch("RAILS_ENV") { "development" }
18
+
19
+ # Specifies the `pidfile` that Puma will use.
20
+ pidfile ENV.fetch("PIDFILE") { "tmp/pids/server.pid" }
21
+
22
+ # Specifies the number of `workers` to boot in clustered mode.
23
+ # Workers are forked web server processes. If using threads and workers together
24
+ # the concurrency of the application would be max `threads` * `workers`.
25
+ # Workers do not work on JRuby or Windows (both of which do not support
26
+ # processes).
27
+ #
28
+ # workers ENV.fetch("WEB_CONCURRENCY") { 2 }
29
+
30
+ # Use the `preload_app!` method when specifying a `workers` number.
31
+ # This directive tells Puma to first boot the application and load code
32
+ # before forking the application. This takes advantage of Copy On Write
33
+ # process behavior so workers use less memory.
34
+ #
35
+ # preload_app!
36
+
37
+ # Allow puma to be restarted by `rails restart` command.
38
+ plugin :tmp_restart
@@ -0,0 +1,24 @@
1
+ Rails.application.routes.draw do
2
+ # Routes for App with Rails View
3
+ root "rooms#index"
4
+ devise_for :users
5
+ resources :rooms do
6
+ resources :entries, only: [:create, :destroy]
7
+ resources :meetings, only: [:index, :show, :create, :destroy] do
8
+ resources :meeting_attendees, as: :attendees, path: :attendees, only: [:index, :show]
9
+ end
10
+ end
11
+
12
+ # Routes for SPA with Rails API
13
+ resources :spa, only: [:index]
14
+ namespace :api do
15
+ scope :"v1" do
16
+ mount_devise_token_auth_for 'User', at: 'auth'
17
+ resources :rooms, defaults: { format: :json }, only: [:index, :show] do
18
+ resources :meetings, defaults: { format: :json }, only: [:index, :show, :create, :destroy] do
19
+ resources :meeting_attendees, as: :attendees, path: :attendees, only: [:index, :show, :create, :destroy]
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,8 @@
1
+ development:
2
+ secret_key_base: efd2d2ce52224b468736e2e600f9431ca7ec79226b6fca07050e855edf1faaf43bbd7043128a98dfb6183a49cf54a1ab70fbbe73396b1a2f7f9fcc173c9946c7
3
+
4
+ test:
5
+ secret_key_base: 4d11106263674f4baa570acae6ffe2f12843f3a40a9995bd9691fdcbc01a925a4c5000e7773ac4beabda4f23b1a64f1d65c759273e65687eae0d655c8361f642
6
+
7
+ production:
8
+ secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
@@ -0,0 +1,6 @@
1
+ Spring.watch(
2
+ ".ruby-version",
3
+ ".rbenv-vars",
4
+ "tmp/restart.txt",
5
+ "tmp/caching-dev.txt"
6
+ )
@@ -0,0 +1,34 @@
1
+ test:
2
+ service: Disk
3
+ root: <%= Rails.root.join("tmp/storage") %>
4
+
5
+ local:
6
+ service: Disk
7
+ root: <%= Rails.root.join("storage") %>
8
+
9
+ # Use rails credentials:edit to set the AWS secrets (as aws:access_key_id|secret_access_key)
10
+ # amazon:
11
+ # service: S3
12
+ # access_key_id: <%= Rails.application.credentials.dig(:aws, :access_key_id) %>
13
+ # secret_access_key: <%= Rails.application.credentials.dig(:aws, :secret_access_key) %>
14
+ # region: us-east-1
15
+ # bucket: your_own_bucket
16
+
17
+ # Remember not to checkin your GCS keyfile to a repository
18
+ # google:
19
+ # service: GCS
20
+ # project: your_project
21
+ # credentials: <%= Rails.root.join("path/to/gcs.keyfile") %>
22
+ # bucket: your_own_bucket
23
+
24
+ # Use rails credentials:edit to set the Azure Storage secret (as azure_storage:storage_access_key)
25
+ # microsoft:
26
+ # service: AzureStorage
27
+ # storage_account_name: your_account_name
28
+ # storage_access_key: <%= Rails.application.credentials.dig(:azure_storage, :storage_access_key) %>
29
+ # container: your_container_name
30
+
31
+ # mirror:
32
+ # service: Mirror
33
+ # primary: local
34
+ # mirrors: [ amazon, google, microsoft ]
@@ -0,0 +1,5 @@
1
+ process.env.NODE_ENV = process.env.NODE_ENV || 'development'
2
+
3
+ const environment = require('./environment')
4
+
5
+ module.exports = environment.toWebpackConfig()
@@ -0,0 +1,7 @@
1
+ const { environment } = require('@rails/webpacker')
2
+ const { VueLoaderPlugin } = require('vue-loader')
3
+ const vue = require('./loaders/vue')
4
+
5
+ environment.plugins.prepend('VueLoaderPlugin', new VueLoaderPlugin())
6
+ environment.loaders.prepend('vue', vue)
7
+ module.exports = environment
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ test: /\.vue(\.erb)?$/,
3
+ use: [{
4
+ loader: 'vue-loader'
5
+ }]
6
+ }
@@ -0,0 +1,5 @@
1
+ process.env.NODE_ENV = process.env.NODE_ENV || 'production'
2
+
3
+ const environment = require('./environment')
4
+
5
+ module.exports = environment.toWebpackConfig()
@@ -0,0 +1,5 @@
1
+ process.env.NODE_ENV = process.env.NODE_ENV || 'development'
2
+
3
+ const environment = require('./environment')
4
+
5
+ module.exports = environment.toWebpackConfig()
@@ -0,0 +1,97 @@
1
+ # Note: You must restart bin/webpack-dev-server for changes to take effect
2
+
3
+ default: &default
4
+ source_path: app/javascript
5
+ source_entry_path: packs
6
+ public_root_path: public
7
+ public_output_path: packs
8
+ cache_path: tmp/cache/webpacker
9
+ check_yarn_integrity: false
10
+ webpack_compile_output: true
11
+
12
+ # Additional paths webpack should lookup modules
13
+ # ['app/assets', 'engine/foo/app/assets']
14
+ resolved_paths: []
15
+
16
+ # Reload manifest.json on all requests so we reload latest compiled packs
17
+ cache_manifest: false
18
+
19
+ # Extract and emit a css file
20
+ extract_css: false
21
+
22
+ static_assets_extensions:
23
+ - .jpg
24
+ - .jpeg
25
+ - .png
26
+ - .gif
27
+ - .tiff
28
+ - .ico
29
+ - .svg
30
+ - .eot
31
+ - .otf
32
+ - .ttf
33
+ - .woff
34
+ - .woff2
35
+
36
+ extensions:
37
+ - .vue
38
+ - .mjs
39
+ - .js
40
+ - .sass
41
+ - .scss
42
+ - .css
43
+ - .module.sass
44
+ - .module.scss
45
+ - .module.css
46
+ - .png
47
+ - .svg
48
+ - .gif
49
+ - .jpeg
50
+ - .jpg
51
+
52
+ development:
53
+ <<: *default
54
+ compile: true
55
+
56
+ # Verifies that correct packages and versions are installed by inspecting package.json, yarn.lock, and node_modules
57
+ check_yarn_integrity: true
58
+
59
+ # Reference: https://webpack.js.org/configuration/dev-server/
60
+ dev_server:
61
+ https: false
62
+ host: localhost
63
+ port: 3035
64
+ public: localhost:3035
65
+ hmr: false
66
+ # Inline should be set to true if using HMR
67
+ inline: true
68
+ overlay: true
69
+ compress: true
70
+ disable_host_check: true
71
+ use_local_ip: false
72
+ quiet: false
73
+ pretty: false
74
+ headers:
75
+ 'Access-Control-Allow-Origin': '*'
76
+ watch_options:
77
+ ignored: '**/node_modules/**'
78
+
79
+
80
+ test:
81
+ <<: *default
82
+ compile: true
83
+
84
+ # Compile test packs to a separate directory
85
+ public_output_path: packs-test
86
+
87
+ production:
88
+ <<: *default
89
+
90
+ # Production depends on precompilation of packs prior to booting for performance.
91
+ compile: false
92
+
93
+ # Extract and emit a css file
94
+ extract_css: true
95
+
96
+ # Cache manifest.json for performance
97
+ cache_manifest: true