oslg 0.2.5 → 0.2.6

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: 398d4fc89206f836beea1d95578ef91629243c4f037ab9ac304359c16843e6ab
4
- data.tar.gz: dcfb0a23e252ac13a396fda86117d7ae04aa087e9e4ec740c5efb93f2637b701
3
+ metadata.gz: 5d9b0ecd08d5975a017a4133b83cd7deea1a21427d923651ff629347ee4b8e83
4
+ data.tar.gz: 637c081134c0fc036048c62a17bf7e95087c807c34921bd80ebb3d53f0996346
5
5
  SHA512:
6
- metadata.gz: 5d8b0d2c29ab175e2179d6caaf10b155720a64f2063a1249e8523808020f0f46d0de743c566634e9bcf6e2f6bd0d001eb7470cfc322e67165a0b6841251032f8
7
- data.tar.gz: 95a1e72eb075129b5e7e01f94b5a6c2341c47314733c38ae0d51b7b8b501d2b453259c03c5698a8c77aa3566d6f9a648350b4d09ed4f9ffbf3e74d07069574fd
6
+ metadata.gz: cf5fddfd6703ac80fdcc94818db3f9c5d58c27a9f7617db8d04b92b78b9e442937551857fa4c7c9a1d470703f89499a484d55f49c1b8e30ebb72cd8266d63676
7
+ data.tar.gz: 36411cd8958dd7e387e34ecd901c9cc12ff62cf37fb483e3c5d88954732857eaf796609cc358dea417ece8fe06f11f1e5526e2e1760a5444c3ffcdbdcd3d14a2
@@ -7,7 +7,7 @@ on:
7
7
 
8
8
  jobs:
9
9
  test_300x:
10
- runs-on: ubuntu-18.04
10
+ runs-on: ubuntu-22.04
11
11
  steps:
12
12
  - name: Check out repository
13
13
  uses: actions/checkout@v2
@@ -23,7 +23,7 @@ jobs:
23
23
  docker exec -t test bundle exec rake
24
24
  docker kill test
25
25
  test_321x:
26
- runs-on: ubuntu-18.04
26
+ runs-on: ubuntu-22.04
27
27
  steps:
28
28
  - name: Check out repository
29
29
  uses: actions/checkout@v2
@@ -39,7 +39,7 @@ jobs:
39
39
  docker exec -t test bundle exec rake
40
40
  docker kill test
41
41
  test_330x:
42
- runs-on: ubuntu-20.04
42
+ runs-on: ubuntu-22.04
43
43
  steps:
44
44
  - name: Check out repository
45
45
  uses: actions/checkout@v2
@@ -55,7 +55,7 @@ jobs:
55
55
  docker exec -t test bundle exec rake
56
56
  docker kill test
57
57
  test_340x:
58
- runs-on: ubuntu-20.04
58
+ runs-on: ubuntu-22.04
59
59
  steps:
60
60
  - name: Check out repository
61
61
  uses: actions/checkout@v2
@@ -70,3 +70,19 @@ jobs:
70
70
  docker exec -t test bundle update
71
71
  docker exec -t test bundle exec rake
72
72
  docker kill test
73
+ test_351x:
74
+ runs-on: ubuntu-22.04
75
+ steps:
76
+ - name: Check out repository
77
+ uses: actions/checkout@v2
78
+ - name: Run Tests
79
+ run: |
80
+ echo $(pwd)
81
+ echo $(ls)
82
+ docker pull nrel/openstudio:3.5.1
83
+ docker run --name test --rm -d -t -v $(pwd):/work -w /work nrel/openstudio:3.5.1
84
+ docker exec -t test pwd
85
+ docker exec -t test ls
86
+ docker exec -t test bundle update
87
+ docker exec -t test bundle exec rake
88
+ docker kill test
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  BSD 3-Clause License
2
2
 
3
- Copyright (c) 2022, Denis Bourgeois
3
+ Copyright (c) 2022-2023, Denis Bourgeois
4
4
  All rights reserved.
5
5
 
6
6
  Redistribution and use in source and binary forms, with or without
data/lib/oslg/oslog.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # BSD 3-Clause License
2
2
  #
3
- # Copyright (c) 2022, Denis Bourgeois
3
+ # Copyright (c) 2022-2023, Denis Bourgeois
4
4
  # All rights reserved.
5
5
  #
6
6
  # Redistribution and use in source and binary forms, with or without
@@ -127,6 +127,7 @@ module OSlg
127
127
  # @return [String] "DEBUG", "INFO", "WARN", "ERROR" or "FATAL"
128
128
  def tag(level)
129
129
  return @@tag[level] if level >= DEBUG && level <= FATAL
130
+
130
131
  ""
131
132
  end
132
133
 
@@ -138,6 +139,7 @@ module OSlg
138
139
  # @return [String] preset OSlg message
139
140
  def msg(status)
140
141
  return @@msg[status] if status >= DEBUG && status <= FATAL
142
+
141
143
  ""
142
144
  end
143
145
 
@@ -163,6 +165,7 @@ module OSlg
163
165
  @@logs << {level: level, message: message}
164
166
  @@status = level if level > @@status
165
167
  end
168
+
166
169
  @@status
167
170
  end
168
171
 
@@ -194,10 +197,11 @@ module OSlg
194
197
  mth = mth[0...60] + " ..." if mth.length > 60
195
198
  return res if mth.empty?
196
199
 
197
- msg = "Invalid '#{id}' "
200
+ msg = "Invalid '#{id}' "
198
201
  msg += "arg ##{ord} " if ord > 0
199
202
  msg += "(#{mth})"
200
203
  log(lvl, msg) if lvl >= DEBUG && lvl <= FATAL
204
+
201
205
  res
202
206
  end
203
207
 
@@ -232,6 +236,7 @@ module OSlg
232
236
 
233
237
  msg = "'#{id}' #{obj.class}? expecting #{cl} (#{mth})"
234
238
  log(lvl, msg) if lvl >= DEBUG && lvl <= FATAL
239
+
235
240
  res
236
241
  end
237
242
 
@@ -264,8 +269,9 @@ module OSlg
264
269
  mth = mth[0...60] + " ..." if mth.length > 60
265
270
  return res if mth.empty?
266
271
 
267
- msg = "Missing '#{key}' key in '#{id}' Hash (#{mth})"
272
+ msg = "Missing '#{key}' key in '#{id}' Hash (#{mth})"
268
273
  log(lvl, msg) if lvl >= DEBUG && lvl <= FATAL
274
+
269
275
  res
270
276
  end
271
277
 
@@ -294,8 +300,9 @@ module OSlg
294
300
  mth = mth[0...60] + " ..." if mth.length > 60
295
301
  return res if mth.empty?
296
302
 
297
- msg = "Empty '#{id}' (#{mth})"
303
+ msg = "Empty '#{id}' (#{mth})"
298
304
  log(lvl, msg) if lvl >= DEBUG && lvl <= FATAL
305
+
299
306
  res
300
307
  end
301
308
 
@@ -325,8 +332,9 @@ module OSlg
325
332
  mth = mth[0...60] + " ..." if mth.length > 60
326
333
  return res if mth.empty?
327
334
 
328
- msg = "Zero '#{id}' (#{mth})"
335
+ msg = "Zero '#{id}' (#{mth})"
329
336
  log(lvl, msg) if lvl >= DEBUG && lvl <= FATAL
337
+
330
338
  res
331
339
  end
332
340
 
@@ -355,9 +363,10 @@ module OSlg
355
363
 
356
364
  mth = mth[0...60] + " ..." if mth.length > 60
357
365
  return res if mth.empty?
358
-
359
- msg = "Negative '#{id}' (#{mth})"
366
+
367
+ msg = "Negative '#{id}' (#{mth})"
360
368
  log(lvl, msg) if lvl >= DEBUG && lvl <= FATAL
369
+
361
370
  res
362
371
  end
363
372
 
@@ -368,6 +377,7 @@ module OSlg
368
377
  def clean!
369
378
  @@status = 0
370
379
  @@logs = []
380
+
371
381
  @@level
372
382
  end
373
383
 
data/lib/oslg/version.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # BSD 3-Clause License
2
2
  #
3
- # Copyright (c) 2022, Denis Bourgeois
3
+ # Copyright (c) 2022-2023, Denis Bourgeois
4
4
  # All rights reserved.
5
5
  #
6
6
  # Redistribution and use in source and binary forms, with or without
@@ -29,5 +29,5 @@
29
29
  # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30
30
 
31
31
  module OSlg
32
- VERSION = "0.2.5".freeze
32
+ VERSION = "0.2.6".freeze
33
33
  end
data/lib/oslg.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # BSD 3-Clause License
2
2
  #
3
- # Copyright (c) 2022, Denis Bourgeois
3
+ # Copyright (c) 2022-2023, Denis Bourgeois
4
4
  # All rights reserved.
5
5
  #
6
6
  # Redistribution and use in source and binary forms, with or without
data/oslg.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |s|
31
31
  s.add_development_dependency "rake", "~> 13.0"
32
32
  s.add_development_dependency "rspec", "~> 3.11"
33
33
 
34
- s.metadata["homepage_uri"] = s.homepage
34
+ s.metadata["homepage_uri" ] = s.homepage
35
35
  s.metadata["source_code_uri"] = "#{s.homepage}/tree/v#{s.version}"
36
36
  s.metadata["bug_tracker_uri"] = "#{s.homepage}/issues"
37
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oslg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Denis Bourgeois
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-08-01 00:00:00.000000000 Z
11
+ date: 2023-01-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -76,7 +76,7 @@ licenses:
76
76
  - BSD-3-Clause
77
77
  metadata:
78
78
  homepage_uri: https://github.com/rd2/oslg
79
- source_code_uri: https://github.com/rd2/oslg/tree/v0.2.5
79
+ source_code_uri: https://github.com/rd2/oslg/tree/v0.2.6
80
80
  bug_tracker_uri: https://github.com/rd2/oslg/issues
81
81
  post_install_message:
82
82
  rdoc_options: []