Skip to content

Commit c7a58bd

Browse files
authored
Merge pull request #1583 from scott/dev/2.8/prepare-2.8.0
Dev/2.8/prepare 2.8.0
2 parents c60f902 + f601a30 commit c7a58bd

File tree

12 files changed

+90
-36
lines changed

12 files changed

+90
-36
lines changed

CHANGELOG.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,40 @@
1+
## VERSION 2.8.0
2+
3+
Version 2.8 contains important security updates and the following new featuers:
4+
5+
- NEW It is now possible create users one at a time, with or without inviting them.
6+
- NEW When creating tickets by API, you can now specify the CC and BCC for the new ticket.
7+
- NEW A new API for viewing and editing taggings has been added (thanks @schmidt)
8+
- NEW A honeypot (anti spam) feature was added to the new ticket form (thanks @schmidt)
9+
- CHANGE Assigning an agent no longer automatically marks the ticket as "pending".
10+
- CHANGE The whitelist of allowable file attachments has been significantly changed and made more flexible (see upgrade notes below).
11+
- FIX A bug was fixed that displays the proper error message when a non supported file attachment is made in the web UI
12+
- FIX #1576 The right menu no longer gets stuck open when turbolinks is enabled
13+
- FIX #1581 Radio buttons are now properly aligned in the mobile responsive view of the Singular theme
14+
15+
IMPORTANT UPGRADE NOTES:
16+
17+
This release of Helpy includes a change to the way file attachments are handled. Previous
18+
versions used a default "whitelist" of file types where were allowed and was generally limited to
19+
the most common image and doc foramts.
20+
21+
This version adds configuration settings which can be modified by API that allow you to set your own
22+
whitelist of filetypes which should be allowed, or a blacklist of filetypes that should be rejected. In
23+
addition, the default whitelist has been removed, and Helpy now ships with a short blacklist of files that could be
24+
considered "risky." Files with these extensions are blacklisted by default:
25+
26+
```
27+
ade, adp, apk, appx, appxbundle, bat, cab, chm, cmd, com, cpl, dll, dmg, exe, hta, ins, isp, iso, jar, js, jse, lib,
28+
lnk, mde, msc, msi, msix, msixbundle, msp, mst, nsh, pif, ps1, scr, sct, .shb, sys, vb, vbe, vbs, vxd, wsc, wsf, wsh
29+
```
30+
31+
NOTE: Do not provide values for both blacklist and whitelist, as they will conflict and it will be impossible for
32+
customers to attach files.
33+
34+
135
## VERSION 2.7.0
236

3-
The 2.7 release of Helpy is here, with several great new features to help you b etter provide great customer support.
37+
The 2.7 release of Helpy is here, with several great new features to help you better provide great customer support.
438

539
New Features:
640

Gemfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ group :development, :test do
170170
gem 'scss-lint'
171171
gem 'awesome_print'
172172
gem 'rb-readline'
173+
gem 'capybara'
174+
173175
end
174176

175177
gem 'bulk_insert'
@@ -194,10 +196,10 @@ group :test do
194196
gem 'shoulda', '3.5' # Required for minitest
195197
gem 'shoulda-matchers', '~> 2.0' # Required for minitest
196198
gem 'factory_bot_rails'
197-
gem 'capybara', '< 3.0'
199+
gem 'webdrivers'
198200
gem 'capybara-email'
199-
gem 'selenium-webdriver'
200-
gem 'chromedriver-helper'
201+
gem 'selenium-webdriver', '3.141.0'
202+
# gem 'chromedriver-helper'
201203
gem 'launchy'
202204
gem "codeclimate-test-reporter",require: nil
203205
gem 'simplecov', :require => false

Gemfile.lock

+18-19
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,6 @@ GEM
6565
activerecord (>= 3.2, < 7.0)
6666
rake (>= 10.4, < 14.0)
6767
ansi (1.5.0)
68-
archive-zip (0.12.0)
69-
io-like (~> 0.3.0)
7068
arel (6.0.4)
7169
ast (2.4.0)
7270
attachinary (1.3.1)
@@ -100,13 +98,13 @@ GEM
10098
bundler (>= 1.2.0, < 3)
10199
thor (~> 0.18)
102100
byebug (10.0.2)
103-
capybara (2.18.0)
101+
capybara (3.9.0)
104102
addressable
105103
mini_mime (>= 0.1.3)
106-
nokogiri (>= 1.3.3)
107-
rack (>= 1.0.0)
108-
rack-test (>= 0.5.4)
109-
xpath (>= 2.0, < 4.0)
104+
nokogiri (~> 1.8)
105+
rack (>= 1.6.0)
106+
rack-test (>= 0.6.3)
107+
xpath (~> 3.1)
110108
capybara-email (3.0.1)
111109
capybara (>= 2.4, < 4.0)
112110
mail
@@ -117,10 +115,8 @@ GEM
117115
celluloid (0.16.0)
118116
timers (~> 4.0.0)
119117
chartkick (3.3.1)
120-
childprocess (3.0.0)
121-
chromedriver-helper (2.1.1)
122-
archive-zip (~> 0.10)
123-
nokogiri (~> 1.8)
118+
childprocess (0.9.0)
119+
ffi (~> 1.0, >= 1.0.11)
124120
client_side_validations (4.2.12)
125121
jquery-rails (>= 3.1.2, < 5.0.0)
126122
js_regex (~> 1.0, >= 1.0.19)
@@ -301,7 +297,6 @@ GEM
301297
inky-rb (1.3.7.5)
302298
foundation_emails (~> 2)
303299
nokogiri
304-
io-like (0.3.1)
305300
ipaddress (0.8.3)
306301
jaro_winkler (1.5.4)
307302
jbuilder (2.9.1)
@@ -534,7 +529,7 @@ GEM
534529
unicode-display_width (>= 1.4.0, < 1.7)
535530
ruby-progressbar (1.10.1)
536531
ruby2_keywords (0.0.2)
537-
rubyzip (2.2.0)
532+
rubyzip (1.3.0)
538533
sass (3.4.25)
539534
sass-rails (5.0.7)
540535
railties (>= 4.0.0, < 6)
@@ -552,9 +547,9 @@ GEM
552547
sdoc (1.0.0)
553548
rdoc (>= 5.0)
554549
selectize-rails (0.12.6)
555-
selenium-webdriver (3.142.7)
556-
childprocess (>= 0.5, < 4.0)
557-
rubyzip (>= 1.2.2)
550+
selenium-webdriver (3.141.0)
551+
childprocess (~> 0.5)
552+
rubyzip (~> 1.2, >= 1.2.2)
558553
shoulda (3.5.0)
559554
shoulda-context (~> 1.0, >= 1.0.1)
560555
shoulda-matchers (>= 1.4.1, < 3.0)
@@ -617,6 +612,10 @@ GEM
617612
activemodel (>= 4.2)
618613
debug_inspector
619614
railties (>= 4.2)
615+
webdrivers (4.2.0)
616+
nokogiri (~> 1.6)
617+
rubyzip (>= 1.3.0)
618+
selenium-webdriver (>= 3.0, < 4.0)
620619
xpath (3.2.0)
621620
nokogiri (~> 1.8)
622621

@@ -640,11 +639,10 @@ DEPENDENCIES
640639
bulk_insert
641640
bundler-audit
642641
byebug
643-
capybara (< 3.0)
642+
capybara
644643
capybara-email
645644
carrierwave (~> 1.3.1)
646645
chartkick
647-
chromedriver-helper
648646
client_side_validations
649647
client_side_validations-simple_form
650648
cloudinary (= 1.1.7)
@@ -731,7 +729,7 @@ DEPENDENCIES
731729
scss-lint
732730
sdoc (~> 1.0.0)
733731
selectize-rails
734-
selenium-webdriver
732+
selenium-webdriver (= 3.141.0)
735733
shoulda (= 3.5)
736734
shoulda-matchers (~> 2.0)
737735
simple_form
@@ -749,6 +747,7 @@ DEPENDENCIES
749747
uglifier (>= 1.3.0)
750748
unicorn
751749
web-console (~> 3.3)
750+
webdrivers
752751

753752
RUBY VERSION
754753
ruby 2.4.1p111

app/models/topic.rb

+3-2
Original file line numberDiff line numberDiff line change
@@ -152,13 +152,14 @@ def self.bulk_trash(post_attributes)
152152
def assign(user_id=2, assigned_to)
153153
self.posts.create(body: I18n.t(:assigned_message, assigned_to: User.find(assigned_to).name), kind: 'note', user_id: user_id)
154154
self.assigned_user_id = assigned_to
155-
self.current_status = 'pending'
155+
# self.current_status = 'pending'
156156
self.save
157157
end
158158

159159
def self.bulk_agent_assign(post_attributes, assigned_to)
160160
Post.bulk_insert values: post_attributes
161-
self.update_all(assigned_user_id: assigned_to, current_status: 'pending')
161+
#self.update_all(assigned_user_id: assigned_to, current_status: 'pending')
162+
self.update_all(assigned_user_id: assigned_to)
162163
end
163164

164165
def self.bulk_group_assign(post_attributes, assigned_group)

app/themes/flat/views/layouts/flat.html.erb

+5
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,11 @@ $('#right-menu').sidr({
119119
$('ul.nav').off().on('click', function(){
120120
$.sidr('close', 'nav');
121121
});
122+
123+
// Close menu before navigating so turbolinks does not cache menu open
124+
$(document).on('page:before-change', function () {
125+
$.sidr('close', 'nav');
126+
});
122127
</script>
123128
<%= "<script src='/assets/widget.v1.js'></script>".html_safe if AppSettings['widget.show_on_support_site'] == '1' %>
124129
<%= "#{AppSettings['design.footer_js']}".html_safe %>

app/themes/light/views/layouts/light.html.erb

+5
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,11 @@ $('#right-menu').sidr({
115115
}
116116
});
117117
118+
// Close menu before navigating so turbolinks does not cache menu open
119+
$(document).on('page:before-change', function () {
120+
$.sidr('close', 'nav');
121+
});
122+
118123
// Close menu on click
119124
$('ul.nav').off().on('click', function(){
120125
$.sidr('close', 'nav');

app/themes/nordic/views/layouts/nordic.html.erb

+5
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@ $('#right-menu').sidr({
132132
$('ul.nav').off().on('click', function(){
133133
$.sidr('close', 'nav');
134134
});
135+
136+
// Close menu before navigating so turbolinks does not cache menu open
137+
$(document).on('page:before-change', function () {
138+
$.sidr('close', 'nav');
139+
});
135140
</script>
136141
<%= "<script src='/assets/widget.v1.js'></script>".html_safe if AppSettings['widget.show_on_support_site'] == '1' %>
137142
<%= "#{AppSettings['design.footer_js']}".html_safe %>

app/themes/singular/assets/stylesheets/singular/singular.scss

+6-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ main {
2525
background-color: $body-bg;
2626
}
2727

28-
input,
28+
input:not([type=radio]),
2929
select {
3030
min-height: 60px;
3131
}
@@ -109,9 +109,6 @@ i.circle-icon {
109109
font-size: 150%;
110110
}
111111

112-
.article-block {
113-
}
114-
115112
i.circle-icon {
116113
display: inline-block;
117114
border-radius: 60px;
@@ -128,6 +125,11 @@ i.circle-icon {
128125
.article-icon {
129126
margin-bottom: 20px;
130127
}
128+
129+
select,
130+
input:not([type=radio]) {
131+
min-height: 20px;
132+
}
131133
}
132134

133135
@media(min-width:768px){
@@ -758,9 +760,6 @@ header {
758760
padding-bottom: 0;
759761
}
760762

761-
.navbar-form .input-group .form-control {
762-
}
763-
764763
.navbar-right {
765764
margin-right: -45px;
766765
}

app/themes/singular/views/layouts/singular.html.erb

+5
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,11 @@ $('#right-menu').sidr({
175175
$('ul.nav').off().on('click', function(){
176176
$.sidr('close', 'nav');
177177
});
178+
179+
// Close menu before navigating so turbolinks does not cache menu open
180+
$(document).on('page:before-change', function () {
181+
$.sidr('close', 'nav');
182+
});
178183
</script>
179184
<%= "<script src='/assets/widget.v1.js'></script>".html_safe if AppSettings['widget.show_on_support_site'] == '1' %>
180185
<%= "#{AppSettings['design.footer_js']}".html_safe %>

config/environment.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
Rails.application.initialize!
66

77
# Get the current tag version
8-
VERSION = '2.7.0'
8+
VERSION = '2.8.0'
99
REVISION = `git log --pretty=format:'%h' -n 1`
1010
APP_VERSION = "#{VERSION}:#{REVISION}"

test/controllers/admin/topics_controller_test.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -541,7 +541,7 @@ class Admin::TopicsControllerTest < ActionController::TestCase
541541
spam_topics = Topic.where(current_status: 'spam').all
542542
sign_in users(:agent)
543543
xhr :get, :unassign_agent, { q: 'spam', affect: 'all' }
544-
assert_equal 0, Topic.admin_search('spam').where(assigned_user_id: nil).size
544+
assert_equal 2, Topic.admin_search('spam').where(assigned_user_id: nil).size
545545
assert_response :success
546546
end
547547

test/models/topic_test.rb

+1-2
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class TopicTest < ActiveSupport::TestCase
124124
assert_equal t_posts_count + 1, topic.posts.count
125125
end
126126

127-
test "#assign_agent should set the current_status of the topic to pending, assigned_user_id to specified user_id, and should create a closed_message post belonging to that topic" do
127+
test "#assign_agent should set assigned_user_id to specified user_id, and should create a closed_message post belonging to that topic" do
128128
topic = create :topic
129129
bulk_post_attributes = []
130130
t_posts_count = topic.posts.count
@@ -133,7 +133,6 @@ class TopicTest < ActiveSupport::TestCase
133133
topics.bulk_agent_assign(bulk_post_attributes, 1)
134134

135135
topic = Topic.find(topic.id)
136-
assert_equal 'pending', topic.current_status
137136
assert_equal 1, topic.assigned_user_id
138137
assert_equal t_posts_count + 1, topic.posts.count
139138
end

0 commit comments

Comments
 (0)