fat_free_crm 0.17.1 → 0.17.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of fat_free_crm might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +6 -7
- data/CHANGELOG.md +9 -1
- data/Gemfile.lock +3 -3
- data/app/assets/javascripts/crm_select2.js.coffee +14 -3
- data/app/controllers/admin/application_controller.rb +1 -1
- data/app/controllers/admin/fields_controller.rb +5 -2
- data/app/controllers/admin/plugins_controller.rb +7 -1
- data/app/controllers/admin/settings_controller.rb +5 -1
- data/app/controllers/admin/tags_controller.rb +5 -1
- data/app/controllers/application_controller.rb +10 -4
- data/app/helpers/accounts_helper.rb +6 -4
- data/config/initializers/ransack.rb +1 -1
- data/lib/fat_free_crm/version.rb +1 -1
- data/spec/shared/controllers.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7221e26b201b43c86185ba3c5c836a217ce877c2
|
4
|
+
data.tar.gz: 88605bc299c4cc32ed059c3fcc4bc4c37da167fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29471fdc624409ce11715db80702efcaf214fb95fb7fbeba0702b1e4bf6e56b732d7f9e7abe7a2fa384fecb7c8d7b0afbedfc2617ddaac9d6c5572f572061bfb
|
7
|
+
data.tar.gz: 31608af4f51f58ff87f51ff9a8e43420374efeb3cea34e526fee18d7a335f93e381d6a6d38a97a895709f4bae89494100c2d454e181496d3c216e5ed5fd7d12d
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2018-01-
|
3
|
+
# on 2018-01-21 02:52:41 +1030 using RuboCop version 0.52.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -93,7 +93,7 @@ Lint/UselessAssignment:
|
|
93
93
|
- 'app/helpers/application_helper.rb'
|
94
94
|
- 'app/views/home/index.atom.builder'
|
95
95
|
|
96
|
-
# Offense count:
|
96
|
+
# Offense count: 132
|
97
97
|
Metrics/AbcSize:
|
98
98
|
Max: 57
|
99
99
|
|
@@ -102,10 +102,10 @@ Metrics/AbcSize:
|
|
102
102
|
Metrics/BlockNesting:
|
103
103
|
Max: 4
|
104
104
|
|
105
|
-
# Offense count:
|
105
|
+
# Offense count: 14
|
106
106
|
# Configuration parameters: CountComments.
|
107
107
|
Metrics/ClassLength:
|
108
|
-
Max:
|
108
|
+
Max: 199
|
109
109
|
|
110
110
|
# Offense count: 29
|
111
111
|
Metrics/CyclomaticComplexity:
|
@@ -330,12 +330,11 @@ Style/RegexpLiteral:
|
|
330
330
|
- 'spec/views/contacts/update.js.haml_spec.rb'
|
331
331
|
- 'spec/views/opportunities/update.js.haml_spec.rb'
|
332
332
|
|
333
|
-
# Offense count:
|
333
|
+
# Offense count: 8
|
334
334
|
# Cop supports --auto-correct.
|
335
335
|
# Configuration parameters: AllowAsExpressionSeparator.
|
336
336
|
Style/Semicolon:
|
337
337
|
Exclude:
|
338
|
-
- 'app/controllers/application_controller.rb'
|
339
338
|
- 'app/controllers/entities/leads_controller.rb'
|
340
339
|
- 'lib/fat_free_crm/permissions.rb'
|
341
340
|
- 'lib/tasks/ffcrm/setup.rake'
|
@@ -351,7 +350,7 @@ Style/TrivialAccessors:
|
|
351
350
|
Exclude:
|
352
351
|
- 'spec/support/auth_macros.rb'
|
353
352
|
|
354
|
-
# Offense count:
|
353
|
+
# Offense count: 1922
|
355
354
|
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
356
355
|
# URISchemes: http, https
|
357
356
|
Metrics/LineLength:
|
data/CHANGELOG.md
CHANGED
@@ -4,11 +4,19 @@ It does not matter how slowly you go as long as you do not stop.
|
|
4
4
|
First they ignore you, then they laugh at you, then they fight you,
|
5
5
|
then you win. –- Mahatma Gandhi
|
6
6
|
|
7
|
+
Mon Jan 22, 2018 (0.17.2)
|
8
|
+
---------------------------------------------------------------------
|
9
|
+
- Fix CVE-2017-0889
|
10
|
+
- Fix #687
|
11
|
+
|
12
|
+
Mon Jan 22, 2018 (0.16.2)
|
13
|
+
---------------------------------------------------------------------
|
14
|
+
- Fix #687
|
15
|
+
|
7
16
|
Sat Jan 20, 2018 (0.17.1)
|
8
17
|
---------------------------------------------------------------------
|
9
18
|
- #709 Revert accidental minimum ruby version 2.4 changes (#665)
|
10
19
|
|
11
|
-
|
12
20
|
Sat Jan 20, 2018 (0.17.0)
|
13
21
|
---------------------------------------------------------------------
|
14
22
|
|
data/Gemfile.lock
CHANGED
@@ -162,7 +162,7 @@ GEM
|
|
162
162
|
tilt
|
163
163
|
headless (2.3.1)
|
164
164
|
htmlentities (4.3.4)
|
165
|
-
i18n (0.9.
|
165
|
+
i18n (0.9.3)
|
166
166
|
concurrent-ruby (~> 1.0)
|
167
167
|
i18n_data (0.8.0)
|
168
168
|
io-like (0.3.0)
|
@@ -208,7 +208,7 @@ GEM
|
|
208
208
|
paper_trail (6.0.2)
|
209
209
|
activerecord (>= 4.0, < 5.2)
|
210
210
|
request_store (~> 1.1)
|
211
|
-
paperclip (5.
|
211
|
+
paperclip (5.2.0)
|
212
212
|
activemodel (>= 4.2.0)
|
213
213
|
activesupport (>= 4.2.0)
|
214
214
|
cocaine (~> 0.5.5)
|
@@ -474,4 +474,4 @@ DEPENDENCIES
|
|
474
474
|
zeus
|
475
475
|
|
476
476
|
BUNDLED WITH
|
477
|
-
1.16.
|
477
|
+
1.16.1
|
@@ -10,9 +10,20 @@
|
|
10
10
|
window.crm ||= {}
|
11
11
|
|
12
12
|
crm.make_select2 = ->
|
13
|
-
$(".select2").not(".select2-container, .select2-offscreen").each ->
|
14
|
-
|
15
|
-
|
13
|
+
$(".select2").not(".select2-container, .select2-offscreen, .select2-hidden-accessible").each ->
|
14
|
+
|
15
|
+
#$(".select2").each ->
|
16
|
+
if $(this).data("url")
|
17
|
+
$(this).select2
|
18
|
+
'width':'resolve'
|
19
|
+
placeholder: $(this).attr("placeholder")
|
20
|
+
ajax:
|
21
|
+
url: $(this).data("url")
|
22
|
+
dataType: 'json'
|
23
|
+
else
|
24
|
+
$(this).select2
|
25
|
+
'width':'resolve'
|
26
|
+
placeholder: $(this).attr("placeholder")
|
16
27
|
|
17
28
|
$(".select2_tag").not(".select2-container, .select2-offscreen").each ->
|
18
29
|
#$(".select2_tag").each ->
|
@@ -14,7 +14,7 @@ class Admin::ApplicationController < ApplicationController
|
|
14
14
|
# Autocomplete handler for all admin controllers.
|
15
15
|
#----------------------------------------------------------------------------
|
16
16
|
def auto_complete
|
17
|
-
@query = params[:
|
17
|
+
@query = params[:term]
|
18
18
|
@auto_complete = klass.text_search(@query).limit(10)
|
19
19
|
render partial: 'auto_complete'
|
20
20
|
end
|
@@ -6,8 +6,7 @@
|
|
6
6
|
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
7
|
#------------------------------------------------------------------------------
|
8
8
|
class Admin::FieldsController < Admin::ApplicationController
|
9
|
-
before_action
|
10
|
-
|
9
|
+
before_action :setup_current_tab, only: [:index]
|
11
10
|
load_resource except: %i[create subform]
|
12
11
|
|
13
12
|
# GET /fields
|
@@ -117,4 +116,8 @@ class Admin::FieldsController < Admin::ApplicationController
|
|
117
116
|
def field_params
|
118
117
|
params[:field].permit!
|
119
118
|
end
|
119
|
+
|
120
|
+
def setup_current_tab
|
121
|
+
set_current_tab('admin/fields')
|
122
|
+
end
|
120
123
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
7
|
#------------------------------------------------------------------------------
|
8
8
|
class Admin::PluginsController < Admin::ApplicationController
|
9
|
-
before_action
|
9
|
+
before_action :setup_current_tab, only: [:index]
|
10
10
|
|
11
11
|
# GET /admin/plugins
|
12
12
|
# GET /admin/plugins.xml
|
@@ -16,4 +16,10 @@ class Admin::PluginsController < Admin::ApplicationController
|
|
16
16
|
|
17
17
|
respond_with(@plugins)
|
18
18
|
end
|
19
|
+
|
20
|
+
protected
|
21
|
+
|
22
|
+
def setup_current_tab
|
23
|
+
set_current_tab('admin/plugins')
|
24
|
+
end
|
19
25
|
end
|
@@ -6,11 +6,15 @@
|
|
6
6
|
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
7
|
#------------------------------------------------------------------------------
|
8
8
|
class Admin::SettingsController < Admin::ApplicationController
|
9
|
-
before_action
|
9
|
+
before_action :setup_current_tab, only: [:index]
|
10
10
|
|
11
11
|
# GET /admin/settings
|
12
12
|
# GET /admin/settings.xml
|
13
13
|
#----------------------------------------------------------------------------
|
14
14
|
def index
|
15
15
|
end
|
16
|
+
|
17
|
+
def setup_current_tab
|
18
|
+
set_current_tab('admin/settings')
|
19
|
+
end
|
16
20
|
end
|
@@ -6,7 +6,7 @@
|
|
6
6
|
# See MIT-LICENSE file or http://www.opensource.org/licenses/mit-license.php
|
7
7
|
#------------------------------------------------------------------------------
|
8
8
|
class Admin::TagsController < Admin::ApplicationController
|
9
|
-
before_action
|
9
|
+
before_action :setup_current_tab, only: %i[index show]
|
10
10
|
|
11
11
|
load_resource
|
12
12
|
|
@@ -70,4 +70,8 @@ class Admin::TagsController < Admin::ApplicationController
|
|
70
70
|
def tag_params
|
71
71
|
params[:tag].permit!
|
72
72
|
end
|
73
|
+
|
74
|
+
def setup_current_tab
|
75
|
+
set_current_tab('admin/tags')
|
76
|
+
end
|
73
77
|
end
|
@@ -34,7 +34,7 @@ class ApplicationController < ActionController::Base
|
|
34
34
|
# Common auto_complete handler for all core controllers.
|
35
35
|
#----------------------------------------------------------------------------
|
36
36
|
def auto_complete
|
37
|
-
@query = params[:
|
37
|
+
@query = params[:term] || ''
|
38
38
|
@auto_complete = hook(:auto_complete, self, query: @query, user: current_user)
|
39
39
|
if @auto_complete.empty?
|
40
40
|
exclude_ids = auto_complete_ids_to_exclude(params[:related])
|
@@ -47,9 +47,15 @@ class ApplicationController < ActionController::Base
|
|
47
47
|
respond_to do |format|
|
48
48
|
format.any(:js, :html) { render partial: 'auto_complete' }
|
49
49
|
format.json do
|
50
|
-
|
51
|
-
|
52
|
-
|
50
|
+
results = @auto_complete.map do |a|
|
51
|
+
{
|
52
|
+
id: a.id,
|
53
|
+
text: a.respond_to?(:full_name) ? a.full_name : a.name
|
54
|
+
}
|
55
|
+
end
|
56
|
+
render json: {
|
57
|
+
results: results
|
58
|
+
}
|
53
59
|
end
|
54
60
|
end
|
55
61
|
end
|
@@ -29,8 +29,10 @@ module AccountsHelper
|
|
29
29
|
options[:selected] = @account&.id || 0
|
30
30
|
accounts = ([@account.new_record? ? nil : @account] + Account.my(current_user).order(:name).limit(25)).compact.uniq
|
31
31
|
collection_select :account, :id, accounts, :id, :name,
|
32
|
-
{
|
33
|
-
style: 'width:330px;', class: 'select2'
|
32
|
+
{ include_blank: true },
|
33
|
+
style: 'width:330px;', class: 'select2',
|
34
|
+
placeholder: t(:select_an_account),
|
35
|
+
"data-url": auto_complete_accounts_path(format: 'json')
|
34
36
|
end
|
35
37
|
|
36
38
|
# Select an existing account or create a new one.
|
@@ -42,10 +44,10 @@ module AccountsHelper
|
|
42
44
|
content_tag(:div, class: 'label') do
|
43
45
|
t(:account).html_safe +
|
44
46
|
content_tag(:span, id: 'account_create_title') do
|
45
|
-
"(#{t :create_new} #{t :or} <a href='#' onclick='crm.show_select_account(); return false;'>#{t :select_existing}</a>):".html_safe
|
47
|
+
" (#{t :create_new} #{t :or} <a href='#' onclick='crm.show_select_account(); return false;'>#{t :select_existing}</a>):".html_safe
|
46
48
|
end +
|
47
49
|
content_tag(:span, id: 'account_select_title') do
|
48
|
-
"(<a href='#' onclick='crm.show_create_account(); return false;'>#{t :create_new}</a> #{t :or} #{t :select_existing}):".html_safe
|
50
|
+
" (<a href='#' onclick='crm.show_create_account(); return false;'>#{t :create_new}</a> #{t :or} #{t :select_existing}):".html_safe
|
49
51
|
end +
|
50
52
|
content_tag(:span, ':', id: 'account_disabled_title')
|
51
53
|
end +
|
data/lib/fat_free_crm/version.rb
CHANGED
data/spec/shared/controllers.rb
CHANGED
@@ -12,13 +12,13 @@ shared_examples "auto complete" do
|
|
12
12
|
end
|
13
13
|
|
14
14
|
it "should do the search and find records that match autocomplete query" do
|
15
|
-
get :auto_complete, params: {
|
15
|
+
get :auto_complete, params: { term: @query }
|
16
16
|
expect(assigns[:query]).to eq(@query)
|
17
17
|
expect(assigns[:auto_complete]).to eq(@auto_complete_matches) # Each controller must define it.
|
18
18
|
end
|
19
19
|
|
20
20
|
it "should save current autocomplete controller in a session" do
|
21
|
-
get :auto_complete, params: {
|
21
|
+
get :auto_complete, params: { term: @query }
|
22
22
|
|
23
23
|
# We don't save Admin/Users autocomplete controller in a session since Users are not
|
24
24
|
# exposed through the Jumpbox.
|
@@ -28,7 +28,7 @@ shared_examples "auto complete" do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should render application/_auto_complete template" do
|
31
|
-
post :auto_complete, params: {
|
31
|
+
post :auto_complete, params: { term: @query }
|
32
32
|
expect(response).to render_template("application/_auto_complete")
|
33
33
|
end
|
34
34
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fat_free_crm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.17.
|
4
|
+
version: 0.17.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Dvorkin
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2018-01-
|
15
|
+
date: 2018-01-24 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|
@@ -1581,7 +1581,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
1581
1581
|
version: '0'
|
1582
1582
|
requirements: []
|
1583
1583
|
rubyforge_project:
|
1584
|
-
rubygems_version: 2.
|
1584
|
+
rubygems_version: 2.6.14
|
1585
1585
|
signing_key:
|
1586
1586
|
specification_version: 4
|
1587
1587
|
summary: Fat Free CRM
|