move-to-go 5.0.11 → 5.4.1

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.
@@ -56,7 +56,7 @@ describe "Link" do
56
56
  link.validate.length.should be > 0
57
57
  end
58
58
 
59
- it "is not valid when it has url, created_by, deal and orgaization" do
59
+ it "is valid when it has url, created_by, deal and orgaization" do
60
60
  # given
61
61
  link.url = "http://dropbox.com/"
62
62
  link.created_by = MoveToGo::CoworkerReference.new( { :integration_id => "123", :heading => "billy bob" } )
@@ -64,7 +64,19 @@ describe "Link" do
64
64
  link.organization = MoveToGo::OrganizationReference.new({ :integration_id => "456", :heading => "Lundalogik" })
65
65
 
66
66
  # when, then
67
- link.validate.length.should be > 0
67
+ link.validate.should eq ""
68
+ end
69
+
70
+ it "is valid when it has url, created_by, deal, person and orgaization" do
71
+ # given
72
+ link.url = "http://dropbox.com/"
73
+ link.created_by = MoveToGo::CoworkerReference.new( { :integration_id => "123", :heading => "billy bob" } )
74
+ link.deal = MoveToGo::DealReference.new({ :integration_id => "456", :heading => "The new deal" })
75
+ link.person = MoveToGo::PersonReference.new({ :integration_id => "456", :heading => "Limer" })
76
+ link.organization = MoveToGo::OrganizationReference.new({ :integration_id => "456", :heading => "Lundalogik" })
77
+
78
+ # when, then
79
+ link.validate.should eq ""
68
80
  end
69
81
 
70
82
  it "will set organization ref when organization is assigned" do
@@ -92,6 +104,20 @@ describe "Link" do
92
104
  link.instance_variable_get(:@deal_reference).is_a?(MoveToGo::DealReference).should eq true
93
105
  end
94
106
 
107
+ it "will set person ref when person is assigned" do
108
+ # given
109
+ person = MoveToGo::Person.new({:integration_id => "123" })
110
+ person.first_name = "The"
111
+ person.last_name = "Limer"
112
+
113
+ # when
114
+ link.person = person
115
+
116
+ # then
117
+ link.person.is_a?(MoveToGo::Person).should eq true
118
+ link.instance_variable_get(:@person_reference).is_a?(MoveToGo::PersonReference).should eq true
119
+ end
120
+
95
121
  it "will set coworker ref when coworker is assigned" do
96
122
  # given
97
123
  coworker = MoveToGo::Coworker.new({:integration_id => "123" })
@@ -0,0 +1,152 @@
1
+ require "spec_helper"
2
+ require 'move-to-go'
3
+
4
+ describe "Meeting" do
5
+ let("meeting") {
6
+ MoveToGo::Meeting.new
7
+ }
8
+
9
+ it "must have a text" do
10
+ meeting.validate.length.should be > 0
11
+ end
12
+
13
+ it "is valid when it has attributes and organization" do
14
+ # given
15
+ meeting.heading = "They are very interested in the new deal (the one where you get a free bike as a gift)"
16
+ meeting.created_by = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
17
+ meeting.organization = MoveToGo::Organization.new({ :integration_id => "456", :heading => "Lundalogik" })
18
+ meeting.assigned_coworker = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
19
+ meeting.date_start = "2011-01-01 10:00"
20
+ meeting.date_stop = "2011-01-01 12:00"
21
+ meeting.date_start_has_time = true
22
+
23
+ # when, then
24
+ meeting.validate.should eq ""
25
+ end
26
+
27
+ it "is valid when it has text, created_by, assigned_coworker, date_start, date_start_has_time, org and person" do
28
+ # given
29
+ meeting.heading = "They are very interested in the new deal (the one where you get a free bike as a gift)"
30
+ meeting.created_by = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
31
+ meeting.organization = MoveToGo::Organization.new({ :integration_id => "456", :heading => "Lundalogik" })
32
+ meeting.person = MoveToGo::Person.new({ :integration_id => "456", :heading => "Billy Bob" })
33
+ meeting.assigned_coworker = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
34
+ meeting.date_start = "2011-01-01 10:00"
35
+ meeting.date_stop = "2011-01-01 12:00"
36
+ meeting.date_start_has_time = true
37
+
38
+ # when, then
39
+ meeting.validate.should eq ""
40
+ end
41
+
42
+ it "is valid when it has text, created_by, assigned_coworker, date_start, date_start_has_time, org and deal" do
43
+ # given
44
+ meeting.heading = "They are very interested in the new deal (the one where you get a free bike as a gift)"
45
+ meeting.created_by = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
46
+ meeting.organization = MoveToGo::Organization.new({ :integration_id => "456", :heading => "Lundalogik" })
47
+ meeting.deal = MoveToGo::Deal.new({ :integration_id => "456", :heading => "The new deal" })
48
+ meeting.assigned_coworker = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
49
+ meeting.date_start = "2011-01-01 10:00"
50
+ meeting.date_stop = "2011-01-01 12:00"
51
+ meeting.date_start_has_time = true
52
+
53
+ # when, then
54
+ meeting.validate.should eq ""
55
+ end
56
+
57
+ it "is invalid if no meeting has no attached objects" do
58
+ # given
59
+ meeting.text = "They are very interested in the new deal (the one where you get a free bike as a gift)"
60
+ meeting.created_by = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
61
+
62
+ # when, then
63
+ meeting.validate.length.should be > 0
64
+ end
65
+
66
+ it "will set organization ref when organization is assigned" do
67
+ # given
68
+ org = MoveToGo::Organization.new({:integration_id => "123", :name => "Beagle Boys!"})
69
+
70
+ # when
71
+ meeting.organization = org
72
+
73
+ # then
74
+ meeting.organization.is_a?(MoveToGo::Organization).should eq true
75
+ meeting.instance_variable_get(:@organization_reference).is_a?(MoveToGo::OrganizationReference).should eq true
76
+ end
77
+
78
+ it "will set person ref when person is assigned" do
79
+ # given
80
+ person = MoveToGo::Person.new({:integration_id => "123" })
81
+ person.parse_name_to_firstname_lastname_se "Billy Bob"
82
+
83
+ # when
84
+ meeting.person = person
85
+
86
+ # then
87
+ meeting.person.is_a?(MoveToGo::Person).should eq true
88
+ meeting.instance_variable_get(:@person_reference).is_a?(MoveToGo::PersonReference).should eq true
89
+ end
90
+
91
+ it "will set coworker ref when coworker is assigned" do
92
+ # given
93
+ coworker = MoveToGo::Coworker.new({:integration_id => "123" })
94
+ coworker.parse_name_to_firstname_lastname_se "Billy Bob"
95
+
96
+ # when
97
+ meeting.created_by = coworker
98
+
99
+ # then
100
+ meeting.created_by.is_a?(MoveToGo::Coworker).should eq true
101
+ meeting.instance_variable_get(:@created_by_reference).is_a?(MoveToGo::CoworkerReference).should eq true
102
+ end
103
+
104
+ it "will set deal ref when deal is assigned" do
105
+ # given
106
+ deal = MoveToGo::Deal.new({:integration_id => "123" })
107
+ deal.name = "The new deal"
108
+
109
+ # when
110
+ meeting.deal = deal
111
+
112
+ # then
113
+ meeting.deal.is_a?(MoveToGo::Deal).should eq true
114
+ meeting.instance_variable_get(:@deal_reference).is_a?(MoveToGo::DealReference).should eq true
115
+ end
116
+
117
+ it "should remove form feed from text" do
118
+ # given
119
+ textWithFormFeed = "Text with form feed"
120
+ textWithoutFormFeed = "Text with form feed"
121
+
122
+ # when
123
+ meeting.text = textWithFormFeed
124
+
125
+ # then
126
+ meeting.text.should eq textWithoutFormFeed
127
+ end
128
+
129
+ it "should remove vertical tab from text" do
130
+ # given
131
+ textWithVerticalTab = "Text with \vvertical tab"
132
+ textWithoutVerticalTab = "Text with vertical tab"
133
+
134
+ # when
135
+ meeting.text = textWithVerticalTab
136
+
137
+ # then
138
+ meeting.text.should eq textWithoutVerticalTab
139
+ end
140
+
141
+ it "should remove backspace from text" do
142
+ # given
143
+ textWithBackSpace = "Text with \bbackspace"
144
+ textWithoutBackSpace = "Text with backspace"
145
+
146
+ # when
147
+ meeting.text = textWithBackSpace
148
+
149
+ # then
150
+ meeting.text.should eq textWithoutBackSpace
151
+ end
152
+ end
@@ -0,0 +1,149 @@
1
+ require "spec_helper"
2
+ require 'move-to-go'
3
+
4
+ describe "Todo" do
5
+ let("todo") {
6
+ MoveToGo::Todo.new
7
+ }
8
+
9
+ it "must have a text" do
10
+ todo.validate.length.should be > 0
11
+ end
12
+
13
+ it "is valid when it has text, created_by, assigned_coworker, date_start, date_start_has_time and organization" do
14
+ # given
15
+ todo.text = "They are very interested in the new deal (the one where you get a free bike as a gift)"
16
+ todo.created_by = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
17
+ todo.organization = MoveToGo::Organization.new({ :integration_id => "456", :heading => "Lundalogik" })
18
+ todo.assigned_coworker = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
19
+ todo.date_start = "2011-01-01"
20
+ todo.date_start_has_time = false
21
+
22
+ # when, then
23
+ todo.validate.should eq ""
24
+ end
25
+
26
+ it "is valid when it has text, created_by, assigned_coworker, date_start, date_start_has_time, org and person" do
27
+ # given
28
+ todo.text = "They are very interested in the new deal (the one where you get a free bike as a gift)"
29
+ todo.created_by = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
30
+ todo.organization = MoveToGo::Organization.new({ :integration_id => "456", :heading => "Lundalogik" })
31
+ todo.person = MoveToGo::Person.new({ :integration_id => "456", :heading => "Billy Bob" })
32
+ todo.assigned_coworker = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
33
+ todo.date_start = "2011-01-01"
34
+ todo.date_start_has_time = false
35
+
36
+ # when, then
37
+ todo.validate.should eq ""
38
+ end
39
+
40
+ it "is valid when it has text, created_by, assigned_coworker, date_start, date_start_has_time, org and deal" do
41
+ # given
42
+ todo.text = "They are very interested in the new deal (the one where you get a free bike as a gift)"
43
+ todo.created_by = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
44
+ todo.organization = MoveToGo::Organization.new({ :integration_id => "456", :heading => "Lundalogik" })
45
+ todo.deal = MoveToGo::Deal.new({ :integration_id => "456", :heading => "The new deal" })
46
+ todo.assigned_coworker = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
47
+ todo.date_start = "2011-01-01"
48
+ todo.date_start_has_time = false
49
+
50
+ # when, then
51
+ todo.validate.should eq ""
52
+ end
53
+
54
+ it "is invalid if no todo has no attached objects" do
55
+ # given
56
+ todo.text = "They are very interested in the new deal (the one where you get a free bike as a gift)"
57
+ todo.created_by = MoveToGo::Coworker.new( { :integration_id => "123", :heading => "kalle anka" } )
58
+
59
+ # when, then
60
+ todo.validate.length.should be > 0
61
+ end
62
+
63
+ it "will set organization ref when organization is assigned" do
64
+ # given
65
+ org = MoveToGo::Organization.new({:integration_id => "123", :name => "Beagle Boys!"})
66
+
67
+ # when
68
+ todo.organization = org
69
+
70
+ # then
71
+ todo.organization.is_a?(MoveToGo::Organization).should eq true
72
+ todo.instance_variable_get(:@organization_reference).is_a?(MoveToGo::OrganizationReference).should eq true
73
+ end
74
+
75
+ it "will set person ref when person is assigned" do
76
+ # given
77
+ person = MoveToGo::Person.new({:integration_id => "123" })
78
+ person.parse_name_to_firstname_lastname_se "Billy Bob"
79
+
80
+ # when
81
+ todo.person = person
82
+
83
+ # then
84
+ todo.person.is_a?(MoveToGo::Person).should eq true
85
+ todo.instance_variable_get(:@person_reference).is_a?(MoveToGo::PersonReference).should eq true
86
+ end
87
+
88
+ it "will set coworker ref when coworker is assigned" do
89
+ # given
90
+ coworker = MoveToGo::Coworker.new({:integration_id => "123" })
91
+ coworker.parse_name_to_firstname_lastname_se "Billy Bob"
92
+
93
+ # when
94
+ todo.created_by = coworker
95
+
96
+ # then
97
+ todo.created_by.is_a?(MoveToGo::Coworker).should eq true
98
+ todo.instance_variable_get(:@created_by_reference).is_a?(MoveToGo::CoworkerReference).should eq true
99
+ end
100
+
101
+ it "will set deal ref when deal is assigned" do
102
+ # given
103
+ deal = MoveToGo::Deal.new({:integration_id => "123" })
104
+ deal.name = "The new deal"
105
+
106
+ # when
107
+ todo.deal = deal
108
+
109
+ # then
110
+ todo.deal.is_a?(MoveToGo::Deal).should eq true
111
+ todo.instance_variable_get(:@deal_reference).is_a?(MoveToGo::DealReference).should eq true
112
+ end
113
+
114
+ it "should remove form feed from text" do
115
+ # given
116
+ textWithFormFeed = "Text with form feed"
117
+ textWithoutFormFeed = "Text with form feed"
118
+
119
+ # when
120
+ todo.text = textWithFormFeed
121
+
122
+ # then
123
+ todo.text.should eq textWithoutFormFeed
124
+ end
125
+
126
+ it "should remove vertical tab from text" do
127
+ # given
128
+ textWithVerticalTab = "Text with \vvertical tab"
129
+ textWithoutVerticalTab = "Text with vertical tab"
130
+
131
+ # when
132
+ todo.text = textWithVerticalTab
133
+
134
+ # then
135
+ todo.text.should eq textWithoutVerticalTab
136
+ end
137
+
138
+ it "should remove backspace from text" do
139
+ # given
140
+ textWithBackSpace = "Text with \bbackspace"
141
+ textWithoutBackSpace = "Text with backspace"
142
+
143
+ # when
144
+ todo.text = textWithBackSpace
145
+
146
+ # then
147
+ todo.text.should eq textWithoutBackSpace
148
+ end
149
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: move-to-go
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.11
4
+ version: 5.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Petter Sandholdt
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2018-02-08 00:00:00.000000000 Z
17
+ date: 2021-01-22 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: iso_country_codes
@@ -173,7 +173,7 @@ dependencies:
173
173
  description: " move-to-go is an migration tool for Lime Go. It can take virtually
174
174
  any input source and create zip-files that LIME Go likes. \n move-to-go has some
175
175
  predefined sources that makes will help you migrate your data.\n"
176
- email: support@lundalogik.se
176
+ email: support@lime.tech
177
177
  executables:
178
178
  - move-to-go
179
179
  extensions: []
@@ -205,6 +205,7 @@ files:
205
205
  - lib/move-to-go/model/history.rb
206
206
  - lib/move-to-go/model/history_classification.rb
207
207
  - lib/move-to-go/model/link.rb
208
+ - lib/move-to-go/model/meeting.rb
208
209
  - lib/move-to-go/model/organization.rb
209
210
  - lib/move-to-go/model/organizations.rb
210
211
  - lib/move-to-go/model/person.rb
@@ -215,6 +216,7 @@ files:
215
216
  - lib/move-to-go/model/settings.rb
216
217
  - lib/move-to-go/model/tag.rb
217
218
  - lib/move-to-go/model/talkedto.rb
219
+ - lib/move-to-go/model/todo.rb
218
220
  - lib/move-to-go/model/triedtoreach.rb
219
221
  - lib/move-to-go/model_helpers.rb
220
222
  - lib/move-to-go/phone_helper.rb
@@ -312,14 +314,17 @@ files:
312
314
  - spec/helpers/xsd_validate_spec.rb
313
315
  - spec/history_spec.rb
314
316
  - spec/link_spec.rb
317
+ - spec/meeting_spec.rb
315
318
  - spec/organization_spec.rb
316
319
  - spec/organizations_spec.rb
317
320
  - spec/person_spec.rb
318
321
  - spec/rootmodel_spec.rb
319
322
  - spec/spec_helper.rb
323
+ - spec/todo_spec.rb
320
324
  homepage:
321
325
  licenses: []
322
- metadata: {}
326
+ metadata:
327
+ changelog_uri: https://github.com/Lundalogik/move-to-go/blob/master/CHANGELOG.md
323
328
  post_install_message:
324
329
  rdoc_options: []
325
330
  require_paths:
@@ -336,7 +341,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
336
341
  version: '0'
337
342
  requirements: []
338
343
  rubyforge_project:
339
- rubygems_version: 2.6.11
344
+ rubygems_version: 2.7.6
340
345
  signing_key:
341
346
  specification_version: 4
342
347
  summary: Tool to generate Lime Go zip import files
@@ -359,8 +364,10 @@ test_files:
359
364
  - spec/helpers/xsd_validate_spec.rb
360
365
  - spec/history_spec.rb
361
366
  - spec/link_spec.rb
367
+ - spec/meeting_spec.rb
362
368
  - spec/organizations_spec.rb
363
369
  - spec/organization_spec.rb
364
370
  - spec/person_spec.rb
365
371
  - spec/rootmodel_spec.rb
366
372
  - spec/spec_helper.rb
373
+ - spec/todo_spec.rb