Skip to content

Commit c1023ff

Browse files
authored
Feature/sup 403 fix ruby example app styling (#36)
* adds correct styling to directory sync app * adds styling and UI fixes
1 parent d1773c5 commit c1023ff

File tree

9 files changed

+53
-8
lines changed

9 files changed

+53
-8
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.1
1+
2.7.2

ruby-directory-sync-example/Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ source 'https://rubygems.org'
55
gem 'dotenv'
66
gem 'sinatra'
77
gem 'workos'
8+
gem 'sinatra-websocket'
9+
gem 'pry'

ruby-directory-sync-example/Gemfile.lock

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,22 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4+
addressable (2.8.0)
5+
public_suffix (>= 2.0.2, < 5.0)
6+
coderay (1.1.3)
7+
daemons (1.4.1)
48
dotenv (2.7.6)
9+
em-websocket (0.3.8)
10+
addressable (>= 2.1.1)
11+
eventmachine (>= 0.12.9)
12+
eventmachine (1.2.7)
13+
method_source (1.0.0)
514
mustermann (1.1.1)
615
ruby2_keywords (~> 0.0.1)
16+
pry (0.14.1)
17+
coderay (~> 1.1)
18+
method_source (~> 1.0)
19+
public_suffix (4.0.7)
720
rack (2.2.3.1)
821
rack-protection (2.2.0)
922
rack
@@ -13,17 +26,27 @@ GEM
1326
rack (~> 2.2)
1427
rack-protection (= 2.2.0)
1528
tilt (~> 2.0)
16-
sorbet-runtime (0.5.9301)
29+
sinatra-websocket (0.3.1)
30+
em-websocket (~> 0.3.6)
31+
eventmachine
32+
thin (>= 1.3.1, < 2.0.0)
33+
sorbet-runtime (0.5.10076)
34+
thin (1.8.1)
35+
daemons (~> 1.0, >= 1.0.9)
36+
eventmachine (~> 1.0, >= 1.0.4)
37+
rack (>= 1, < 3)
1738
tilt (2.0.10)
18-
workos (1.6.1)
39+
workos (2.2.1)
1940
sorbet-runtime (~> 0.5)
2041

2142
PLATFORMS
2243
ruby
2344

2445
DEPENDENCIES
2546
dotenv
47+
pry
2648
sinatra
49+
sinatra-websocket
2750
workos
2851

2952
BUNDLED WITH

ruby-directory-sync-example/app.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
require 'workos'
77
require 'json'
88
require 'sinatra-websocket'
9+
require 'pry'
910

1011
set :server, 'thin'
1112
set :sockets, []
@@ -82,3 +83,4 @@
8283
render :json => {:status => 400, :error => "Webhook failed"} and return
8384
end
8485
end
86+

ruby-directory-sync-example/public/styles/styles.css

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,4 +193,9 @@ div.text_box {
193193
.button_outline {
194194
background-color: white;
195195
color: #6363f1;
196-
}
196+
}
197+
ul.no-bullets {
198+
list-style-type: none; /* Remove bullets */
199+
padding: 0; /* Remove padding */
200+
margin: 0; /* Remove margins */
201+
}

ruby-directory-sync-example/views/group.erb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@
3131
<div class="flex_column">
3232
<h2>User Profile</h2>
3333
<div class="text_box">
34-
<pre><%= JSON.pretty_generate(@group) %></pre>
34+
<ul class="no-bullets">
35+
<%@user.each do |key, value|%>
36+
<li><%=key%>: <%=value%></li>
37+
<%end%>
38+
</ul>
3539
</div>
3640
<h2>User's Groups</h2>
3741
<div class="text_box">

ruby-directory-sync-example/views/index.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<head>
2-
<link rel="stylesheet" href= <%= url("/stylesheets/styles.css")%>>
2+
<link rel="stylesheet" href= <%= url("styles/styles.css")%>>
33

44
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter">
55
</head>

ruby-directory-sync-example/views/user.erb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@
3131
<div class="flex_column">
3232
<h2>User Profile</h2>
3333
<div class="text_box">
34-
<pre><%= JSON.pretty_generate(@user) %></pre>
34+
<ul class="no-bullets">
35+
<%@user.each do |key, value|%>
36+
<li><%=key%>: <%=value%></li>
37+
<%end%>
38+
</ul>
3539
</div>
3640
<h2>User's Groups</h2>
3741
<div class="text_box">

ruby-directory-sync-example/views/webhooks.erb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
html>
1+
<head>
2+
<link rel="stylesheet" href= <%= url("/styles/styles.css")%>>
3+
4+
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Inter">
5+
</head>
6+
<html>
27
<div>
38
<h2>Webhook Details</h2>
49
</div>

0 commit comments

Comments
 (0)