Skip to content

Commit c5e121d

Browse files
authored
Merge pull request #712 from rubyforgood/709-organization-email-text
Default Organization Email Text
2 parents c344b46 + e438c6f commit c5e121d

40 files changed

+7231
-46
lines changed

.babelrc

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"presets": [
3+
["env", {
4+
"modules": false,
5+
"targets": {
6+
"browsers": "> 1%",
7+
"uglify": true
8+
},
9+
"useBuiltIns": true
10+
}]
11+
],
12+
13+
"plugins": [
14+
"syntax-dynamic-import",
15+
"transform-object-rest-spread",
16+
["transform-class-properties", { "spec": true }]
17+
]
18+
}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,8 @@ pdx_db_test
4949
# Ignore Docker stuff (see issues #503, #603)
5050
Dockerfile
5151
docker-compose.yml
52+
/public/packs
53+
/public/packs-test
54+
/node_modules
55+
yarn-debug.log*
56+
.yarn-integrity

.postcssrc.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
plugins:
2+
postcss-import: {}
3+
postcss-cssnext: {}

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ AllCops:
1818
- "Vagrantfile"
1919
- "Rakefile"
2020
- "tmp/*"
21+
- "node_modules/**/*"
2122
UseCache: false
2223
Bundler/OrderedGems:
2324
Enabled: false

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,20 @@ sudo: required
33
addons:
44
chrome: stable
55
postgresql: "9.6"
6+
cache:
7+
bundler: true
8+
yarn: true
9+
directories:
10+
- node_modules
611
before_install:
712
- gem update --system
813
- gem install bundler
14+
install:
15+
- bundle install
16+
- nvm install node
17+
- node -v
18+
- npm i -g yarn
19+
- yarn install
920
script:
1021
- export RAILS_ENV=test
1122
- bundle exec rake db:create db:migrate

Gemfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ gem "therubyracer", "~> 0.12", platforms: :ruby
4444
gem "yajl-ruby"
4545
gem "toastr-rails"
4646
gem "sucker_punch", "~> 2.0"
47+
gem "actiontext", github: "kobaltz/actiontext", branch: "archive", require: "action_text"
48+
gem "image_processing"
49+
gem "webpacker", "~> 3.5"
4750

4851
group :development, :test do
4952
gem "awesome_print"

Gemfile.lock

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
GIT
2+
remote: https://github.com/kobaltz/actiontext.git
3+
revision: ef59c4ba99d1b7614dd47f5a294eef553224db88
4+
branch: archive
5+
specs:
6+
actiontext (0.1.0)
7+
nokogiri
8+
rails (>= 5.2.0)
9+
110
GEM
211
remote: https://rubygems.org/
312
specs:
@@ -194,6 +203,9 @@ GEM
194203
hashdiff (0.3.7)
195204
i18n (1.3.0)
196205
concurrent-ruby (~> 1.0)
206+
image_processing (1.7.1)
207+
mini_magick (~> 4.0)
208+
ruby-vips (>= 2.0.13, < 3)
197209
io-like (0.3.0)
198210
jaro_winkler (1.5.1)
199211
jbuilder (2.8.0)
@@ -225,6 +237,7 @@ GEM
225237
mime-types-data (~> 3.2015)
226238
mime-types-data (3.2018.0812)
227239
mimemagic (0.3.2)
240+
mini_magick (4.9.2)
228241
mini_mime (1.0.1)
229242
mini_portile2 (2.3.0)
230243
minitest (5.11.3)
@@ -274,6 +287,8 @@ GEM
274287
rack (2.0.6)
275288
rack-protection (2.0.4)
276289
rack
290+
rack-proxy (0.6.5)
291+
rack
277292
rack-test (1.1.0)
278293
rack (>= 1.0, < 3)
279294
rails (5.2.2)
@@ -356,6 +371,8 @@ GEM
356371
unicode-display_width (~> 1.4.0)
357372
ruby-graphviz (1.2.3)
358373
ruby-progressbar (1.10.0)
374+
ruby-vips (2.0.13)
375+
ffi (~> 1.9)
359376
ruby_dep (1.5.0)
360377
rubyzip (1.2.2)
361378
safe_yaml (1.0.4)
@@ -433,6 +450,10 @@ GEM
433450
addressable (>= 2.3.6)
434451
crack (>= 0.3.2)
435452
hashdiff
453+
webpacker (3.5.5)
454+
activesupport (>= 4.2)
455+
rack-proxy (>= 0.6.1)
456+
railties (>= 4.2)
436457
websocket-driver (0.7.0)
437458
websocket-extensions (>= 0.1.0)
438459
websocket-extensions (0.1.3)
@@ -444,6 +465,7 @@ PLATFORMS
444465
ruby
445466

446467
DEPENDENCIES
468+
actiontext!
447469
annotate
448470
api-auth (~> 2.3)
449471
awesome_print
@@ -477,6 +499,7 @@ DEPENDENCIES
477499
geocoder
478500
groupdate (~> 4.1)
479501
guard-rspec
502+
image_processing
480503
jbuilder
481504
jquery-rails
482505
jquery-ui-rails
@@ -512,6 +535,7 @@ DEPENDENCIES
512535
uglifier (>= 1.3.0)
513536
web-console
514537
webmock (~> 3.5)
538+
webpacker (~> 3.5)
515539
yajl-ruby
516540

517541
RUBY VERSION
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
//
2+
// Provides a drop-in pointer for the default Trix stylesheet that will format the toolbar and
3+
// the trix-editor content (whether displayed or under editing). Feel free to incorporate this
4+
// inclusion directly in any other asset bundle and remove this file.
5+
//
6+
//= require trix/dist/trix
7+
8+
// We need to override trix.css’s image gallery styles to accommodate the
9+
// <action-text-attachment> element we wrap around attachments. Otherwise,
10+
// images in galleries will be squished by the max-width: 33%; rule.
11+
.trix-content {
12+
.attachment-gallery {
13+
> action-text-attachment,
14+
> .attachment {
15+
flex: 1 0 33%;
16+
padding: 0 0.5em;
17+
max-width: 33%;
18+
}
19+
20+
&.attachment-gallery--2,
21+
&.attachment-gallery--4 {
22+
> action-text-attachment,
23+
> .attachment {
24+
flex-basis: 50%;
25+
max-width: 50%;
26+
}
27+
}
28+
}
29+
30+
action-text-attachment {
31+
.attachment {
32+
padding: 0 !important;
33+
max-width: 100% !important;
34+
}
35+
}
36+
}

app/assets/stylesheets/application.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*= require ionicons
1616
*= require bootstrap.min
1717
*= require fullcalendar
18+
*= require actiontext
1819
*/
1920

2021
//Use @import in order to process SCSS variables

app/controllers/admin/organizations_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def destroy
5151

5252
def organization_params
5353
params.require(:organization)
54-
.permit(:name, :short_name, :street, :city, :state, :zipcode, :email, :url, :logo, :intake_location,
54+
.permit(:name, :short_name, :street, :city, :state, :zipcode, :email, :url, :logo, :intake_location, :default_email_text,
5555
users_attributes: %i(name email password password_confirmation organization_admin))
5656
end
5757
end

0 commit comments

Comments
 (0)