fat_free_crm 0.15.0.beta → 0.15.0.beta.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of fat_free_crm might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.rubocop.yml +7 -0
- data/.rubocop_todo.yml +517 -0
- data/.travis.yml +1 -1
- data/CHANGELOG.md +145 -9
- data/Gemfile +11 -13
- data/Gemfile.lock +104 -92
- data/README.md +2 -9
- data/app/assets/javascripts/application.js.erb +1 -1
- data/app/assets/javascripts/crm_select2.js.coffee +0 -1
- data/app/controllers/application_controller.rb +6 -6
- data/app/controllers/comments_controller.rb +7 -5
- data/app/controllers/entities/contacts_controller.rb +4 -4
- data/app/controllers/entities/opportunities_controller.rb +3 -3
- data/app/controllers/entities_controller.rb +3 -2
- data/app/controllers/home_controller.rb +21 -14
- data/app/controllers/passwords_controller.rb +1 -1
- data/app/controllers/users_controller.rb +3 -3
- data/app/helpers/accounts_helper.rb +2 -2
- data/app/helpers/application_helper.rb +20 -19
- data/app/helpers/campaigns_helper.rb +1 -1
- data/app/helpers/opportunities_helper.rb +4 -3
- data/app/helpers/tasks_helper.rb +6 -4
- data/app/helpers/users_helper.rb +1 -1
- data/app/helpers/versions_helper.rb +1 -1
- data/app/inputs/date_pair_input.rb +1 -1
- data/app/inputs/date_time_input.rb +1 -1
- data/app/models/entities/contact.rb +1 -0
- data/app/models/entities/lead.rb +4 -9
- data/app/models/entities/opportunity.rb +3 -6
- data/app/models/fields/field.rb +2 -3
- data/app/models/polymorphic/address.rb +1 -1
- data/app/models/polymorphic/comment.rb +1 -1
- data/app/models/polymorphic/task.rb +2 -3
- data/app/models/polymorphic/version.rb +5 -5
- data/app/models/setting.rb +6 -7
- data/app/models/users/user.rb +2 -2
- data/app/views/shared/_tags.html.haml +1 -5
- data/config/environments/test.rb +1 -1
- data/config/initializers/assets.rb +1 -1
- data/config/initializers/paper_trail.rb +1 -1
- data/config/initializers/simple_form.rb +1 -1
- data/config/initializers/views.rb +0 -1
- data/config/locales/th.rb +4 -4
- data/config/unicorn.rb +2 -2
- data/db/migrate/20100928030620_remove_uuid.rb +2 -4
- data/db/migrate/20111201030535_add_field_groups_klass_name.rb +2 -1
- data/db/migrate/20120224073107_remove_default_value_and_clear_settings.rb +1 -1
- data/db/schema.rb +0 -2
- data/fat_free_crm.gemspec +5 -5
- data/lib/fat_free_crm.rb +1 -3
- data/lib/fat_free_crm/callback.rb +2 -1
- data/lib/fat_free_crm/core_ext/string.rb +2 -2
- data/lib/fat_free_crm/engine.rb +1 -1
- data/lib/fat_free_crm/fields.rb +1 -1
- data/lib/fat_free_crm/i18n.rb +1 -1
- data/lib/fat_free_crm/mail_processor/base.rb +8 -2
- data/lib/fat_free_crm/mail_processor/comment_replies.rb +2 -1
- data/lib/fat_free_crm/permissions.rb +1 -1
- data/lib/fat_free_crm/version.rb +1 -1
- data/lib/gravatar_image_tag.rb +2 -2
- data/lib/tasks/ffcrm/comment_replies.rake +2 -2
- data/lib/tasks/ffcrm/config.rake +7 -6
- data/lib/tasks/ffcrm/demo.rake +1 -1
- data/lib/tasks/ffcrm/dropbox.rake +2 -2
- data/lib/tasks/ffcrm/setup.rake +4 -2
- data/lib/tasks/ffcrm/update_data.rake +5 -7
- data/spec/controllers/entities/campaigns_controller_spec.rb +1 -1
- data/spec/controllers/entities/leads_controller_spec.rb +1 -1
- data/spec/controllers/home_controller_spec.rb +5 -5
- data/spec/controllers/tasks_controller_spec.rb +3 -2
- data/spec/factories/sequences.rb +1 -2
- data/spec/factories/shared_factories.rb +5 -5
- data/spec/factories/user_factories.rb +3 -3
- data/spec/models/entities/opportunity_spec.rb +1 -1
- data/spec/models/fields/custom_field_pair_spec.rb +2 -2
- data/spec/models/setting_spec.rb +1 -1
- data/spec/shared/controllers.rb +1 -1
- data/spec/support/auth_macros.rb +6 -5
- data/spec/support/macros.rb +1 -1
- data/spec/views/application/auto_complete.haml_spec.rb +3 -3
- data/spec/views/campaigns/show.haml_spec.rb +2 -2
- data/spec/views/leads/update.js.haml_spec.rb +1 -1
- data/spec/views/tasks/index.haml_spec.rb +1 -1
- data/spec/views/tasks/update.js.haml_spec.rb +7 -7
- metadata +29 -4
data/spec/shared/controllers.rb
CHANGED
@@ -78,7 +78,7 @@ shared_examples "discard" do
|
|
78
78
|
it "should discard the attachment without deleting it" do
|
79
79
|
xhr :post, :discard, id: @model.id, attachment: @attachment.class.name, attachment_id: @attachment.id
|
80
80
|
expect(assigns[:attachment]).to eq(@attachment.reload) # The attachment should still exist.
|
81
|
-
expect(@model.reload.send(
|
81
|
+
expect(@model.reload.send(@attachment.class.name.tableize.to_s)).to eq([]) # But no longer associated with the model.
|
82
82
|
expect(assigns[:account]).to eq(@model) if @model.is_a?(Account)
|
83
83
|
expect(assigns[:campaign]).to eq(@model) if @model.is_a?(Campaign)
|
84
84
|
|
data/spec/support/auth_macros.rb
CHANGED
@@ -17,21 +17,22 @@ end
|
|
17
17
|
#----------------------------------------------------------------------------
|
18
18
|
def login(user_stubs = {}, session_stubs = {})
|
19
19
|
User.current_user = @current_user = FactoryGirl.create(:user, user_stubs)
|
20
|
-
@current_user_session = double(Authentication, {record: current_user}.merge(session_stubs))
|
20
|
+
@current_user_session = double(Authentication, { record: current_user }.merge(session_stubs))
|
21
21
|
allow(Authentication).to receive(:find).and_return(@current_user_session)
|
22
|
-
#set_timezone
|
22
|
+
# set_timezone
|
23
23
|
end
|
24
24
|
alias :require_user :login
|
25
25
|
|
26
26
|
#----------------------------------------------------------------------------
|
27
27
|
def login_and_assign(user_stubs = {}, session_stubs = {})
|
28
28
|
User.current_user = @current_user = FactoryGirl.build_stubbed(:user, user_stubs)
|
29
|
-
@current_user_session = double(Authentication, {record: current_user}.merge(session_stubs))
|
29
|
+
@current_user_session = double(Authentication, { record: current_user }.merge(session_stubs))
|
30
30
|
allow(Authentication).to receive(:find).and_return(@current_user_session)
|
31
|
-
#set_timezone
|
31
|
+
# set_timezone
|
32
32
|
assigns[:current_user] = current_user
|
33
33
|
end
|
34
|
-
|
34
|
+
|
35
|
+
def login_and_assign!(_user_stubs = {}, _session_stubs = {})
|
35
36
|
login
|
36
37
|
assigns[:current_user] = current_user
|
37
38
|
end
|
data/spec/support/macros.rb
CHANGED
@@ -22,7 +22,7 @@ end
|
|
22
22
|
#----------------------------------------------------------------------------
|
23
23
|
def stub_task_total(view = "pending")
|
24
24
|
settings = (view == "completed" ? Setting.task_completed : Setting.task_bucket)
|
25
|
-
settings.
|
25
|
+
settings.each_with_object(all: 0) { |key, hash| hash[key] = 1; hash }
|
26
26
|
end
|
27
27
|
|
28
28
|
# Get current server timezone and set it (see rake time:zones:local for details).
|
@@ -25,10 +25,10 @@ describe "/application/_auto_complete" do
|
|
25
25
|
|
26
26
|
render
|
27
27
|
expect(rendered).to have_tag("ul", count: 1) do |list|
|
28
|
-
|
29
|
-
expect(list).to have_tag("li", id: @auto_complete.id.to_s, text: @auto_complete.name)
|
30
|
-
else
|
28
|
+
if model == :lead
|
31
29
|
expect(list).to have_tag("li", id: @auto_complete.id.to_s, text: "#{@auto_complete.name} (#{@auto_complete.company})")
|
30
|
+
else
|
31
|
+
expect(list).to have_tag("li", id: @auto_complete.id.to_s, text: @auto_complete.name)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|
@@ -11,8 +11,8 @@ describe "/campaigns/show" do
|
|
11
11
|
before do
|
12
12
|
login_and_assign
|
13
13
|
@campaign = FactoryGirl.build_stubbed(:campaign, id: 42,
|
14
|
-
|
15
|
-
|
14
|
+
leads: [FactoryGirl.build_stubbed(:lead)],
|
15
|
+
opportunities: [FactoryGirl.build_stubbed(:opportunity)])
|
16
16
|
assign(:campaign, @campaign)
|
17
17
|
assign(:users, [current_user])
|
18
18
|
assign(:comment, Comment.new)
|
@@ -67,7 +67,7 @@ describe "/leads/update" do
|
|
67
67
|
end
|
68
68
|
|
69
69
|
it "should update campaign sidebar" do
|
70
|
-
assign(:campaign,
|
70
|
+
assign(:campaign, FactoryGirl.build_stubbed(:campaign))
|
71
71
|
render
|
72
72
|
|
73
73
|
expect(rendered).to include("sidebar")
|
@@ -16,7 +16,7 @@ describe "/tasks/index" do
|
|
16
16
|
before do
|
17
17
|
user = FactoryGirl.build_stubbed(:user)
|
18
18
|
account = FactoryGirl.build_stubbed(:account)
|
19
|
-
@due
|
19
|
+
@due = FactoryGirl.build_stubbed(:task, asset: account, bucket: "due_asap", assignee: user)
|
20
20
|
@completed = FactoryGirl.build_stubbed(:task, asset: account, bucket: "completed_today", assignee: user, completed_at: 1.hour.ago, completor: user)
|
21
21
|
end
|
22
22
|
|
@@ -15,7 +15,7 @@ describe "/tasks/update" do
|
|
15
15
|
describe "Changing due date" do
|
16
16
|
before do
|
17
17
|
assign(:task_before_update, FactoryGirl.build_stubbed(:task, bucket: "due_asap"))
|
18
|
-
assign(:task, @task
|
18
|
+
assign(:task, @task = FactoryGirl.build_stubbed(:task, bucket: "due_tomorrow"))
|
19
19
|
assign(:view, "pending")
|
20
20
|
assign(:task_total, stub_task_total("pending"))
|
21
21
|
end
|
@@ -64,7 +64,7 @@ describe "/tasks/update" do
|
|
64
64
|
it "pending task to somebody from Tasks tab: should remove the task and show flash message (assigned)" do
|
65
65
|
assignee = FactoryGirl.build_stubbed(:user)
|
66
66
|
assign(:task_before_update, FactoryGirl.build_stubbed(:task, assignee: nil))
|
67
|
-
assign(:task, @task
|
67
|
+
assign(:task, @task = FactoryGirl.build_stubbed(:task, assignee: assignee))
|
68
68
|
assign(:view, "pending")
|
69
69
|
controller.request.env["HTTP_REFERER"] = "http://localhost/tasks"
|
70
70
|
|
@@ -78,7 +78,7 @@ describe "/tasks/update" do
|
|
78
78
|
it "assigned tasks to me from Tasks tab: should remove the task and show flash message (pending)" do
|
79
79
|
assignee = FactoryGirl.build_stubbed(:user)
|
80
80
|
assign(:task_before_update, FactoryGirl.build_stubbed(:task, assignee: assignee))
|
81
|
-
assign(:task, @task
|
81
|
+
assign(:task, @task = FactoryGirl.build_stubbed(:task, assignee: nil))
|
82
82
|
assign(:view, "assigned")
|
83
83
|
controller.request.env["HTTP_REFERER"] = "http://localhost/tasks?view=assigned"
|
84
84
|
|
@@ -91,7 +91,7 @@ describe "/tasks/update" do
|
|
91
91
|
|
92
92
|
it "assigned tasks to somebody else from Tasks tab: should re-render task partial" do
|
93
93
|
assign(:task_before_update, FactoryGirl.build_stubbed(:task, assignee: FactoryGirl.build_stubbed(:user)))
|
94
|
-
assign(:task, @task
|
94
|
+
assign(:task, @task = FactoryGirl.build_stubbed(:task, assignee: FactoryGirl.build_stubbed(:user)))
|
95
95
|
assign(:view, "assigned")
|
96
96
|
controller.request.env["HTTP_REFERER"] = "http://localhost/tasks?view=assigned"
|
97
97
|
|
@@ -101,7 +101,7 @@ describe "/tasks/update" do
|
|
101
101
|
|
102
102
|
it "from Tasks tab: should update tasks sidebar" do
|
103
103
|
assign(:task_before_update, FactoryGirl.build_stubbed(:task, assignee: nil))
|
104
|
-
assign(:task, @task
|
104
|
+
assign(:task, @task = FactoryGirl.build_stubbed(:task, assignee: FactoryGirl.build_stubbed(:user)))
|
105
105
|
assign(:view, "assigned")
|
106
106
|
controller.request.env["HTTP_REFERER"] = "http://localhost/tasks?view=assigned"
|
107
107
|
render
|
@@ -114,7 +114,7 @@ describe "/tasks/update" do
|
|
114
114
|
|
115
115
|
it "from asset page: should should re-render task partial" do
|
116
116
|
assign(:task_before_update, FactoryGirl.build_stubbed(:task, assignee: nil))
|
117
|
-
assign(:task, @task
|
117
|
+
assign(:task, @task = FactoryGirl.build_stubbed(:task, assignee: FactoryGirl.build_stubbed(:user)))
|
118
118
|
render
|
119
119
|
|
120
120
|
expect(rendered).to include("$('#task_#{@task.id}').html('<li class=\\'highlight task\\' id=\\'task_#{@task.id}\\'")
|
@@ -122,7 +122,7 @@ describe "/tasks/update" do
|
|
122
122
|
|
123
123
|
it "from asset page: should update recently viewed items" do
|
124
124
|
assign(:task_before_update, FactoryGirl.build_stubbed(:task, assignee: nil))
|
125
|
-
assign(:task, @task
|
125
|
+
assign(:task, @task = FactoryGirl.build_stubbed(:task, assignee: FactoryGirl.build_stubbed(:user)))
|
126
126
|
render
|
127
127
|
|
128
128
|
expect(rendered).to have_text("Recent Items")
|
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.15.0.beta
|
4
|
+
version: 0.15.0.beta.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: 2017-
|
15
|
+
date: 2017-02-23 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|
@@ -20,14 +20,14 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - "~>"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 4.2
|
23
|
+
version: '4.2'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
27
27
|
requirements:
|
28
28
|
- - "~>"
|
29
29
|
- !ruby/object:Gem::Version
|
30
|
-
version: 4.2
|
30
|
+
version: '4.2'
|
31
31
|
- !ruby/object:Gem::Dependency
|
32
32
|
name: rails-observers
|
33
33
|
requirement: !ruby/object:Gem::Requirement
|
@@ -203,6 +203,9 @@ dependencies:
|
|
203
203
|
- - ">="
|
204
204
|
- !ruby/object:Gem::Version
|
205
205
|
version: 3.4.4
|
206
|
+
- - "<"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 3.5.0
|
206
209
|
type: :runtime
|
207
210
|
prerelease: false
|
208
211
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -210,6 +213,9 @@ dependencies:
|
|
210
213
|
- - ">="
|
211
214
|
- !ruby/object:Gem::Version
|
212
215
|
version: 3.4.4
|
216
|
+
- - "<"
|
217
|
+
- !ruby/object:Gem::Version
|
218
|
+
version: 3.5.0
|
213
219
|
- !ruby/object:Gem::Dependency
|
214
220
|
name: acts_as_commentable
|
215
221
|
requirement: !ruby/object:Gem::Requirement
|
@@ -425,6 +431,9 @@ dependencies:
|
|
425
431
|
requirement: !ruby/object:Gem::Requirement
|
426
432
|
requirements:
|
427
433
|
- - "~>"
|
434
|
+
- !ruby/object:Gem::Version
|
435
|
+
version: '1.8'
|
436
|
+
- - ">="
|
428
437
|
- !ruby/object:Gem::Version
|
429
438
|
version: 1.8.0
|
430
439
|
type: :runtime
|
@@ -432,6 +441,9 @@ dependencies:
|
|
432
441
|
version_requirements: !ruby/object:Gem::Requirement
|
433
442
|
requirements:
|
434
443
|
- - "~>"
|
444
|
+
- !ruby/object:Gem::Version
|
445
|
+
version: '1.8'
|
446
|
+
- - ">="
|
435
447
|
- !ruby/object:Gem::Version
|
436
448
|
version: 1.8.0
|
437
449
|
- !ruby/object:Gem::Dependency
|
@@ -452,6 +464,9 @@ dependencies:
|
|
452
464
|
name: ransack_ui
|
453
465
|
requirement: !ruby/object:Gem::Requirement
|
454
466
|
requirements:
|
467
|
+
- - "~>"
|
468
|
+
- !ruby/object:Gem::Version
|
469
|
+
version: '1.3'
|
455
470
|
- - ">="
|
456
471
|
- !ruby/object:Gem::Version
|
457
472
|
version: 1.3.1
|
@@ -459,6 +474,9 @@ dependencies:
|
|
459
474
|
prerelease: false
|
460
475
|
version_requirements: !ruby/object:Gem::Requirement
|
461
476
|
requirements:
|
477
|
+
- - "~>"
|
478
|
+
- !ruby/object:Gem::Version
|
479
|
+
version: '1.3'
|
462
480
|
- - ">="
|
463
481
|
- !ruby/object:Gem::Version
|
464
482
|
version: 1.3.1
|
@@ -467,6 +485,9 @@ dependencies:
|
|
467
485
|
requirement: !ruby/object:Gem::Requirement
|
468
486
|
requirements:
|
469
487
|
- - "~>"
|
488
|
+
- !ruby/object:Gem::Version
|
489
|
+
version: '1.6'
|
490
|
+
- - ">="
|
470
491
|
- !ruby/object:Gem::Version
|
471
492
|
version: 1.6.2
|
472
493
|
type: :runtime
|
@@ -474,6 +495,9 @@ dependencies:
|
|
474
495
|
version_requirements: !ruby/object:Gem::Requirement
|
475
496
|
requirements:
|
476
497
|
- - "~>"
|
498
|
+
- !ruby/object:Gem::Version
|
499
|
+
version: '1.6'
|
500
|
+
- - ">="
|
477
501
|
- !ruby/object:Gem::Version
|
478
502
|
version: 1.6.2
|
479
503
|
- !ruby/object:Gem::Dependency
|
@@ -503,6 +527,7 @@ extra_rdoc_files: []
|
|
503
527
|
files:
|
504
528
|
- ".gitignore"
|
505
529
|
- ".rubocop.yml"
|
530
|
+
- ".rubocop_todo.yml"
|
506
531
|
- ".teatro.yml"
|
507
532
|
- ".travis.yml"
|
508
533
|
- CHANGELOG.md
|