rcap 2.7.3 → 2.7.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -107,33 +107,33 @@ describe(RCAP::CAP_1_2::Resource) do
107
107
  end
108
108
 
109
109
  it('should set the resource description') do
110
- @resource_hash[ RCAP::CAP_1_2::Resource::RESOURCE_DESC_KEY].should == @resource.resource_desc
110
+ @resource_hash[RCAP::CAP_1_2::Resource::RESOURCE_DESC_KEY].should == @resource.resource_desc
111
111
  end
112
112
 
113
113
  it('should set the mime type') do
114
- @resource_hash[ RCAP::CAP_1_2::Resource::MIME_TYPE_KEY].should == @resource.mime_type
114
+ @resource_hash[RCAP::CAP_1_2::Resource::MIME_TYPE_KEY].should == @resource.mime_type
115
115
  end
116
116
 
117
117
  it('should set the size') do
118
- @resource_hash[ RCAP::CAP_1_2::Resource::SIZE_KEY].should == @resource.size
118
+ @resource_hash[RCAP::CAP_1_2::Resource::SIZE_KEY].should == @resource.size
119
119
  end
120
120
 
121
121
  it('should set the URI') do
122
- @resource_hash[ RCAP::CAP_1_2::Resource::URI_KEY].should == @resource.uri
122
+ @resource_hash[RCAP::CAP_1_2::Resource::URI_KEY].should == @resource.uri
123
123
  end
124
124
 
125
125
  it('should set the dereferenced URI') do
126
- @resource_hash[ RCAP::CAP_1_2::Resource::DEREF_URI_KEY].should == @resource.deref_uri
126
+ @resource_hash[RCAP::CAP_1_2::Resource::DEREF_URI_KEY].should == @resource.deref_uri
127
127
  end
128
128
 
129
129
  it('should set the digest') do
130
- @resource_hash[ RCAP::CAP_1_2::Resource::DIGEST_KEY].should == @resource.digest
130
+ @resource_hash[RCAP::CAP_1_2::Resource::DIGEST_KEY].should == @resource.digest
131
131
  end
132
132
  end
133
133
 
134
134
  context('to xml') do
135
135
  it('should be successful') do
136
- lambda { @resource_xml = @resource.to_xml }.should_not(raise_exception)
136
+ -> { @resource_xml = @resource.to_xml }.should_not(raise_exception)
137
137
  end
138
138
  end
139
139
  end
@@ -174,15 +174,15 @@ describe(RCAP::CAP_1_2::Resource) do
174
174
 
175
175
  describe('calling dereference_uri!') do
176
176
  it('should fetch the content and store it in deref_uri as Base64 encoded content') do
177
- lambda { @resource.dereference_uri! }.should(change(@resource, :deref_uri).to(@encoded_content))
177
+ -> { @resource.dereference_uri! }.should(change(@resource, :deref_uri).to(@encoded_content))
178
178
  end
179
179
 
180
180
  it('should generate the correct SHA1 hash') do
181
- lambda { @resource.dereference_uri! }.should(change(@resource, :digest).to(Digest::SHA1.hexdigest(@encoded_content)))
181
+ -> { @resource.dereference_uri! }.should(change(@resource, :digest).to(Digest::SHA1.hexdigest(@encoded_content)))
182
182
  end
183
183
 
184
184
  it('should set the size in bytes') do
185
- lambda { @resource.dereference_uri! }.should(change(@resource, :size).to(@encoded_content.bytesize))
185
+ -> { @resource.dereference_uri! }.should(change(@resource, :size).to(@encoded_content.bytesize))
186
186
  end
187
187
  end
188
188
  end
@@ -201,11 +201,11 @@ describe(RCAP::CAP_1_2::Resource) do
201
201
 
202
202
  describe('#calculate_hash_and_size') do
203
203
  it('should generate the correct SHA1 hash') do
204
- lambda { @resource.calculate_hash_and_size }.should(change(@resource, :digest).to(Digest::SHA1.hexdigest(@encoded_content)))
204
+ -> { @resource.calculate_hash_and_size }.should(change(@resource, :digest).to(Digest::SHA1.hexdigest(@encoded_content)))
205
205
  end
206
206
 
207
207
  it('should set the size in bytes') do
208
- lambda { @resource.calculate_hash_and_size }.should(change(@resource, :size).to(@encoded_content.bytesize))
208
+ -> { @resource.calculate_hash_and_size }.should(change(@resource, :size).to(@encoded_content.bytesize))
209
209
  end
210
210
  end
211
211
 
@@ -14,7 +14,7 @@ describe(Array) do
14
14
 
15
15
  context('without an element containing white space') do
16
16
  before(:all) do
17
- @list = %w(one two three)
17
+ @list = %w[one two three]
18
18
  end
19
19
  it('should format the list correctly') do
20
20
  @list.to_s_for_cap.should == 'one two three'
@@ -51,7 +51,7 @@ describe(String) do
51
51
  end
52
52
 
53
53
  it('should unpack strings correclty') do
54
- 'Item1 Item2 Item3'.unpack_cap_list.should == %w(Item1 Item2 Item3)
54
+ 'Item1 Item2 Item3'.unpack_cap_list.should == %w[Item1 Item2 Item3]
55
55
  end
56
56
  end
57
57
 
@@ -2,7 +2,7 @@ require 'rcap'
2
2
  require 'webmock/rspec'
3
3
 
4
4
  def random_circle_hash
5
- { lattitude: rand(360) - 180,
6
- longitude: rand(180) - 90,
5
+ { lattitude: rand(-180..180),
6
+ longitude: rand(-90..90),
7
7
  radius: rand(50) }
8
8
  end
@@ -155,7 +155,6 @@ describe(Validation::ClassMethods) do
155
155
  @object.contingent_value = nil
156
156
  @object.should(be_valid)
157
157
  end
158
-
159
158
  end
160
159
 
161
160
  context('with :is') do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcap
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.7.3
4
+ version: 2.7.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Farrel Lifson
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-14 00:00:00.000000000 Z
11
+ date: 2021-01-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -206,7 +206,7 @@ files:
206
206
  homepage: http://www.aimred.com/projects/rcap
207
207
  licenses: []
208
208
  metadata: {}
209
- post_install_message:
209
+ post_install_message:
210
210
  rdoc_options: []
211
211
  require_paths:
212
212
  - lib
@@ -221,9 +221,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
223
  requirements: []
224
- rubyforge_project: rcap
225
- rubygems_version: 2.7.3
226
- signing_key:
224
+ rubygems_version: 3.1.2
225
+ signing_key:
227
226
  specification_version: 4
228
227
  summary: CAP(Common Alerting Protocol) API
229
228
  test_files: