itriagetestrail 1.0.31 → 1.0.32

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ddb1242abc0ff09697334bb9ad6e3470cf09ef0e294f5a3b2547a1a6720cb2d3
4
- data.tar.gz: 99b08bd93f90d1b1f38cc8cee408fdcb301d5d4ff6f25cd3a53ed6792f304a7b
3
+ metadata.gz: ad0376c30783bd5471cea76bb1b157e0b2333a584a7bec83702e87aa514bc852
4
+ data.tar.gz: ece4be458e080677840d9be9495ba87deb2589c1939c10778261b75f0bffc30e
5
5
  SHA512:
6
- metadata.gz: 21bbeeda1120f7154bbafd46c01c5215e1ea61d12ee80d4c0e85226d072f030ab57296bfc6b1d329ec979385646b8e7d7e125df86d3f5b6906c6df1252b77cd5
7
- data.tar.gz: 2613c0fc5457c8d58bed52887dc3d1d4362c5d1540b900f52fb425f541447814345a14d6dc71dab2e8fe212a09ad321d37458a0b3dd9aab944b5fb668309fab8
6
+ metadata.gz: 92e1def1b82318ac9025e9f19f7c854260034d41a881541547e5312810a935cc2542245c8083db7dd101aa588cb46e2f86d18d5dbc41e7513efc1859de96826a
7
+ data.tar.gz: ccbec882b6cc2eb61c8659a788e2efcce921f38a06e89ae28561d1f260747501eada636f0b59d7af14dca974e89d0e347bf2bd321e031c09c230e18ee739f051
@@ -146,39 +146,39 @@ module TestRail
146
146
  file.write("#{Time.now},#{endpoint}\n")
147
147
  file.close
148
148
  end
149
- end
150
149
 
151
- def cache_to_file(url, content)
152
- Dir.mkdir('./tmp') unless File.exist?('./tmp')
153
- filename = sanitize_filename(url)
154
- file = File.open("./tmp/#{filename}", 'w')
155
- file.write(content)
156
- file.close
157
- end
150
+ def cache_to_file(url, content)
151
+ Dir.mkdir('./tmp') unless File.exist?('./tmp')
152
+ filename = sanitize_filename(url)
153
+ file = File.open("./tmp/#{filename}", 'w')
154
+ file.write(content)
155
+ file.close
156
+ end
158
157
 
159
- def read_cache(url)
160
- filename = sanitize_filename(url)
161
- return unless File.exist?("./tmp/#{filename}")
162
- file = File.open("./tmp/#{filename}", 'r')
163
- content = JSON.parse(file.read, :symbolize_names => true)
164
- file.close
165
- content
166
- end
158
+ def read_cache(url)
159
+ filename = sanitize_filename(url)
160
+ return unless File.exist?("./tmp/#{filename}")
161
+ file = File.open("./tmp/#{filename}", 'r')
162
+ content = JSON.parse(file.read, :symbolize_names => true)
163
+ file.close
164
+ content
165
+ end
167
166
 
168
- def sanitize_filename(filename)
169
- # Split the name when finding a period which is preceded by some
170
- # character, and is followed by some character other than a period,
171
- # if there is no following period that is followed by something
172
- # other than a period (yeah, confusing, I know)
173
- fn = filename.split /(?<=.)\.(?=[^.])(?!.*\.[^.])/m
167
+ def sanitize_filename(filename)
168
+ # Split the name when finding a period which is preceded by some
169
+ # character, and is followed by some character other than a period,
170
+ # if there is no following period that is followed by something
171
+ # other than a period (yeah, confusing, I know)
172
+ fn = filename.split /(?<=.)\.(?=[^.])(?!.*\.[^.])/m
174
173
 
175
- # We now have one or two parts (depending on whether we could find
176
- # a suitable period). For each of these parts, replace any unwanted
177
- # sequence of characters with an underscore
178
- fn.map! { |s| s.gsub /[^a-z0-9\-]+/i, '_' }
174
+ # We now have one or two parts (depending on whether we could find
175
+ # a suitable period). For each of these parts, replace any unwanted
176
+ # sequence of characters with an underscore
177
+ fn.map! { |s| s.gsub /[^a-z0-9\-]+/i, '_' }
179
178
 
180
- # Finally, join the parts with a period and return the result
181
- return fn.join '.'
179
+ # Finally, join the parts with a period and return the result
180
+ return fn.join '.'
181
+ end
182
182
  end
183
183
 
184
184
  class APIError < StandardError
@@ -1,3 +1,3 @@
1
1
  module Itriagetestrail
2
- VERSION = '1.0.31'.freeze
2
+ VERSION = '1.0.32'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: itriagetestrail
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.31
4
+ version: 1.0.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - a801069