lws 6.2.0 → 6.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -40,7 +40,7 @@ module LWS::Ticket
40
40
  use_api LWS::Ticket.api
41
41
 
42
42
  # @!attribute id [r]
43
- # @return [Fixnum] the (unique) ID of the ticket message attachment
43
+ # @return [Integer] the (unique) ID of the ticket message attachment
44
44
  attribute :id
45
45
 
46
46
  # @!attribute av_scanned_at
@@ -57,7 +57,7 @@ module LWS::Ticket
57
57
  belongs_to :message
58
58
 
59
59
  # @!attribute message_id
60
- # @return [Fixnum] the ID of the ticket message associated with the
60
+ # @return [Integer] the ID of the ticket message associated with the
61
61
  # attachment
62
62
  attribute :message_id
63
63
 
@@ -66,7 +66,7 @@ module LWS::Ticket
66
66
  attribute :name
67
67
 
68
68
  # @!attribute size
69
- # @return [Fixnum] the size of the attachment (bytes)
69
+ # @return [Integer] the size of the attachment (bytes)
70
70
  attribute :size
71
71
 
72
72
  # @!attribute url
@@ -90,7 +90,7 @@ module LWS::Ticket
90
90
  use_api LWS::Ticket.api
91
91
 
92
92
  # @!attribute id [r]
93
- # @return [Fixnum] the (unique) ID of the ticket group
93
+ # @return [Integer] the (unique) ID of the ticket group
94
94
  attribute :id
95
95
 
96
96
  # @!attribute name
@@ -120,7 +120,7 @@ module LWS::Ticket
120
120
  use_api LWS::Ticket.api
121
121
 
122
122
  # @!attribute id [r]
123
- # @return [Fixnum] the (unique) ID of the ticket message
123
+ # @return [Integer] the (unique) ID of the ticket message
124
124
  attribute :id
125
125
 
126
126
  # @!attribute account
@@ -129,7 +129,7 @@ module LWS::Ticket
129
129
  belongs_to :account, class_name: "LWS::Auth::Account"
130
130
 
131
131
  # @!attribute account_id
132
- # @return [Fixnum] the ID of the account of the user that created the
132
+ # @return [Integer] the ID of the account of the user that created the
133
133
  # ticket message
134
134
  attribute :account_id
135
135
 
@@ -144,7 +144,7 @@ module LWS::Ticket
144
144
  belongs_to :company, class_name: "LWS::Auth::Company"
145
145
 
146
146
  # @!attribute company_id
147
- # @return [Fixnum] the ID of the company of the user that created the
147
+ # @return [Integer] the ID of the company of the user that created the
148
148
  # ticket message
149
149
  attribute :company_id
150
150
 
@@ -168,7 +168,7 @@ module LWS::Ticket
168
168
  belongs_to :ticket
169
169
 
170
170
  # @!attribute ticket_id
171
- # @return [Fixnum] the ID of the ticket associated with the message
171
+ # @return [Integer] the ID of the ticket associated with the message
172
172
  attribute :ticket_id
173
173
 
174
174
  # @!attribute created_at [r]
@@ -186,7 +186,7 @@ module LWS::Ticket
186
186
  use_api LWS::Ticket.api
187
187
 
188
188
  # @!attribute id [r]
189
- # @return [Fixnum] the (unique) ID of the ticket tag
189
+ # @return [Integer] the (unique) ID of the ticket tag
190
190
  attribute :id
191
191
 
192
192
  # @!attribute description
@@ -194,7 +194,7 @@ module LWS::Ticket
194
194
  attribute :description
195
195
 
196
196
  # @!attribute dev_issue_id
197
- # @return [Fixnum, nil] the ID of the issue in LeftClick's internal bug
197
+ # @return [Integer, nil] the ID of the issue in LeftClick's internal bug
198
198
  # tracking system
199
199
  attribute :dev_issue_id
200
200
 
@@ -224,7 +224,7 @@ module LWS::Ticket
224
224
  use_api LWS::Ticket.api
225
225
 
226
226
  # @!attribute id [r]
227
- # @return [Fixnum] the (unique) ID of the ticket
227
+ # @return [Integer] the (unique) ID of the ticket
228
228
  attribute :id
229
229
 
230
230
  # @!attribute account
@@ -233,7 +233,7 @@ module LWS::Ticket
233
233
  belongs_to :account, class_name: "LWS::Auth::Account"
234
234
 
235
235
  # @!attribute account_id
236
- # @return [Fixnum] the ID of the account of the user that created the
236
+ # @return [Integer] the ID of the account of the user that created the
237
237
  # ticket
238
238
  attribute :account_id
239
239
 
@@ -244,7 +244,7 @@ module LWS::Ticket
244
244
  uri: "accounts/:id"
245
245
 
246
246
  # @!attribute assignee_id
247
- # @return [Fixnum, nil] the ID of the account of the user that the
247
+ # @return [Integer, nil] the ID of the account of the user that the
248
248
  # ticket is assigned to
249
249
  attribute :assignee_id
250
250
 
@@ -254,7 +254,7 @@ module LWS::Ticket
254
254
  belongs_to :company, class_name: "LWS::Auth::Company"
255
255
 
256
256
  # @!attribute company_id
257
- # @return [Fixnum] the ID of the company of the user that created the
257
+ # @return [Integer] the ID of the company of the user that created the
258
258
  # ticket
259
259
  attribute :company_id
260
260
 
@@ -276,7 +276,7 @@ module LWS::Ticket
276
276
  belongs_to :group
277
277
 
278
278
  # @!attribute group_id
279
- # @return [Fixnum] the ID of the group the ticket belongs to
279
+ # @return [Integer] the ID of the group the ticket belongs to
280
280
  attribute :group_id
281
281
 
282
282
  # @!attribute messages
@@ -290,7 +290,7 @@ module LWS::Ticket
290
290
  uri: "companies/:id"
291
291
 
292
292
  # @!attribute owner_id
293
- # @return [Fixnum] the ID of the company that is currently handling
293
+ # @return [Integer] the ID of the company that is currently handling
294
294
  # the ticket
295
295
  attribute :owner_id
296
296
 
data/lib/lws/stubbing.rb CHANGED
@@ -97,7 +97,7 @@ module LWS
97
97
  # @param path [String] the path part of the request URI
98
98
  # @param fixture_name [Symbol, nil] the name of the fixture to use as stub
99
99
  # response body (or +nil+ for an empty fixture)
100
- # @param http_status [Fixnum] the HTTP status code to use
100
+ # @param http_status [Integer] the HTTP status code to use
101
101
  # @raise [LWS::Errors::StubError] if the fixture name could not be
102
102
  # found for the given app name and path
103
103
  # @return [void]
data/lib/lws/version.rb CHANGED
@@ -13,6 +13,6 @@ module LWS
13
13
 
14
14
  # The LWS library version.
15
15
  # @note The major and minor version parts match the LWS API version!
16
- VERSION = '6.2.0'.freeze
16
+ VERSION = '6.2.1'.freeze
17
17
 
18
18
  end
data/lws.gemspec CHANGED
@@ -13,19 +13,19 @@ Gem::Specification.new do |s|
13
13
  using the available REST interfaces.}
14
14
 
15
15
  s.add_runtime_dependency 'faraday_middleware', '>= 0.10.0', '< 1.0'
16
- s.add_runtime_dependency 'hashie'
17
- s.add_runtime_dependency 'multi_json'
18
- s.add_runtime_dependency 'pry'
19
- s.add_runtime_dependency 'spyke', '~> 5.2.0'
16
+ s.add_runtime_dependency 'hashie', '~> 3.5'
17
+ s.add_runtime_dependency 'multi_json', '~> 1.12'
18
+ s.add_runtime_dependency 'pry', '~> 0.11'
19
+ s.add_runtime_dependency 'spyke', '~> 5.3'
20
20
  s.add_runtime_dependency 'webmock', '>= 2', '< 4'
21
21
 
22
- s.add_development_dependency 'bundler'
23
- s.add_development_dependency 'minitest'
24
- s.add_development_dependency 'minitest-reporters'
25
- s.add_development_dependency 'rake', '~> 0.9.2'
26
- s.add_development_dependency 'simplecov'
27
- s.add_development_dependency 'simplecov-rcov'
28
- s.add_development_dependency 'yard'
22
+ s.add_development_dependency 'bundler', '~> 1.16'
23
+ s.add_development_dependency 'minitest', '~> 5.10'
24
+ s.add_development_dependency 'minitest-reporters', '~> 1.0'
25
+ s.add_development_dependency 'rake', '~> 12.3'
26
+ s.add_development_dependency 'simplecov', '~> 0.14'
27
+ s.add_development_dependency 'simplecov-rcov', '~> 0.2'
28
+ s.add_development_dependency 'yard', '~> 0.9'
29
29
 
30
30
  s.files = `git ls-files`.split("\n")
31
31
  s.test_files = `git ls-files -- test/*`.split("\n")
@@ -27,12 +27,71 @@ class TestPresenceLocation < MiniTest::Test
27
27
 
28
28
  def test_valid_associations
29
29
  assert_instance_of(LWS::Auth::Company, @location.company)
30
+ assert_instance_of(Location::Map::Position, @location.map_positions.first)
31
+ assert_instance_of(Location::Map, @location.maps.first)
30
32
  assert_instance_of(Person, @location.people.first)
31
33
  assert_instance_of(Reader, @location.readers.first)
34
+ loc = Location.where(includes: "people_tree").find(1)
35
+ assert_instance_of(Person, loc.people_tree.first)
36
+
37
+ child_loc = Location.where(parent_id: 1).first
38
+ assert_instance_of(Location, child_loc)
39
+ assert_instance_of(Location, child_loc.parent)
40
+ assert_instance_of(Location, child_loc.checkout_location)
41
+ end
42
+
43
+ end
44
+
45
+ class TestPresenceLocationMap < MiniTest::Test
46
+
47
+ include LWS::Presence
48
+
49
+ def setup
50
+ @location = Location.find(1)
51
+ # Location maps only exist as child objects of a location
52
+ @map = @location.maps.first
53
+ end
54
+
55
+ def test_valid
56
+ refute_nil(@map)
57
+ assert_instance_of(Location::Map, @map)
58
+ refute_nil(@map.id)
59
+ end
60
+
61
+ def test_valid_associations
62
+ assert_instance_of(Location, @map.location)
63
+ assert_equal(@location, @map.location)
64
+ assert_instance_of(Location::Map::Position, @map.positions.first)
32
65
  end
33
66
 
34
67
  end
35
68
 
69
+ class TestPresenceLocationMapPosition < MiniTest::Test
70
+
71
+ include LWS::Presence
72
+
73
+ def setup
74
+ @location = Location.find(1)
75
+ # Location maps only exist as child objects of a location
76
+ @map = @location.maps.first
77
+ # Location map position only exist as child objects of a location map
78
+ @position = @map.positions.first
79
+ end
80
+
81
+ def test_valid
82
+ refute_nil(@position)
83
+ assert_instance_of(Location::Map::Position, @position)
84
+ refute_nil(@position.id)
85
+ end
86
+
87
+ def test_valid_associations
88
+ # FIXME: Chained associations don't work yet in Spyke (#89)
89
+ #assert_instance_of(Location::Map, @position.location_map)
90
+ #assert_equal(@map, @position.location_map)
91
+ assert_instance_of(Location, @position.tracking_location)
92
+ end
93
+
94
+ end
36
95
  class TestPresencePerson < MiniTest::Test
37
96
 
38
97
  include LWS::Presence
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lws
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.0
4
+ version: 6.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - LeftClick B.V.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-12 00:00:00.000000000 Z
11
+ date: 2019-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday_middleware
@@ -34,58 +34,58 @@ dependencies:
34
34
  name: hashie
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - ">="
37
+ - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '0'
39
+ version: '3.5'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - ">="
44
+ - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '0'
46
+ version: '3.5'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: multi_json
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ">="
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '0'
53
+ version: '1.12'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">="
58
+ - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '0'
60
+ version: '1.12'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: pry
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ">="
65
+ - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '0'
67
+ version: '0.11'
68
68
  type: :runtime
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
- - - ">="
72
+ - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0'
74
+ version: '0.11'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: spyke
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: 5.2.0
81
+ version: '5.3'
82
82
  type: :runtime
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
87
  - !ruby/object:Gem::Version
88
- version: 5.2.0
88
+ version: '5.3'
89
89
  - !ruby/object:Gem::Dependency
90
90
  name: webmock
91
91
  requirement: !ruby/object:Gem::Requirement
@@ -110,100 +110,100 @@ dependencies:
110
110
  name: bundler
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - ">="
113
+ - - "~>"
114
114
  - !ruby/object:Gem::Version
115
- version: '0'
115
+ version: '1.16'
116
116
  type: :development
117
117
  prerelease: false
118
118
  version_requirements: !ruby/object:Gem::Requirement
119
119
  requirements:
120
- - - ">="
120
+ - - "~>"
121
121
  - !ruby/object:Gem::Version
122
- version: '0'
122
+ version: '1.16'
123
123
  - !ruby/object:Gem::Dependency
124
124
  name: minitest
125
125
  requirement: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - ">="
127
+ - - "~>"
128
128
  - !ruby/object:Gem::Version
129
- version: '0'
129
+ version: '5.10'
130
130
  type: :development
131
131
  prerelease: false
132
132
  version_requirements: !ruby/object:Gem::Requirement
133
133
  requirements:
134
- - - ">="
134
+ - - "~>"
135
135
  - !ruby/object:Gem::Version
136
- version: '0'
136
+ version: '5.10'
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: minitest-reporters
139
139
  requirement: !ruby/object:Gem::Requirement
140
140
  requirements:
141
- - - ">="
141
+ - - "~>"
142
142
  - !ruby/object:Gem::Version
143
- version: '0'
143
+ version: '1.0'
144
144
  type: :development
145
145
  prerelease: false
146
146
  version_requirements: !ruby/object:Gem::Requirement
147
147
  requirements:
148
- - - ">="
148
+ - - "~>"
149
149
  - !ruby/object:Gem::Version
150
- version: '0'
150
+ version: '1.0'
151
151
  - !ruby/object:Gem::Dependency
152
152
  name: rake
153
153
  requirement: !ruby/object:Gem::Requirement
154
154
  requirements:
155
155
  - - "~>"
156
156
  - !ruby/object:Gem::Version
157
- version: 0.9.2
157
+ version: '12.3'
158
158
  type: :development
159
159
  prerelease: false
160
160
  version_requirements: !ruby/object:Gem::Requirement
161
161
  requirements:
162
162
  - - "~>"
163
163
  - !ruby/object:Gem::Version
164
- version: 0.9.2
164
+ version: '12.3'
165
165
  - !ruby/object:Gem::Dependency
166
166
  name: simplecov
167
167
  requirement: !ruby/object:Gem::Requirement
168
168
  requirements:
169
- - - ">="
169
+ - - "~>"
170
170
  - !ruby/object:Gem::Version
171
- version: '0'
171
+ version: '0.14'
172
172
  type: :development
173
173
  prerelease: false
174
174
  version_requirements: !ruby/object:Gem::Requirement
175
175
  requirements:
176
- - - ">="
176
+ - - "~>"
177
177
  - !ruby/object:Gem::Version
178
- version: '0'
178
+ version: '0.14'
179
179
  - !ruby/object:Gem::Dependency
180
180
  name: simplecov-rcov
181
181
  requirement: !ruby/object:Gem::Requirement
182
182
  requirements:
183
- - - ">="
183
+ - - "~>"
184
184
  - !ruby/object:Gem::Version
185
- version: '0'
185
+ version: '0.2'
186
186
  type: :development
187
187
  prerelease: false
188
188
  version_requirements: !ruby/object:Gem::Requirement
189
189
  requirements:
190
- - - ">="
190
+ - - "~>"
191
191
  - !ruby/object:Gem::Version
192
- version: '0'
192
+ version: '0.2'
193
193
  - !ruby/object:Gem::Dependency
194
194
  name: yard
195
195
  requirement: !ruby/object:Gem::Requirement
196
196
  requirements:
197
- - - ">="
197
+ - - "~>"
198
198
  - !ruby/object:Gem::Version
199
- version: '0'
199
+ version: '0.9'
200
200
  type: :development
201
201
  prerelease: false
202
202
  version_requirements: !ruby/object:Gem::Requirement
203
203
  requirements:
204
- - - ">="
204
+ - - "~>"
205
205
  - !ruby/object:Gem::Version
206
- version: '0'
206
+ version: '0.9'
207
207
  description: |-
208
208
  This library for Ruby provides access to the LeftClick
209
209
  web services/applications using a model-based structure that abstracts from API calls