Skip to content

Commit bbc8ae1

Browse files
authored
chore(TSE-848): Add Rails demo for the integration (#57)
1 parent 357c65d commit bbc8ae1

82 files changed

Lines changed: 1430 additions & 0 deletions

Some content is hidden

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

examples/demo/.gitattributes

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See https://git-scm.com/docs/gitattributes for more about git attribute files.
2+
3+
# Mark the database schema as having been generated.
4+
db/schema.rb linguist-generated
5+
6+
# Mark any vendored files as having been vendored.
7+
vendor/* linguist-vendored

examples/demo/.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
2+
#
3+
# If you find yourself ignoring temporary files generated by your text editor
4+
# or operating system, you probably want to add a global ignore instead:
5+
# git config --global core.excludesfile '~/.gitignore_global'
6+
7+
# Ignore bundler config.
8+
/.bundle
9+
10+
# Ignore the default SQLite database.
11+
/db/*.sqlite3
12+
/db/*.sqlite3-*
13+
14+
# Ignore all logfiles and tempfiles.
15+
/log/*
16+
/tmp/*
17+
!/log/.keep
18+
!/tmp/.keep
19+
20+
# Ignore pidfiles, but keep the directory.
21+
/tmp/pids/*
22+
!/tmp/pids/
23+
!/tmp/pids/.keep
24+
25+
# Ignore uploaded files in development.
26+
/storage/*
27+
!/storage/.keep
28+
/tmp/storage/*
29+
!/tmp/storage/
30+
!/tmp/storage/.keep
31+
32+
/public/assets
33+
34+
# Ignore master key for decrypting credentials and more.
35+
/config/master.key

examples/demo/Gemfile

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
source "https://rubygems.org"
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3+
4+
ruby "3.2.1"
5+
6+
# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
7+
gem "rails", "~> 7.0.7", ">= 7.0.7.2"
8+
9+
# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
10+
gem "sprockets-rails"
11+
12+
# Use sqlite3 as the database for Active Record
13+
gem "sqlite3", "~> 1.4"
14+
15+
# Use the Puma web server [https://github.com/puma/puma]
16+
gem "puma", "~> 5.0"
17+
18+
# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
19+
gem "importmap-rails"
20+
21+
# Hotwire's SPA-like page accelerator [https://turbo.hotwired.dev]
22+
gem "turbo-rails"
23+
24+
# Hotwire's modest JavaScript framework [https://stimulus.hotwired.dev]
25+
gem "stimulus-rails"
26+
27+
# Build JSON APIs with ease [https://github.com/rails/jbuilder]
28+
gem "jbuilder"
29+
30+
# Use Redis adapter to run Action Cable in production
31+
# gem "redis", "~> 4.0"
32+
33+
# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
34+
# gem "kredis"
35+
36+
# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword]
37+
# gem "bcrypt", "~> 3.1.7"
38+
39+
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
40+
gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ]
41+
42+
# Reduces boot times through caching; required in config/boot.rb
43+
gem "bootsnap", require: false
44+
45+
# Use Sass to process CSS
46+
# gem "sassc-rails"
47+
48+
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
49+
# gem "image_processing", "~> 1.2"
50+
51+
group :development, :test do
52+
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
53+
gem "debug", platforms: %i[ mri mingw x64_mingw ]
54+
end
55+
56+
group :development do
57+
# Use console on exceptions pages [https://github.com/rails/web-console]
58+
gem "web-console"
59+
60+
# Add speed badges [https://github.com/MiniProfiler/rack-mini-profiler]
61+
# gem "rack-mini-profiler"
62+
63+
# Speed up commands on slow machines / big apps [https://github.com/rails/spring]
64+
# gem "spring"
65+
end
66+
67+
group :test do
68+
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
69+
gem "capybara"
70+
gem "selenium-webdriver"
71+
gem "webdrivers"
72+
end
73+
74+
gem "phraseapp-in-context-editor-ruby", path: "../.." # Note this is using local version of the gem

examples/demo/Gemfile.lock

Lines changed: 268 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,268 @@
1+
PATH
2+
remote: ../..
3+
specs:
4+
phraseapp-in-context-editor-ruby (2.0.0)
5+
i18n (>= 1.0)
6+
json (>= 2.0)
7+
request_store (>= 1.2)
8+
9+
GEM
10+
remote: https://rubygems.org/
11+
specs:
12+
actioncable (7.0.7.2)
13+
actionpack (= 7.0.7.2)
14+
activesupport (= 7.0.7.2)
15+
nio4r (~> 2.0)
16+
websocket-driver (>= 0.6.1)
17+
actionmailbox (7.0.7.2)
18+
actionpack (= 7.0.7.2)
19+
activejob (= 7.0.7.2)
20+
activerecord (= 7.0.7.2)
21+
activestorage (= 7.0.7.2)
22+
activesupport (= 7.0.7.2)
23+
mail (>= 2.7.1)
24+
net-imap
25+
net-pop
26+
net-smtp
27+
actionmailer (7.0.7.2)
28+
actionpack (= 7.0.7.2)
29+
actionview (= 7.0.7.2)
30+
activejob (= 7.0.7.2)
31+
activesupport (= 7.0.7.2)
32+
mail (~> 2.5, >= 2.5.4)
33+
net-imap
34+
net-pop
35+
net-smtp
36+
rails-dom-testing (~> 2.0)
37+
actionpack (7.0.7.2)
38+
actionview (= 7.0.7.2)
39+
activesupport (= 7.0.7.2)
40+
rack (~> 2.0, >= 2.2.4)
41+
rack-test (>= 0.6.3)
42+
rails-dom-testing (~> 2.0)
43+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
44+
actiontext (7.0.7.2)
45+
actionpack (= 7.0.7.2)
46+
activerecord (= 7.0.7.2)
47+
activestorage (= 7.0.7.2)
48+
activesupport (= 7.0.7.2)
49+
globalid (>= 0.6.0)
50+
nokogiri (>= 1.8.5)
51+
actionview (7.0.7.2)
52+
activesupport (= 7.0.7.2)
53+
builder (~> 3.1)
54+
erubi (~> 1.4)
55+
rails-dom-testing (~> 2.0)
56+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
57+
activejob (7.0.7.2)
58+
activesupport (= 7.0.7.2)
59+
globalid (>= 0.3.6)
60+
activemodel (7.0.7.2)
61+
activesupport (= 7.0.7.2)
62+
activerecord (7.0.7.2)
63+
activemodel (= 7.0.7.2)
64+
activesupport (= 7.0.7.2)
65+
activestorage (7.0.7.2)
66+
actionpack (= 7.0.7.2)
67+
activejob (= 7.0.7.2)
68+
activerecord (= 7.0.7.2)
69+
activesupport (= 7.0.7.2)
70+
marcel (~> 1.0)
71+
mini_mime (>= 1.1.0)
72+
activesupport (7.0.7.2)
73+
concurrent-ruby (~> 1.0, >= 1.0.2)
74+
i18n (>= 1.6, < 2)
75+
minitest (>= 5.1)
76+
tzinfo (~> 2.0)
77+
addressable (2.8.5)
78+
public_suffix (>= 2.0.2, < 6.0)
79+
autoprefixer-rails (10.4.13.0)
80+
execjs (~> 2)
81+
bindex (0.8.1)
82+
bootsnap (1.16.0)
83+
msgpack (~> 1.2)
84+
bootstrap-sass (3.2.0.4)
85+
sass (~> 3.2)
86+
builder (3.2.4)
87+
capybara (3.39.2)
88+
addressable
89+
matrix
90+
mini_mime (>= 0.1.3)
91+
nokogiri (~> 1.8)
92+
rack (>= 1.6.0)
93+
rack-test (>= 0.6.3)
94+
regexp_parser (>= 1.5, < 3.0)
95+
xpath (~> 3.2)
96+
concurrent-ruby (1.2.2)
97+
crass (1.0.6)
98+
date (3.3.3)
99+
debug (1.8.0)
100+
irb (>= 1.5.0)
101+
reline (>= 0.3.1)
102+
erubi (1.12.0)
103+
execjs (2.8.1)
104+
ffi (1.15.5)
105+
globalid (1.2.0)
106+
activesupport (>= 6.1)
107+
i18n (1.14.1)
108+
concurrent-ruby (~> 1.0)
109+
importmap-rails (1.2.1)
110+
actionpack (>= 6.0.0)
111+
railties (>= 6.0.0)
112+
io-console (0.6.0)
113+
irb (1.8.0)
114+
rdoc (~> 6.5)
115+
reline (>= 0.3.6)
116+
jbuilder (2.11.5)
117+
actionview (>= 5.0.0)
118+
activesupport (>= 5.0.0)
119+
json (2.6.3)
120+
loofah (2.21.3)
121+
crass (~> 1.0.2)
122+
nokogiri (>= 1.12.0)
123+
mail (2.8.1)
124+
mini_mime (>= 0.1.1)
125+
net-imap
126+
net-pop
127+
net-smtp
128+
marcel (1.0.2)
129+
matrix (0.4.2)
130+
method_source (1.0.0)
131+
mini_mime (1.1.5)
132+
minitest (5.19.0)
133+
msgpack (1.7.2)
134+
net-imap (0.3.7)
135+
date
136+
net-protocol
137+
net-pop (0.1.2)
138+
net-protocol
139+
net-protocol (0.2.1)
140+
timeout
141+
net-smtp (0.3.3)
142+
net-protocol
143+
nio4r (2.5.9)
144+
nokogiri (1.15.4-arm64-darwin)
145+
racc (~> 1.4)
146+
psych (5.1.0)
147+
stringio
148+
public_suffix (5.0.3)
149+
puma (5.6.7)
150+
nio4r (~> 2.0)
151+
racc (1.7.1)
152+
rack (2.2.8)
153+
rack-test (2.1.0)
154+
rack (>= 1.3)
155+
rails (7.0.7.2)
156+
actioncable (= 7.0.7.2)
157+
actionmailbox (= 7.0.7.2)
158+
actionmailer (= 7.0.7.2)
159+
actionpack (= 7.0.7.2)
160+
actiontext (= 7.0.7.2)
161+
actionview (= 7.0.7.2)
162+
activejob (= 7.0.7.2)
163+
activemodel (= 7.0.7.2)
164+
activerecord (= 7.0.7.2)
165+
activestorage (= 7.0.7.2)
166+
activesupport (= 7.0.7.2)
167+
bundler (>= 1.15.0)
168+
railties (= 7.0.7.2)
169+
rails-dom-testing (2.2.0)
170+
activesupport (>= 5.0.0)
171+
minitest
172+
nokogiri (>= 1.6)
173+
rails-html-sanitizer (1.6.0)
174+
loofah (~> 2.21)
175+
nokogiri (~> 1.14)
176+
railties (7.0.7.2)
177+
actionpack (= 7.0.7.2)
178+
activesupport (= 7.0.7.2)
179+
method_source
180+
rake (>= 12.2)
181+
thor (~> 1.0)
182+
zeitwerk (~> 2.5)
183+
rake (13.0.6)
184+
rb-fsevent (0.11.2)
185+
rb-inotify (0.10.1)
186+
ffi (~> 1.0)
187+
rdoc (6.5.0)
188+
psych (>= 4.0.0)
189+
regexp_parser (2.8.1)
190+
reline (0.3.8)
191+
io-console (~> 0.5)
192+
request_store (1.5.1)
193+
rack (>= 1.4)
194+
rexml (3.2.6)
195+
rubyzip (2.3.2)
196+
sass (3.7.4)
197+
sass-listen (~> 4.0.0)
198+
sass-listen (4.0.0)
199+
rb-fsevent (~> 0.9, >= 0.9.4)
200+
rb-inotify (~> 0.9, >= 0.9.7)
201+
selenium-webdriver (4.10.0)
202+
rexml (~> 3.2, >= 3.2.5)
203+
rubyzip (>= 1.2.2, < 3.0)
204+
websocket (~> 1.0)
205+
sprockets (4.2.0)
206+
concurrent-ruby (~> 1.0)
207+
rack (>= 2.2.4, < 4)
208+
sprockets-rails (3.4.2)
209+
actionpack (>= 5.2)
210+
activesupport (>= 5.2)
211+
sprockets (>= 3.0.0)
212+
sqlite3 (1.6.4-arm64-darwin)
213+
stimulus-rails (1.2.2)
214+
railties (>= 6.0.0)
215+
stringio (3.0.8)
216+
thor (1.2.2)
217+
timeout (0.4.0)
218+
turbo-rails (1.4.0)
219+
actionpack (>= 6.0.0)
220+
activejob (>= 6.0.0)
221+
railties (>= 6.0.0)
222+
tzinfo (2.0.6)
223+
concurrent-ruby (~> 1.0)
224+
web-console (4.2.0)
225+
actionview (>= 6.0.0)
226+
activemodel (>= 6.0.0)
227+
bindex (>= 0.4.0)
228+
railties (>= 6.0.0)
229+
webdrivers (5.3.1)
230+
nokogiri (~> 1.6)
231+
rubyzip (>= 1.3.0)
232+
selenium-webdriver (~> 4.0, < 4.11)
233+
websocket (1.2.9)
234+
websocket-driver (0.7.6)
235+
websocket-extensions (>= 0.1.0)
236+
websocket-extensions (0.1.5)
237+
xpath (3.2.0)
238+
nokogiri (~> 1.8)
239+
zeitwerk (2.6.11)
240+
241+
PLATFORMS
242+
arm64-darwin-22
243+
244+
DEPENDENCIES
245+
autoprefixer-rails
246+
bootsnap
247+
bootstrap-sass (~> 3.2.0)
248+
capybara
249+
debug
250+
importmap-rails
251+
jbuilder
252+
phraseapp-in-context-editor-ruby!
253+
puma (~> 5.0)
254+
rails (~> 7.0.7, >= 7.0.7.2)
255+
selenium-webdriver
256+
sprockets-rails
257+
sqlite3 (~> 1.4)
258+
stimulus-rails
259+
turbo-rails
260+
tzinfo-data
261+
web-console
262+
webdrivers
263+
264+
RUBY VERSION
265+
ruby 3.2.1p31
266+
267+
BUNDLED WITH
268+
2.4.19

examples/demo/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# README
2+
3+
To demo ICE, run
4+
`rails s` and navigate to `http://127.0.0.1:3000`
5+
Login via the demo credentials `demo@phrase.com` / `phrase`

0 commit comments

Comments
 (0)