Skip to content

Commit ff4e4c7

Browse files
authored
Feature/sup 489 ruby update example app (#42)
* adds versioning for workos, tests new sdk version, updates readme, updates styling for Sinatra sso app * adds admin portal app with version control, and style changes * adds pinned versions with testing and new styling for magic link app * adds directory sync app changes: styling, pinning workos SDK version, correct github references, refactoring of view code to use layouts * adds rails app with updated styling, version control of newest workos release * adds styling, version pinning and updates mfa app for API payload * comments out super linter til we can get better granularity on what we want to lint * adds PR fixes and Rails app changes * adds styling to one more view
1 parent 17df6fb commit ff4e4c7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

70 files changed

+2038
-1348
lines changed

.github/workflows/super-linter.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,26 @@
44
# You can adjust the behavior by modifying this file.
55
# For more information, see:
66
# https://github.com/github/super-linter
7-
name: Lint Code Base
7+
# name: Lint Code Base
88

9-
on:
10-
push:
11-
branches: [ "main" ]
12-
pull_request:
13-
branches: [ "main" ]
14-
jobs:
15-
run-lint:
16-
runs-on: ubuntu-latest
17-
steps:
18-
- name: Checkout code
19-
uses: actions/checkout@v3
20-
with:
21-
# Full git history is needed to get a proper list of changed files within `super-linter`
22-
fetch-depth: 0
9+
# on:
10+
# push:
11+
# branches: [ "main" ]
12+
# pull_request:
13+
# branches: [ "main" ]
14+
# jobs:
15+
# run-lint:
16+
# runs-on: ubuntu-latest
17+
# steps:
18+
# - name: Checkout code
19+
# uses: actions/checkout@v3
20+
# with:
21+
# # Full git history is needed to get a proper list of changed files within `super-linter`
22+
# fetch-depth: 0
2323

24-
- name: Lint Code Base
25-
uses: github/super-linter@v4
26-
env:
27-
VALIDATE_ALL_CODEBASE: false
28-
DEFAULT_BRANCH: "main"
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
# - name: Lint Code Base
25+
# uses: github/super-linter@v4
26+
# env:
27+
# VALIDATE_ALL_CODEBASE: false
28+
# DEFAULT_BRANCH: "main"
29+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ruby and Rails Example Applications powered by WorkOS
22

3-
Example applications demonstrating to use the [WorkOS Ruby SDK](https://github.com/workos-inc/workos-ruby) for SSO, Directory Sync, Admin Portal and Magic Link.
3+
Example applications demonstrating to use the [WorkOS Ruby SDK](https://github.com/workos/workos-ruby) for SSO, Directory Sync, Admin Portal and Magic Link.
44

55
## For more information, please see the following guides:
66

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
WORKOS_API_KEY=<Replace with your key>
1+
WORKOS_API_KEY=<Replace with your key>
2+
WORKOS_CLIENT_ID=<Replace with your client ID>

ruby-admin-portal-example/Gemfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1+
# frozen_string_literal: true
2+
13
source 'https://rubygems.org'
24

3-
gem 'dotenv'
4-
gem 'sinatra'
5-
gem 'workos'
6-
gem 'pry'
5+
gem 'dotenv', '2.7.6'
6+
gem 'sinatra', '2.2.0'
7+
gem 'workos', '2.5.0'
Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,9 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
coderay (1.1.3)
54
dotenv (2.7.6)
6-
method_source (1.0.0)
75
mustermann (1.1.1)
86
ruby2_keywords (~> 0.0.1)
9-
pry (0.14.1)
10-
coderay (~> 1.1)
11-
method_source (~> 1.0)
127
rack (2.2.3.1)
138
rack-protection (2.2.0)
149
rack
@@ -18,19 +13,18 @@ GEM
1813
rack (~> 2.2)
1914
rack-protection (= 2.2.0)
2015
tilt (~> 2.0)
21-
sorbet-runtime (0.5.9475)
16+
sorbet-runtime (0.5.10263)
2217
tilt (2.0.10)
23-
workos (2.1.0)
18+
workos (2.5.0)
2419
sorbet-runtime (~> 0.5)
2520

2621
PLATFORMS
2722
ruby
2823

2924
DEPENDENCIES
30-
dotenv
31-
pry
32-
sinatra
33-
workos
25+
dotenv (= 2.7.6)
26+
sinatra (= 2.2.0)
27+
workos (= 2.5.0)
3428

3529
BUNDLED WITH
3630
2.1.4

ruby-admin-portal-example/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Ruby Example App with Admin Portal powered by WorkOS
22

3-
An example application demonstrating to use the [WorkOS Ruby SDK](https://github.com/workos-inc/workos-ruby) to access the Admin Portal for SSO and Directory Sync.
3+
An example application demonstrating to use the [WorkOS Ruby SDK](https://github.com/workos/workos-ruby) to access the Admin Portal for SSO and Directory Sync.
44

55
## Prerequisites
66

@@ -11,13 +11,13 @@ Ruby 2.7.2
1111
1. Clone the main repo and install dependencies for the app you'd like to use:
1212
```bash
1313
# HTTPS
14-
git clone https://github.com/workos-inc/ruby-example-applications.git
14+
git clone https://github.com/workos/ruby-example-applications.git
1515
```
1616
or
1717

1818
```bash
1919
# SSH
20-
git clone [email protected]:workos-inc/ruby-example-applications.git
20+
git clone [email protected]:workos/ruby-example-applications.git
2121
```
2222

2323
2. Navigate to the Admin Portal app within the cloned repo.

ruby-admin-portal-example/app.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
require 'sinatra'
33
require 'workos'
44
require 'json'
5-
require 'pry'
65

76
$organization
87

@@ -23,13 +22,10 @@
2322
name: organizationName,
2423
domains: domains
2524
)
26-
27-
erb :logged_in
2825
else
2926
$organization = organizations.data[0]
30-
erb :logged_in
3127
end
32-
28+
erb :admin_portal_launcher
3329
end
3430

3531
get('/dsync-admin-portal') do
32.9 KB
Loading

0 commit comments

Comments
 (0)