amazon-chime-sdk-rails 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/build.yml +69 -0
- data/.gitignore +7 -1
- data/CHANGELOG.md +19 -0
- data/Dockerfile +15 -0
- data/Gemfile +5 -3
- data/README.md +132 -1005
- data/docs/Develop_Rails_API_Application.md +569 -0
- data/docs/Develop_Rails_View_Application.md +441 -0
- data/gemfiles/Gemfile.rails-5.0 +1 -1
- data/gemfiles/Gemfile.rails-5.1 +0 -1
- data/gemfiles/Gemfile.rails-5.2 +0 -1
- data/gemfiles/Gemfile.rails-6.0 +0 -1
- data/gemfiles/Gemfile.rails-6.1 +24 -0
- data/gemfiles/Gemfile.rails-7.0 +30 -0
- data/lib/chime_sdk/controller/meetings.rb +4 -3
- data/lib/chime_sdk/version.rb +1 -1
- data/lib/generators/chime_sdk/js_generator.rb +72 -9
- data/lib/generators/templates/controllers/meetings_controller.rb +1 -1
- data/spec/generators/js_generator_spec.rb +66 -6
- data/spec/rails_app/app/assets/config/manifest.js +1 -0
- data/spec/rails_app/app/assets/javascripts/application.js +3 -0
- data/spec/rails_app/app/controllers/api/public/meeting_attendees_controller.rb +11 -0
- data/spec/rails_app/app/controllers/api/public/meetings_controller.rb +15 -0
- data/spec/rails_app/app/controllers/meetings_controller.rb +1 -1
- data/spec/rails_app/app/views/layouts/_header.html.erb +1 -5
- data/spec/rails_app/app/views/layouts/application.html.erb +1 -2
- data/spec/rails_app/app/views/meetings/show.html.erb +22 -2
- data/spec/rails_app/config/application.rb +11 -2
- data/spec/rails_app/config/initializers/devise_token_auth.rb +1 -1
- data/spec/rails_app/config/routes.rb +10 -3
- data/spec/rails_app/db/seeds.rb +1 -1
- data/spec/requests/meetings_spec.rb +1 -1
- data/templates/amazon-chime-sdk-policy.yml +49 -0
- metadata +19 -57
- data/.travis.yml +0 -47
- data/spec/rails_app/app/controllers/spa_controller.rb +0 -6
- data/spec/rails_app/app/javascript/App.vue +0 -50
- data/spec/rails_app/app/javascript/channels/consumer.js +0 -6
- data/spec/rails_app/app/javascript/channels/index.js +0 -5
- data/spec/rails_app/app/javascript/components/DeviseTokenAuth.vue +0 -84
- data/spec/rails_app/app/javascript/components/meetings/Index.vue +0 -100
- data/spec/rails_app/app/javascript/components/meetings/Meeting.vue +0 -178
- data/spec/rails_app/app/javascript/components/rooms/Index.vue +0 -53
- data/spec/rails_app/app/javascript/components/rooms/Show.vue +0 -91
- data/spec/rails_app/app/javascript/packs/application.js +0 -17
- data/spec/rails_app/app/javascript/packs/spa.js +0 -14
- data/spec/rails_app/app/javascript/router/index.js +0 -74
- data/spec/rails_app/app/javascript/store/index.js +0 -37
- data/spec/rails_app/app/views/spa/index.html.erb +0 -1
- data/spec/rails_app/babel.config.js +0 -72
- data/spec/rails_app/bin/webpack +0 -18
- data/spec/rails_app/bin/webpack-dev-server +0 -18
- data/spec/rails_app/config/webpack/development.js +0 -5
- data/spec/rails_app/config/webpack/environment.js +0 -7
- data/spec/rails_app/config/webpack/loaders/vue.js +0 -6
- data/spec/rails_app/config/webpack/production.js +0 -5
- data/spec/rails_app/config/webpack/test.js +0 -5
- data/spec/rails_app/config/webpacker.yml +0 -97
- data/spec/rails_app/package.json +0 -23
- data/spec/rails_app/postcss.config.js +0 -12
@@ -12,14 +12,74 @@ describe ChimeSdk::Generators::JsGenerator, type: :generator do
|
|
12
12
|
|
13
13
|
describe 'generating files' do
|
14
14
|
context 'when npm is installed' do
|
15
|
-
|
16
|
-
|
15
|
+
context 'without specified amazon-chime-sdk-js version' do
|
16
|
+
before do
|
17
|
+
run_generator
|
18
|
+
end
|
19
|
+
|
20
|
+
# This test takes a long time. Skip it by xdescribe if you are developing the gem.
|
21
|
+
describe 'app/assets/javascripts/amazon-chime-sdk.min.js' do
|
22
|
+
subject { file('app/assets/javascripts/amazon-chime-sdk.min.js') }
|
23
|
+
it { is_expected.to exist }
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# https://www.npmjs.com/package/amazon-chime-sdk-js
|
28
|
+
context 'with 1.0.0 as specified amazon-chime-sdk-js version' do
|
29
|
+
before do
|
30
|
+
run_generator %w(1.0.0)
|
31
|
+
end
|
32
|
+
|
33
|
+
# This test takes a long time. Skip it by xdescribe if you are developing the gem.
|
34
|
+
describe 'app/assets/javascripts/amazon-chime-sdk.min.js' do
|
35
|
+
subject { file('app/assets/javascripts/amazon-chime-sdk.min.js') }
|
36
|
+
it { is_expected.to exist }
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
# https://www.npmjs.com/package/amazon-chime-sdk-js
|
41
|
+
context 'with 2.24.0 as specified amazon-chime-sdk-js version' do
|
42
|
+
before do
|
43
|
+
run_generator %w(2.24.0)
|
44
|
+
end
|
45
|
+
|
46
|
+
# This test takes a long time. Skip it by xdescribe if you are developing the gem.
|
47
|
+
describe 'app/assets/javascripts/amazon-chime-sdk.min.js' do
|
48
|
+
subject { file('app/assets/javascripts/amazon-chime-sdk.min.js') }
|
49
|
+
it { is_expected.to exist }
|
50
|
+
end
|
17
51
|
end
|
18
52
|
|
19
|
-
#
|
20
|
-
|
21
|
-
subject {
|
22
|
-
it { is_expected.to
|
53
|
+
# https://www.npmjs.com/package/amazon-chime-sdk-js
|
54
|
+
context 'with 0.9.0 as specified amazon-chime-sdk-js version' do
|
55
|
+
subject { -> { run_generator %w(0.9.0) } }
|
56
|
+
it { is_expected.to raise_error(SystemExit) }
|
57
|
+
|
58
|
+
describe 'app/assets/javascripts/amazon-chime-sdk.min.js' do
|
59
|
+
subject { file('app/assets/javascripts/amazon-chime-sdk.min.js') }
|
60
|
+
it { is_expected.not_to exist }
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
# https://www.npmjs.com/package/amazon-chime-sdk-js
|
65
|
+
context 'with 1.2.0 as specified amazon-chime-sdk-js version' do
|
66
|
+
subject { -> { run_generator %w(1.2.0) } }
|
67
|
+
it { is_expected.to raise_error(SystemExit) }
|
68
|
+
|
69
|
+
describe 'app/assets/javascripts/amazon-chime-sdk.min.js' do
|
70
|
+
subject { file('app/assets/javascripts/amazon-chime-sdk.min.js') }
|
71
|
+
it { is_expected.not_to exist }
|
72
|
+
end
|
73
|
+
end
|
74
|
+
|
75
|
+
context 'with hoge as specified amazon-chime-sdk-js version' do
|
76
|
+
subject { -> { run_generator %w(hoge) } }
|
77
|
+
it { is_expected.to raise_error(SystemExit) }
|
78
|
+
|
79
|
+
describe 'app/assets/javascripts/amazon-chime-sdk.min.js' do
|
80
|
+
subject { file('app/assets/javascripts/amazon-chime-sdk.min.js') }
|
81
|
+
it { is_expected.not_to exist }
|
82
|
+
end
|
23
83
|
end
|
24
84
|
end
|
25
85
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class Api::Public::MeetingAttendeesController < ApplicationController
|
2
|
+
include ChimeSdk::Controller::Attendees::Mixin
|
3
|
+
|
4
|
+
def application_attendee_metadata(attendee)
|
5
|
+
user_id = attendee[:Attendee][:ExternalUserId].split('-')[3]
|
6
|
+
{
|
7
|
+
"AttendeeType": "User",
|
8
|
+
"User": User.find_by_id(user_id)
|
9
|
+
}
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
class Api::Public::MeetingsController < ApplicationController
|
2
|
+
include ChimeSdk::Controller::Meetings::Mixin
|
3
|
+
|
4
|
+
def index
|
5
|
+
render json: { api: 'meetings', status: 'healthy' }
|
6
|
+
end
|
7
|
+
|
8
|
+
def application_meeting_metadata(meeting)
|
9
|
+
room_id = meeting[:Meeting][:ExternalMeetingId].split('-')[3]
|
10
|
+
{
|
11
|
+
"MeetingType": "PrivateRoom",
|
12
|
+
"PrivateRoom": Room.find_by_id(room_id)
|
13
|
+
}
|
14
|
+
end
|
15
|
+
end
|
@@ -1,11 +1,7 @@
|
|
1
1
|
<header>
|
2
2
|
<div>
|
3
3
|
<div>
|
4
|
-
|
5
|
-
<strong><%= link_to 'Rails App with Action View', root_path %></strong>
|
6
|
-
</div>
|
7
|
-
<div>
|
8
|
-
<strong>Rails Application for Amazon Chime SDK Meeting (Rails App with Action View)</strong>
|
4
|
+
<strong>Rails Application for Amazon Chime SDK Meeting</strong>
|
9
5
|
</div>
|
10
6
|
<div>
|
11
7
|
<% if user_signed_in? %>
|
@@ -5,8 +5,7 @@
|
|
5
5
|
<%= csrf_meta_tags %>
|
6
6
|
|
7
7
|
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
|
8
|
-
<%=
|
9
|
-
<%= javascript_pack_tag 'application', 'data-turbolinks-track': 'reload' %>
|
8
|
+
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>
|
10
9
|
</head>
|
11
10
|
|
12
11
|
<body>
|
@@ -4,6 +4,11 @@
|
|
4
4
|
|
5
5
|
<p><%= link_to("Show Meetings", meeting_resources_path) %></p>
|
6
6
|
|
7
|
+
<% if ENV['REACT_MEETING_DEMO_URL'] %>
|
8
|
+
<p><input type="button" value="Open React Meeting Demo" onclick="openReactMeetingDemo()"></p>
|
9
|
+
<% end %>
|
10
|
+
<div id="react_meeting_demo_url" url="<%= ENV['REACT_MEETING_DEMO_URL'] %>"></div>
|
11
|
+
|
7
12
|
<% if @meeting %>
|
8
13
|
<strong>Meeting</strong>
|
9
14
|
<p>
|
@@ -53,6 +58,13 @@
|
|
53
58
|
return `${attendee.Attendee.ApplicationMetadata.User.name} (${attendee.Attendee.AttendeeId})`;
|
54
59
|
}
|
55
60
|
|
61
|
+
// Open customized React Meeting Demo
|
62
|
+
// https://github.com/simukappu/amazon-chime-sdk/tree/main/apps/meeting
|
63
|
+
function openReactMeetingDemo() {
|
64
|
+
window.open(`${reactMeetingDemoUrl}?preparedApiEndpoint=${window.location.origin}/api/v1/public/meetings&preparedMeetingId=${meeting.Meeting.MeetingId}&preparedAttendeeId=${attendee.Attendee.AttendeeId}`, '_blank').focus();
|
65
|
+
}
|
66
|
+
|
67
|
+
const reactMeetingDemoUrl = document.getElementById('react_meeting_demo_url').getAttribute('url');
|
56
68
|
const meeting = JSON.parse(document.getElementById('meeting').getAttribute('meeting-data'));
|
57
69
|
const attendee = JSON.parse(document.getElementById('attendee').getAttribute('attendee-data'));
|
58
70
|
const attendeeResourcesPath = document.getElementById('attendee-resources-path').getAttribute('attendee-resources-path-data');
|
@@ -75,9 +87,17 @@
|
|
75
87
|
await meetingSession.audioVideo.chooseAudioOutputDevice(audioOutputDevices[0].deviceId);
|
76
88
|
} catch (error) {
|
77
89
|
// handle error - unable to acquire audio device perhaps due to permissions blocking
|
78
|
-
|
90
|
+
if (error instanceof PermissionDeniedError) {
|
91
|
+
console.error('Permission denied', error);
|
92
|
+
} else {
|
93
|
+
console.error(error);
|
94
|
+
}
|
95
|
+
}
|
96
|
+
try {
|
97
|
+
await meetingSession.audioVideo.bindAudioElement(audioOutputElement);
|
98
|
+
} catch (error) {
|
99
|
+
console.error('Failed to bind audio element', error);
|
79
100
|
}
|
80
|
-
meetingSession.audioVideo.bindAudioElement(audioOutputElement);
|
81
101
|
meetingSession.audioVideo.start();
|
82
102
|
document.getElementById("meeting-status").innerHTML = '<p>Meeting : Online <input type="button" value="Leave a meeting" onclick="leave()"></p><div id="audio-status"></div>';
|
83
103
|
document.getElementById("audio-status").innerHTML = '<p>Audio : Active <input type="button" value="Mute" onclick="mute()"></p>';
|
@@ -14,8 +14,17 @@ module RailsApp
|
|
14
14
|
end
|
15
15
|
|
16
16
|
if Rails::VERSION::MAJOR >= 6
|
17
|
-
|
18
|
-
|
17
|
+
config.hosts.clear
|
18
|
+
end
|
19
|
+
|
20
|
+
# Configure CORS for public API
|
21
|
+
if defined?(Rack::Cors)
|
22
|
+
config.middleware.insert_before 0, Rack::Cors do
|
23
|
+
allow do
|
24
|
+
origins '*'
|
25
|
+
resource '/api/v1/public/*', methods: [:get, :delete], headers: :any
|
26
|
+
end
|
27
|
+
end
|
19
28
|
end
|
20
29
|
end
|
21
30
|
end
|
@@ -5,7 +5,7 @@ DeviseTokenAuth.setup do |config|
|
|
5
5
|
# client is responsible for keeping track of the changing tokens. Change
|
6
6
|
# this to false to prevent the Authorization header from changing after
|
7
7
|
# each request.
|
8
|
-
|
8
|
+
config.change_headers_on_each_request = false
|
9
9
|
|
10
10
|
# By default, users will need to re-authenticate after 2 weeks. This setting
|
11
11
|
# determines how long tokens will remain valid after they are issued.
|
@@ -1,5 +1,5 @@
|
|
1
1
|
Rails.application.routes.draw do
|
2
|
-
# Routes for
|
2
|
+
# Routes for Rails application with Action View
|
3
3
|
root "rooms#index"
|
4
4
|
devise_for :users
|
5
5
|
resources :rooms do
|
@@ -9,16 +9,23 @@ Rails.application.routes.draw do
|
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
|
-
# Routes for
|
13
|
-
resources :spa, only: [:index]
|
12
|
+
# Routes for REST API with Rails API application
|
14
13
|
namespace :api do
|
15
14
|
scope :"v1" do
|
15
|
+
# Private API with authentication
|
16
16
|
mount_devise_token_auth_for 'User', at: 'auth'
|
17
17
|
resources :rooms, defaults: { format: :json }, only: [:index, :show] do
|
18
18
|
resources :meetings, defaults: { format: :json }, only: [:index, :show, :create, :destroy] do
|
19
19
|
resources :meeting_attendees, as: :attendees, path: :attendees, only: [:index, :show, :create, :destroy]
|
20
20
|
end
|
21
21
|
end
|
22
|
+
|
23
|
+
# Public API called from Amazon Chime SDK React Meeting Demo application
|
24
|
+
namespace :public do
|
25
|
+
resources :meetings, defaults: { format: :json, create_attendee_from_meeting: false }, only: [:index, :show, :destroy] do
|
26
|
+
resources :meeting_attendees, as: :attendees, path: :attendees, only: [:index, :show, :destroy]
|
27
|
+
end
|
28
|
+
end
|
22
29
|
end
|
23
30
|
end
|
24
31
|
end
|
data/spec/rails_app/db/seeds.rb
CHANGED
@@ -140,7 +140,7 @@ describe ChimeSdk::Controller::Meetings, type: :request do
|
|
140
140
|
end
|
141
141
|
|
142
142
|
it "returns application metadata in the meeting" do
|
143
|
-
expect(JSON.parse(response.body)["Meeting"]["ApplicationMetadata"]["
|
143
|
+
expect(JSON.parse(response.body)["Meeting"]["ApplicationMetadata"]["PrivateRoom"]["id"]).to eq(@room.id)
|
144
144
|
end
|
145
145
|
|
146
146
|
it "returns created attendee since ChimeSdk.config.create_attendee_from_meeting is enabled" do
|
@@ -0,0 +1,49 @@
|
|
1
|
+
Parameters:
|
2
|
+
App:
|
3
|
+
Type: String
|
4
|
+
Description: Your application's name.
|
5
|
+
Env:
|
6
|
+
Type: String
|
7
|
+
Description: The environment name for the service.
|
8
|
+
Name:
|
9
|
+
Type: String
|
10
|
+
Description: The name of the service.
|
11
|
+
|
12
|
+
Resources:
|
13
|
+
# https://docs.aws.amazon.com/chime-sdk/latest/dg/iam-users-roles.html
|
14
|
+
AmazonChimeSdkPolicy:
|
15
|
+
Type: AWS::IAM::ManagedPolicy
|
16
|
+
Properties:
|
17
|
+
PolicyDocument:
|
18
|
+
Version: 2012-10-17
|
19
|
+
Statement:
|
20
|
+
- Sid: AmazonChimeSdkActions
|
21
|
+
Effect: Allow
|
22
|
+
Action:
|
23
|
+
- chime:CreateMeeting
|
24
|
+
- chime:CreateMeetingWithAttendees
|
25
|
+
- chime:DeleteMeeting
|
26
|
+
- chime:GetMeeting
|
27
|
+
- chime:ListMeetings
|
28
|
+
- chime:CreateAttendee
|
29
|
+
- chime:BatchCreateAttendee
|
30
|
+
- chime:DeleteAttendee
|
31
|
+
- chime:GetAttendee
|
32
|
+
- chime:ListAttendees
|
33
|
+
- chime:ListAttendeeTags
|
34
|
+
- chime:ListMeetingTags
|
35
|
+
- chime:ListTagsForResource
|
36
|
+
- chime:TagAttendee
|
37
|
+
- chime:TagMeeting
|
38
|
+
- chime:TagResource
|
39
|
+
- chime:UntagAttendee
|
40
|
+
- chime:UntagMeeting
|
41
|
+
- chime:UntagResource
|
42
|
+
- chime:StartMeetingTranscription
|
43
|
+
- chime:StopMeetingTranscription
|
44
|
+
Resource: "*"
|
45
|
+
|
46
|
+
Outputs:
|
47
|
+
AmazonChimeSdkPolicyArn:
|
48
|
+
Description: "The ARN of the ManagedPolicy to attatch to the task role."
|
49
|
+
Value: !Ref AmazonChimeSdkPolicy
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amazon-chime-sdk-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shota Yamazaki
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -117,20 +117,25 @@ executables: []
|
|
117
117
|
extensions: []
|
118
118
|
extra_rdoc_files: []
|
119
119
|
files:
|
120
|
+
- ".github/workflows/build.yml"
|
120
121
|
- ".gitignore"
|
121
122
|
- ".rspec"
|
122
|
-
- ".travis.yml"
|
123
123
|
- ".yardopts"
|
124
124
|
- CHANGELOG.md
|
125
|
+
- Dockerfile
|
125
126
|
- Gemfile
|
126
127
|
- LICENSE
|
127
128
|
- README.md
|
128
129
|
- Rakefile
|
129
130
|
- amazon-chime-sdk-rails.gemspec
|
131
|
+
- docs/Develop_Rails_API_Application.md
|
132
|
+
- docs/Develop_Rails_View_Application.md
|
130
133
|
- gemfiles/Gemfile.rails-5.0
|
131
134
|
- gemfiles/Gemfile.rails-5.1
|
132
135
|
- gemfiles/Gemfile.rails-5.2
|
133
136
|
- gemfiles/Gemfile.rails-6.0
|
137
|
+
- gemfiles/Gemfile.rails-6.1
|
138
|
+
- gemfiles/Gemfile.rails-7.0
|
134
139
|
- lib/amazon-chime-sdk-rails.rb
|
135
140
|
- lib/chime_sdk/config.rb
|
136
141
|
- lib/chime_sdk/controller/attendees.rb
|
@@ -158,29 +163,19 @@ files:
|
|
158
163
|
- spec/rails_app/app/assets/config/manifest.js
|
159
164
|
- spec/rails_app/app/assets/images/.keep
|
160
165
|
- spec/rails_app/app/assets/javascripts/.keep
|
166
|
+
- spec/rails_app/app/assets/javascripts/application.js
|
161
167
|
- spec/rails_app/app/assets/stylesheets/application.css
|
162
168
|
- spec/rails_app/app/assets/stylesheets/scaffolds.scss
|
163
169
|
- spec/rails_app/app/controllers/api/meeting_attendees_controller.rb
|
164
170
|
- spec/rails_app/app/controllers/api/meetings_controller.rb
|
171
|
+
- spec/rails_app/app/controllers/api/public/meeting_attendees_controller.rb
|
172
|
+
- spec/rails_app/app/controllers/api/public/meetings_controller.rb
|
165
173
|
- spec/rails_app/app/controllers/api/rooms_controller.rb
|
166
174
|
- spec/rails_app/app/controllers/application_controller.rb
|
167
175
|
- spec/rails_app/app/controllers/entries_controller.rb
|
168
176
|
- spec/rails_app/app/controllers/meeting_attendees_controller.rb
|
169
177
|
- spec/rails_app/app/controllers/meetings_controller.rb
|
170
178
|
- spec/rails_app/app/controllers/rooms_controller.rb
|
171
|
-
- spec/rails_app/app/controllers/spa_controller.rb
|
172
|
-
- spec/rails_app/app/javascript/App.vue
|
173
|
-
- spec/rails_app/app/javascript/channels/consumer.js
|
174
|
-
- spec/rails_app/app/javascript/channels/index.js
|
175
|
-
- spec/rails_app/app/javascript/components/DeviseTokenAuth.vue
|
176
|
-
- spec/rails_app/app/javascript/components/meetings/Index.vue
|
177
|
-
- spec/rails_app/app/javascript/components/meetings/Meeting.vue
|
178
|
-
- spec/rails_app/app/javascript/components/rooms/Index.vue
|
179
|
-
- spec/rails_app/app/javascript/components/rooms/Show.vue
|
180
|
-
- spec/rails_app/app/javascript/packs/application.js
|
181
|
-
- spec/rails_app/app/javascript/packs/spa.js
|
182
|
-
- spec/rails_app/app/javascript/router/index.js
|
183
|
-
- spec/rails_app/app/javascript/store/index.js
|
184
179
|
- spec/rails_app/app/models/application_record.rb
|
185
180
|
- spec/rails_app/app/models/entry.rb
|
186
181
|
- spec/rails_app/app/models/room.rb
|
@@ -198,15 +193,11 @@ files:
|
|
198
193
|
- spec/rails_app/app/views/rooms/new.html.erb
|
199
194
|
- spec/rails_app/app/views/rooms/show.html.erb
|
200
195
|
- spec/rails_app/app/views/rooms/show.json.jbuilder
|
201
|
-
- spec/rails_app/app/views/spa/index.html.erb
|
202
|
-
- spec/rails_app/babel.config.js
|
203
196
|
- spec/rails_app/bin/bundle
|
204
197
|
- spec/rails_app/bin/rails
|
205
198
|
- spec/rails_app/bin/rake
|
206
199
|
- spec/rails_app/bin/setup
|
207
200
|
- spec/rails_app/bin/spring
|
208
|
-
- spec/rails_app/bin/webpack
|
209
|
-
- spec/rails_app/bin/webpack-dev-server
|
210
201
|
- spec/rails_app/bin/yarn
|
211
202
|
- spec/rails_app/config.ru
|
212
203
|
- spec/rails_app/config/application.rb
|
@@ -237,12 +228,6 @@ files:
|
|
237
228
|
- spec/rails_app/config/secrets.yml
|
238
229
|
- spec/rails_app/config/spring.rb
|
239
230
|
- spec/rails_app/config/storage.yml
|
240
|
-
- spec/rails_app/config/webpack/development.js
|
241
|
-
- spec/rails_app/config/webpack/environment.js
|
242
|
-
- spec/rails_app/config/webpack/loaders/vue.js
|
243
|
-
- spec/rails_app/config/webpack/production.js
|
244
|
-
- spec/rails_app/config/webpack/test.js
|
245
|
-
- spec/rails_app/config/webpacker.yml
|
246
231
|
- spec/rails_app/db/migrate/20200912140231_devise_create_users.rb
|
247
232
|
- spec/rails_app/db/migrate/20200912140352_add_tokens_to_users.rb
|
248
233
|
- spec/rails_app/db/migrate/20200912140657_create_rooms.rb
|
@@ -250,8 +235,6 @@ files:
|
|
250
235
|
- spec/rails_app/db/schema.rb
|
251
236
|
- spec/rails_app/db/seeds.rb
|
252
237
|
- spec/rails_app/log/.keep
|
253
|
-
- spec/rails_app/package.json
|
254
|
-
- spec/rails_app/postcss.config.js
|
255
238
|
- spec/rails_app/public/404.html
|
256
239
|
- spec/rails_app/public/422.html
|
257
240
|
- spec/rails_app/public/500.html
|
@@ -261,11 +244,12 @@ files:
|
|
261
244
|
- spec/requests/atendees_spec.rb
|
262
245
|
- spec/requests/meetings_spec.rb
|
263
246
|
- spec/spec_helper.rb
|
247
|
+
- templates/amazon-chime-sdk-policy.yml
|
264
248
|
homepage: https://github.com/simukappu/amazon-chime-sdk-rails
|
265
249
|
licenses:
|
266
250
|
- MIT
|
267
251
|
metadata: {}
|
268
|
-
post_install_message:
|
252
|
+
post_install_message:
|
269
253
|
rdoc_options: []
|
270
254
|
require_paths:
|
271
255
|
- lib
|
@@ -280,8 +264,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
264
|
- !ruby/object:Gem::Version
|
281
265
|
version: '0'
|
282
266
|
requirements: []
|
283
|
-
rubygems_version: 3.
|
284
|
-
signing_key:
|
267
|
+
rubygems_version: 3.2.33
|
268
|
+
signing_key:
|
285
269
|
specification_version: 4
|
286
270
|
summary: Server-side implementation of Amazon Chime SDK for Ruby on Rails application
|
287
271
|
test_files:
|
@@ -295,29 +279,19 @@ test_files:
|
|
295
279
|
- spec/rails_app/app/assets/config/manifest.js
|
296
280
|
- spec/rails_app/app/assets/images/.keep
|
297
281
|
- spec/rails_app/app/assets/javascripts/.keep
|
282
|
+
- spec/rails_app/app/assets/javascripts/application.js
|
298
283
|
- spec/rails_app/app/assets/stylesheets/application.css
|
299
284
|
- spec/rails_app/app/assets/stylesheets/scaffolds.scss
|
300
285
|
- spec/rails_app/app/controllers/api/meeting_attendees_controller.rb
|
301
286
|
- spec/rails_app/app/controllers/api/meetings_controller.rb
|
287
|
+
- spec/rails_app/app/controllers/api/public/meeting_attendees_controller.rb
|
288
|
+
- spec/rails_app/app/controllers/api/public/meetings_controller.rb
|
302
289
|
- spec/rails_app/app/controllers/api/rooms_controller.rb
|
303
290
|
- spec/rails_app/app/controllers/application_controller.rb
|
304
291
|
- spec/rails_app/app/controllers/entries_controller.rb
|
305
292
|
- spec/rails_app/app/controllers/meeting_attendees_controller.rb
|
306
293
|
- spec/rails_app/app/controllers/meetings_controller.rb
|
307
294
|
- spec/rails_app/app/controllers/rooms_controller.rb
|
308
|
-
- spec/rails_app/app/controllers/spa_controller.rb
|
309
|
-
- spec/rails_app/app/javascript/App.vue
|
310
|
-
- spec/rails_app/app/javascript/channels/consumer.js
|
311
|
-
- spec/rails_app/app/javascript/channels/index.js
|
312
|
-
- spec/rails_app/app/javascript/components/DeviseTokenAuth.vue
|
313
|
-
- spec/rails_app/app/javascript/components/meetings/Index.vue
|
314
|
-
- spec/rails_app/app/javascript/components/meetings/Meeting.vue
|
315
|
-
- spec/rails_app/app/javascript/components/rooms/Index.vue
|
316
|
-
- spec/rails_app/app/javascript/components/rooms/Show.vue
|
317
|
-
- spec/rails_app/app/javascript/packs/application.js
|
318
|
-
- spec/rails_app/app/javascript/packs/spa.js
|
319
|
-
- spec/rails_app/app/javascript/router/index.js
|
320
|
-
- spec/rails_app/app/javascript/store/index.js
|
321
295
|
- spec/rails_app/app/models/application_record.rb
|
322
296
|
- spec/rails_app/app/models/entry.rb
|
323
297
|
- spec/rails_app/app/models/room.rb
|
@@ -335,15 +309,11 @@ test_files:
|
|
335
309
|
- spec/rails_app/app/views/rooms/new.html.erb
|
336
310
|
- spec/rails_app/app/views/rooms/show.html.erb
|
337
311
|
- spec/rails_app/app/views/rooms/show.json.jbuilder
|
338
|
-
- spec/rails_app/app/views/spa/index.html.erb
|
339
|
-
- spec/rails_app/babel.config.js
|
340
312
|
- spec/rails_app/bin/bundle
|
341
313
|
- spec/rails_app/bin/rails
|
342
314
|
- spec/rails_app/bin/rake
|
343
315
|
- spec/rails_app/bin/setup
|
344
316
|
- spec/rails_app/bin/spring
|
345
|
-
- spec/rails_app/bin/webpack
|
346
|
-
- spec/rails_app/bin/webpack-dev-server
|
347
317
|
- spec/rails_app/bin/yarn
|
348
318
|
- spec/rails_app/config.ru
|
349
319
|
- spec/rails_app/config/application.rb
|
@@ -374,12 +344,6 @@ test_files:
|
|
374
344
|
- spec/rails_app/config/secrets.yml
|
375
345
|
- spec/rails_app/config/spring.rb
|
376
346
|
- spec/rails_app/config/storage.yml
|
377
|
-
- spec/rails_app/config/webpack/development.js
|
378
|
-
- spec/rails_app/config/webpack/environment.js
|
379
|
-
- spec/rails_app/config/webpack/loaders/vue.js
|
380
|
-
- spec/rails_app/config/webpack/production.js
|
381
|
-
- spec/rails_app/config/webpack/test.js
|
382
|
-
- spec/rails_app/config/webpacker.yml
|
383
347
|
- spec/rails_app/db/migrate/20200912140231_devise_create_users.rb
|
384
348
|
- spec/rails_app/db/migrate/20200912140352_add_tokens_to_users.rb
|
385
349
|
- spec/rails_app/db/migrate/20200912140657_create_rooms.rb
|
@@ -387,8 +351,6 @@ test_files:
|
|
387
351
|
- spec/rails_app/db/schema.rb
|
388
352
|
- spec/rails_app/db/seeds.rb
|
389
353
|
- spec/rails_app/log/.keep
|
390
|
-
- spec/rails_app/package.json
|
391
|
-
- spec/rails_app/postcss.config.js
|
392
354
|
- spec/rails_app/public/404.html
|
393
355
|
- spec/rails_app/public/422.html
|
394
356
|
- spec/rails_app/public/500.html
|
data/.travis.yml
DELETED
@@ -1,47 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
|
3
|
-
branches:
|
4
|
-
except:
|
5
|
-
- images
|
6
|
-
|
7
|
-
rvm:
|
8
|
-
# - 2.7.2
|
9
|
-
- 2.6.6
|
10
|
-
|
11
|
-
gemfile:
|
12
|
-
- gemfiles/Gemfile.rails-5.0
|
13
|
-
- gemfiles/Gemfile.rails-5.1
|
14
|
-
- gemfiles/Gemfile.rails-5.2
|
15
|
-
- gemfiles/Gemfile.rails-6.0
|
16
|
-
|
17
|
-
matrix:
|
18
|
-
include:
|
19
|
-
- rvm: ruby-head
|
20
|
-
gemfile: Gemfile
|
21
|
-
allow_failures:
|
22
|
-
- rvm: ruby-head
|
23
|
-
fast_finish: true
|
24
|
-
|
25
|
-
sudo: false
|
26
|
-
|
27
|
-
cache: bundler
|
28
|
-
|
29
|
-
before_install:
|
30
|
-
- gem install bundler
|
31
|
-
- nvm install node
|
32
|
-
|
33
|
-
install:
|
34
|
-
- bundle install
|
35
|
-
|
36
|
-
before_script:
|
37
|
-
- cd spec/rails_app
|
38
|
-
- yarn --check-files
|
39
|
-
- bundle exec rails webpacker:compile
|
40
|
-
- bundle exec rails g chime_sdk:js
|
41
|
-
- cd -
|
42
|
-
|
43
|
-
script:
|
44
|
-
- bundle exec rspec
|
45
|
-
|
46
|
-
notifications:
|
47
|
-
email: true
|
@@ -1,50 +0,0 @@
|
|
1
|
-
<template>
|
2
|
-
<div>
|
3
|
-
<div>
|
4
|
-
<strong><router-link v-bind:to="{ name: 'Root' }">SPA with Rails API</router-link></strong>
|
5
|
-
<a href="/">Rails App with Action View</a>
|
6
|
-
</div>
|
7
|
-
<div>
|
8
|
-
<strong>Rails Application for Amazon Chime SDK Meeting (SPA with Rails API)</strong>
|
9
|
-
</div>
|
10
|
-
<div>
|
11
|
-
<div v-if="userSignedIn">
|
12
|
-
{{ currentUser.name }}
|
13
|
-
<router-link v-bind:to="{ name: 'SignOut' }">Logout</router-link>
|
14
|
-
</div>
|
15
|
-
<div v-else>
|
16
|
-
<router-link v-bind:to="{ name: 'SignIn' }">Login</router-link>
|
17
|
-
</div>
|
18
|
-
</div>
|
19
|
-
<router-view />
|
20
|
-
</div>
|
21
|
-
</template>
|
22
|
-
|
23
|
-
<script>
|
24
|
-
import Vue from 'vue'
|
25
|
-
import axios from 'axios'
|
26
|
-
|
27
|
-
axios.defaults.baseURL = "/api/v1"
|
28
|
-
|
29
|
-
export default {
|
30
|
-
name: 'App',
|
31
|
-
computed: {
|
32
|
-
userSignedIn: function () {
|
33
|
-
return this.$store.getters.userSignedIn;
|
34
|
-
},
|
35
|
-
currentUser: function () {
|
36
|
-
return this.$store.getters.currentUser;
|
37
|
-
}
|
38
|
-
},
|
39
|
-
created () {
|
40
|
-
if (this.$store.getters.userSignedIn) {
|
41
|
-
for (var authHeader of Object.keys(this.$store.getters.authHeaders)) {
|
42
|
-
axios.defaults.headers.common[authHeader] = this.$store.getters.authHeaders[authHeader];
|
43
|
-
}
|
44
|
-
}
|
45
|
-
}
|
46
|
-
}
|
47
|
-
</script>
|
48
|
-
|
49
|
-
<style scoped>
|
50
|
-
</style>
|
@@ -1,6 +0,0 @@
|
|
1
|
-
// Action Cable provides the framework to deal with WebSockets in Rails.
|
2
|
-
// You can generate new channels where WebSocket features live using the `rails generate channel` command.
|
3
|
-
|
4
|
-
import { createConsumer } from "@rails/actioncable"
|
5
|
-
|
6
|
-
export default createConsumer()
|