bucky-core 0.10.23 → 0.10.25

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9e89072db00e4df5e80e1f278d15e0976743423838a641c1df204754a4acfde8
4
- data.tar.gz: f18a891e5334b570789f295704764b51684dc55c4a805ea20e2cab90481987ae
3
+ metadata.gz: 529d73c4b8d5bc2238aa4106ee50060335b2ff95642e62ff0335504e4b8e6eea
4
+ data.tar.gz: e7866e2b1fb1a79ebbe0749fa67c3d3ae2d821722d377ec7f7c7b5157d0d389c
5
5
  SHA512:
6
- metadata.gz: b4e80a78747cebdf3d7e6a03d94e5e17fc0f271944864a34a69bdc5691ed8e82daf7aecf61f861a91ba09840d56a552bf89c204bdbd2ccb41b44077344682fe7
7
- data.tar.gz: 4b173d92d41bf7ff4eeb86bd29862e07d449d59f55fce945735158acaccc5a5b28f47bce4fccd03db0209a2980e0477a0dbccd976bc74571f810217d7004613b
6
+ metadata.gz: 3523f257bdfabbf83f6e03869d7a21f74e2280880a4a6f463626f5f1649718ad8cd82507e13fd11185ed60ae19ec3e910643cc69efe76950540074a4b962e8da
7
+ data.tar.gz: 3bc159831bc9312e4c6714ca14b73707e000ffdb0ee9ec8995e204a2c7c5fc7a28972b802d00686254eb15a0f5f82466063d1e97db7976da4ffa949e8e303f65
data/README.md CHANGED
@@ -155,7 +155,7 @@ cases:
155
155
  - proc: open page
156
156
  exec:
157
157
  operate: go
158
- url: <%= ENV['FQDN'] %>/results # Using erb notation to get environment variable
158
+ url: <%= ENV['BASE_FQDN'] %>/results # Using erb notation to get environment variable
159
159
  - proc: element click
160
160
  exec:
161
161
  operate: click
@@ -224,7 +224,7 @@ cases:
224
224
  desc: status check for detail page
225
225
  urls:
226
226
  - https://example.com/detail/1
227
- - <%= ENV['FQDN'] %>/detail/2 # Using erb notation to get environment variable
227
+ - <%= ENV['BASE_FQDN'] %>/detail/2 # Using erb notation to get environment variable
228
228
  ```
229
229
 
230
230
  # Development
data/exe/bucky CHANGED
@@ -135,6 +135,7 @@ def setup_test_cond(test_cond)
135
135
  %i[suite_name case label xlabel device].each do |k|
136
136
  test_cond[k] = test_cond[k].split(',') unless test_cond[k].nil?
137
137
  end
138
+ test_cond[:base_fqdn] = ENV['BASE_FQDN'] ||= ''
138
139
  test_cond
139
140
  end
140
141
 
@@ -15,11 +15,13 @@ module Bucky
15
15
 
16
16
  # Save job data and return job id
17
17
  # @param [Time] start_time
18
+ # @param [String] command_and_option
19
+ # @param [String] fqdn
18
20
  # @return [Fixnum] job_id
19
- def save_job_record_and_get_job_id(start_time, command_and_option)
21
+ def save_job_record_and_get_job_id(start_time, command_and_option, fqdn)
20
22
  return 0 if $debug
21
23
 
22
- job_id = @connector.con[:jobs].insert(start_time: start_time, command_and_option: command_and_option)
24
+ job_id = @connector.con[:jobs].insert(start_time: start_time, command_and_option: command_and_option, base_fqdn: fqdn)
23
25
  @connector.disconnect
24
26
  job_id
25
27
  end
@@ -93,7 +93,7 @@ module Bucky
93
93
  @re_test_count = @test_cond[:re_test_count]
94
94
  @tdo = Bucky::Core::Database::TestDataOperator.new
95
95
  @start_time = Time.now
96
- $job_id = @tdo.save_job_record_and_get_job_id(@start_time, @test_cond[:command_and_option])
96
+ $job_id = @tdo.save_job_record_and_get_job_id(@start_time, @test_cond[:command_and_option], @test_cond[:base_fqdn])
97
97
  @json_report = {
98
98
  summary: {
99
99
  cases_count: 0,
@@ -18,7 +18,11 @@ module Bucky
18
18
  # @return [Net::HTTP] HttpStatusCode
19
19
  def get_response(uri, device, open_timeout, read_timeout)
20
20
  parsed_uri = Addressable::URI.parse(uri.to_str.strip)
21
- query = parsed_uri.query ? "?#{CGI.escape(parsed_uri.query)}" : ''
21
+ query = if parsed_uri.query.nil?
22
+ ''
23
+ else
24
+ '?' + parsed_uri.query_values.map { |k, v| "#{CGI.escape(k)}=#{CGI.escape(v)}" }.join('&')
25
+ end
22
26
  # If path is empty, add "/" e.g) http://example.com
23
27
  path = parsed_uri.path.empty? ? '/' : parsed_uri.path
24
28
 
data/lib/bucky/version.rb CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Bucky
4
4
  module Version
5
- VERSION = '0.10.23'
5
+ VERSION = '0.10.25'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bucky-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.23
4
+ version: 0.10.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - NaotoKishino
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: exe
15
15
  cert_chain: []
16
- date: 2022-10-26 00:00:00.000000000 Z
16
+ date: 2023-08-08 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: awesome_print