Skip to content

Commit 6c59d1a

Browse files
Merge pull request #34 from MITLibraries/engx-175-rebuild
Complete rebuild of theme setup
2 parents 4e5307a + 47515e6 commit 6c59d1a

File tree

84 files changed

+1130
-146
lines changed

Some content is hidden

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

84 files changed

+1130
-146
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#### Developer
2+
3+
- [ ] All new ENV is documented in README
4+
- [ ] All new ENV has been added to Heroku Pipeline, Staging and Prod
5+
- [ ] ANDI or Wave has been run in accordance to
6+
[our guide](https://mitlibraries.github.io/guides/basics/a11y.html) and
7+
all issues introduced by these changes have been resolved or opened as new
8+
issues (link to those issues in the Pull Request details above)
9+
- [ ] Stakeholder approval has been confirmed (or is not needed)
10+
11+
#### Code Reviewer
12+
13+
- [ ] The commit message is clear and follows our guidelines
14+
(not just this pull request message)
15+
- [ ] There are appropriate tests covering any new functionality
16+
- [ ] The documentation has been updated or is unnecessary
17+
- [ ] The changes have been verified
18+
- [ ] New dependencies are appropriate or there were no changes
19+
20+
#### Requires database migrations?
21+
22+
YES | NO
23+
24+
#### Includes new or updated dependencies?
25+
26+
YES | NO
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [ main ]
5+
pull_request:
6+
branches: [ main ]
7+
8+
jobs:
9+
shared:
10+
uses: mitlibraries/.github/.github/workflows/ruby-shared-ci.yml@main

.gitignore

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
/.bundle/
2-
/.yardoc
3-
/_yardoc/
42
/coverage/
53
/doc/
4+
/log/*.log
65
/pkg/
7-
/spec/reports/
86
/tmp/
7+
/test/dummy/db/*.sqlite3
8+
/test/dummy/db/*.sqlite3-*
9+
/test/dummy/log/*.log
10+
/test/dummy/storage/
11+
/test/dummy/tmp/
12+
913
.DS_Store
10-
*.gem

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.1.2

Gemfile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
source 'https://rubygems.org'
2-
3-
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
43

54
# Specify your gem's dependencies in mitlibraries-theme.gemspec
65
gemspec
6+
7+
gem "sqlite3"
8+
9+
gem "sprockets-rails"
10+
11+
# Start debugger with binding.b [https://github.com/ruby/debug]
12+
# gem "debug", ">= 1.0.0"

Gemfile.lock

Lines changed: 108 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,98 +1,104 @@
11
PATH
22
remote: .
33
specs:
4-
mitlibraries-theme (0.7.0)
5-
rails (>= 5, < 8)
6-
sassc (~> 2)
4+
mitlibraries-theme (0.9.0)
5+
rails (>= 6, < 8)
6+
sassc-rails (~> 2)
77

88
GEM
99
remote: https://rubygems.org/
1010
specs:
11-
actioncable (7.0.2.3)
12-
actionpack (= 7.0.2.3)
13-
activesupport (= 7.0.2.3)
11+
actioncable (7.0.3.1)
12+
actionpack (= 7.0.3.1)
13+
activesupport (= 7.0.3.1)
1414
nio4r (~> 2.0)
1515
websocket-driver (>= 0.6.1)
16-
actionmailbox (7.0.2.3)
17-
actionpack (= 7.0.2.3)
18-
activejob (= 7.0.2.3)
19-
activerecord (= 7.0.2.3)
20-
activestorage (= 7.0.2.3)
21-
activesupport (= 7.0.2.3)
16+
actionmailbox (7.0.3.1)
17+
actionpack (= 7.0.3.1)
18+
activejob (= 7.0.3.1)
19+
activerecord (= 7.0.3.1)
20+
activestorage (= 7.0.3.1)
21+
activesupport (= 7.0.3.1)
2222
mail (>= 2.7.1)
2323
net-imap
2424
net-pop
2525
net-smtp
26-
actionmailer (7.0.2.3)
27-
actionpack (= 7.0.2.3)
28-
actionview (= 7.0.2.3)
29-
activejob (= 7.0.2.3)
30-
activesupport (= 7.0.2.3)
26+
actionmailer (7.0.3.1)
27+
actionpack (= 7.0.3.1)
28+
actionview (= 7.0.3.1)
29+
activejob (= 7.0.3.1)
30+
activesupport (= 7.0.3.1)
3131
mail (~> 2.5, >= 2.5.4)
3232
net-imap
3333
net-pop
3434
net-smtp
3535
rails-dom-testing (~> 2.0)
36-
actionpack (7.0.2.3)
37-
actionview (= 7.0.2.3)
38-
activesupport (= 7.0.2.3)
36+
actionpack (7.0.3.1)
37+
actionview (= 7.0.3.1)
38+
activesupport (= 7.0.3.1)
3939
rack (~> 2.0, >= 2.2.0)
4040
rack-test (>= 0.6.3)
4141
rails-dom-testing (~> 2.0)
4242
rails-html-sanitizer (~> 1.0, >= 1.2.0)
43-
actiontext (7.0.2.3)
44-
actionpack (= 7.0.2.3)
45-
activerecord (= 7.0.2.3)
46-
activestorage (= 7.0.2.3)
47-
activesupport (= 7.0.2.3)
43+
actiontext (7.0.3.1)
44+
actionpack (= 7.0.3.1)
45+
activerecord (= 7.0.3.1)
46+
activestorage (= 7.0.3.1)
47+
activesupport (= 7.0.3.1)
4848
globalid (>= 0.6.0)
4949
nokogiri (>= 1.8.5)
50-
actionview (7.0.2.3)
51-
activesupport (= 7.0.2.3)
50+
actionview (7.0.3.1)
51+
activesupport (= 7.0.3.1)
5252
builder (~> 3.1)
5353
erubi (~> 1.4)
5454
rails-dom-testing (~> 2.0)
5555
rails-html-sanitizer (~> 1.1, >= 1.2.0)
56-
activejob (7.0.2.3)
57-
activesupport (= 7.0.2.3)
56+
activejob (7.0.3.1)
57+
activesupport (= 7.0.3.1)
5858
globalid (>= 0.3.6)
59-
activemodel (7.0.2.3)
60-
activesupport (= 7.0.2.3)
61-
activerecord (7.0.2.3)
62-
activemodel (= 7.0.2.3)
63-
activesupport (= 7.0.2.3)
64-
activestorage (7.0.2.3)
65-
actionpack (= 7.0.2.3)
66-
activejob (= 7.0.2.3)
67-
activerecord (= 7.0.2.3)
68-
activesupport (= 7.0.2.3)
59+
activemodel (7.0.3.1)
60+
activesupport (= 7.0.3.1)
61+
activerecord (7.0.3.1)
62+
activemodel (= 7.0.3.1)
63+
activesupport (= 7.0.3.1)
64+
activestorage (7.0.3.1)
65+
actionpack (= 7.0.3.1)
66+
activejob (= 7.0.3.1)
67+
activerecord (= 7.0.3.1)
68+
activesupport (= 7.0.3.1)
6969
marcel (~> 1.0)
7070
mini_mime (>= 1.1.0)
71-
activesupport (7.0.2.3)
71+
activesupport (7.0.3.1)
7272
concurrent-ruby (~> 1.0, >= 1.0.2)
7373
i18n (>= 1.6, < 2)
7474
minitest (>= 5.1)
7575
tzinfo (~> 2.0)
7676
builder (3.2.4)
7777
concurrent-ruby (1.1.10)
7878
crass (1.0.6)
79+
debug (1.6.2)
80+
irb (>= 1.3.6)
81+
reline (>= 0.3.1)
7982
digest (3.1.0)
80-
erubi (1.10.0)
83+
docile (1.4.0)
84+
erubi (1.11.0)
8185
ffi (1.15.5)
8286
globalid (1.0.0)
8387
activesupport (>= 5.0)
84-
i18n (1.10.0)
88+
i18n (1.12.0)
8589
concurrent-ruby (~> 1.0)
86-
loofah (2.16.0)
90+
io-console (0.5.11)
91+
irb (1.4.1)
92+
reline (>= 0.3.0)
93+
loofah (2.18.0)
8794
crass (~> 1.0.2)
8895
nokogiri (>= 1.5.9)
8996
mail (2.7.1)
9097
mini_mime (>= 0.1.1)
9198
marcel (1.0.2)
9299
method_source (1.0.0)
93100
mini_mime (1.1.2)
94-
mini_portile2 (2.8.0)
95-
minitest (5.14.4)
101+
minitest (5.16.3)
96102
net-imap (0.2.3)
97103
digest
98104
net-protocol
@@ -108,60 +114,85 @@ GEM
108114
net-protocol
109115
timeout
110116
nio4r (2.5.8)
111-
nokogiri (1.13.3)
112-
mini_portile2 (~> 2.8.0)
117+
nokogiri (1.13.8-x86_64-darwin)
113118
racc (~> 1.4)
114119
racc (1.6.0)
115-
rack (2.2.3)
116-
rack-test (1.1.0)
117-
rack (>= 1.0, < 3)
118-
rails (7.0.2.3)
119-
actioncable (= 7.0.2.3)
120-
actionmailbox (= 7.0.2.3)
121-
actionmailer (= 7.0.2.3)
122-
actionpack (= 7.0.2.3)
123-
actiontext (= 7.0.2.3)
124-
actionview (= 7.0.2.3)
125-
activejob (= 7.0.2.3)
126-
activemodel (= 7.0.2.3)
127-
activerecord (= 7.0.2.3)
128-
activestorage (= 7.0.2.3)
129-
activesupport (= 7.0.2.3)
120+
rack (2.2.4)
121+
rack-test (2.0.2)
122+
rack (>= 1.3)
123+
rails (7.0.3.1)
124+
actioncable (= 7.0.3.1)
125+
actionmailbox (= 7.0.3.1)
126+
actionmailer (= 7.0.3.1)
127+
actionpack (= 7.0.3.1)
128+
actiontext (= 7.0.3.1)
129+
actionview (= 7.0.3.1)
130+
activejob (= 7.0.3.1)
131+
activemodel (= 7.0.3.1)
132+
activerecord (= 7.0.3.1)
133+
activestorage (= 7.0.3.1)
134+
activesupport (= 7.0.3.1)
130135
bundler (>= 1.15.0)
131-
railties (= 7.0.2.3)
136+
railties (= 7.0.3.1)
132137
rails-dom-testing (2.0.3)
133138
activesupport (>= 4.2.0)
134139
nokogiri (>= 1.6)
135-
rails-html-sanitizer (1.4.2)
140+
rails-html-sanitizer (1.4.3)
136141
loofah (~> 2.3)
137-
railties (7.0.2.3)
138-
actionpack (= 7.0.2.3)
139-
activesupport (= 7.0.2.3)
142+
railties (7.0.3.1)
143+
actionpack (= 7.0.3.1)
144+
activesupport (= 7.0.3.1)
140145
method_source
141146
rake (>= 12.2)
142147
thor (~> 1.0)
143148
zeitwerk (~> 2.5)
144-
rake (13.0.3)
149+
rake (13.0.6)
150+
reline (0.3.1)
151+
io-console (~> 0.5)
145152
sassc (2.4.0)
146153
ffi (~> 1.9)
147-
strscan (3.0.1)
154+
sassc-rails (2.1.2)
155+
railties (>= 4.0.0)
156+
sassc (>= 2.0)
157+
sprockets (> 3.0)
158+
sprockets-rails
159+
tilt
160+
simplecov (0.21.2)
161+
docile (~> 1.1)
162+
simplecov-html (~> 0.11)
163+
simplecov_json_formatter (~> 0.1)
164+
simplecov-html (0.12.3)
165+
simplecov-lcov (0.8.0)
166+
simplecov_json_formatter (0.1.4)
167+
sprockets (4.1.1)
168+
concurrent-ruby (~> 1.0)
169+
rack (> 1, < 3)
170+
sprockets-rails (3.4.2)
171+
actionpack (>= 5.2)
172+
activesupport (>= 5.2)
173+
sprockets (>= 3.0.0)
174+
sqlite3 (1.4.4)
175+
strscan (3.0.4)
148176
thor (1.2.1)
149-
timeout (0.2.0)
150-
tzinfo (2.0.4)
177+
tilt (2.0.11)
178+
timeout (0.3.0)
179+
tzinfo (2.0.5)
151180
concurrent-ruby (~> 1.0)
152181
websocket-driver (0.7.5)
153182
websocket-extensions (>= 0.1.0)
154183
websocket-extensions (0.1.5)
155-
zeitwerk (2.5.4)
184+
zeitwerk (2.6.0)
156185

157186
PLATFORMS
158-
ruby
187+
x86_64-darwin-19
159188

160189
DEPENDENCIES
161-
bundler (~> 2.0)
162-
minitest (~> 5.0)
190+
debug (~> 1)
163191
mitlibraries-theme!
164-
rake (~> 13.0)
192+
simplecov (~> 0)
193+
simplecov-lcov (~> 0)
194+
sprockets-rails
195+
sqlite3
165196

166197
BUNDLED WITH
167-
2.1.4
198+
2.3.7

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,19 @@ $ gem install mitlibraries-theme
2424

2525
## Usage
2626

27-
After you bundle, delete your application local `app/views/layouts/application.rb` to use the layout the gem provides.
27+
### Controllers
28+
29+
The gem includes a link helper class, which provides a function - `nav_link_to` - which renders links with particular classes and ARIA roles that are suited for site navigation. The default navigation partial at `app/views/layouts/_site_nav.html.erb` makes use of this function, and we recommend you copy this partial into your application with appropriate updates for your app.
30+
31+
In order to make this function available to your application, please add the following line near the top of your local `app/controllers/application_controller.rb`:
32+
33+
```ruby
34+
helper Mitlibraries::Theme::Engine.helpers
35+
```
36+
37+
### Layouts and stylesheets
38+
39+
After you update your controller and bundle, delete your application local `app/views/layouts/application.rb` to use the layout the gem provides.
2840

2941
Rename your `app/assets/stylesheets/application.css` to `app/assets/stylesheets/application.scss` and remove anything like:
3042

Rakefile

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
require 'bundler/gem_tasks'
2-
require 'rake/testtask'
1+
require "bundler/setup"
32

4-
Rake::TestTask.new(:test) do |t|
5-
t.libs << 'test'
6-
t.libs << 'lib'
7-
t.test_files = FileList['test/**/*_test.rb']
8-
end
3+
APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
4+
load "rails/tasks/engine.rake"
95

10-
task default: :test
6+
load "rails/tasks/statistics.rake"
7+
8+
require "bundler/gem_tasks"
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
//= link_directory ../stylesheets/mitlibraries/theme .css

app/assets/images/mitlibraries/theme/.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)