wikk_webbrowser 0.9.7 → 0.9.8

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.
Files changed (5) hide show
  1. checksums.yaml +4 -4
  2. data/History.txt +10 -0
  3. data/lib/wikk_webbrowser.rb +11 -10
  4. data/version +1 -1
  5. metadata +5 -5
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 271c33be56dd2927bb32996ed6e373d7c28fdebd533cc600786023986fe294ab
4
- data.tar.gz: b3dbb2f606d3bc176a72fb00a81e32c8d253e2f89ae3558395a0ddb09b391e47
3
+ metadata.gz: 97d467b1c73719e5792766843f0022dfc1e3b66aa6f80d5627cce822c295a6a2
4
+ data.tar.gz: 8c7bbc76ec4290ed8277beb7a624f9c9a4b4db95ac362a4c22d29790608f093d
5
5
  SHA512:
6
- metadata.gz: b9cdfbeab4339aa17b567581d715160ec3d709441a343604eb877c400bb8d9ecb8100c5ee1de3e498fdc1b06c05cf89e65597bc190df81037d5cc567c5df974c
7
- data.tar.gz: d7d9b2ab219818510dc48c9bc0ac4e99d25dc4c5903d7754dd9c3988ba97d65a935d778d9f75e57198d4ee6e5fd068d0059333ff02051ff7c781626bf890fc1a
6
+ metadata.gz: b6dde99ae5e31f08eefc8a06abb4cb55e7778af435523199a03e50d5bdc62bbdcb249c1a7e9e5c54aa91c13c86e2cf1ac668ab1ef0478dd9df42d71863b6ac26
7
+ data.tar.gz: 92575280201954924c2aa9eb1da7ab424939ba3a204ea6046dc7ca6a21620f1b637750dd086eb24a332aa7e4910dc589e9afa786d464ffde3f11b7dce121ffb4
data/History.txt CHANGED
@@ -1,3 +1,13 @@
1
+ robertburrowes Tue Sep 20 11:54:06 2022 +1200
2
+ Fix broken post, when we should be converting 'data' into json, but weren't
3
+ robertburrowes Mon Jun 13 17:53:47 2022 +1200
4
+ use bash
5
+ robertburrowes Mon Jun 13 13:46:47 2022 +1200
6
+ scripts should be bash
7
+ robertburrowes Mon Jun 13 12:22:50 2022 +1200
8
+ comment
9
+ robertburrowes Sun May 15 10:06:52 2022 +1200
10
+ Push tags too
1
11
  robertburrowes Mon May 9 17:02:06 2022 +1200
2
12
  Duplicated Put, changing all Puts to Patch
3
13
  robertburrowes Mon Sep 20 12:14:31 2021 +1200
@@ -1,4 +1,5 @@
1
- module WIKK # :nodoc:
1
+ # Stay in our own namespace
2
+ module WIKK
2
3
  require 'net/http'
3
4
  require 'net/https'
4
5
  require 'uri'
@@ -13,7 +14,7 @@ module WIKK # :nodoc:
13
14
  # response = get_page(query: ,'/')
14
15
  # end
15
16
  class WebBrowser
16
- VERSION = '0.9.7'
17
+ VERSION = '0.9.8'
17
18
 
18
19
  class Error < RuntimeError # :nodoc:
19
20
  attr_accessor :web_return_code
@@ -241,14 +242,14 @@ module WIKK # :nodoc:
241
242
 
242
243
  if data.nil?
243
244
  req.body = ''
244
- elsif data.instance_of?(Hash)
245
- if content_type =~ /application\/octet-stream/
246
- req.set_form_data(data, '&')
247
- else
248
- req.set_form_data.to_j
249
- end
250
- else
251
- req.body = data # If json as a string or raw string
245
+ elsif data.instance_of?(String)
246
+ req.body = data # If we are given a String, just use it as is
247
+ elsif content_type =~ /application\/json/
248
+ req.body = data.to_j # Encode data as json. It wasn't already a String.
249
+ elsif content_type =~ /application\/octet-stream/ && (data.instance_of?(Hash) || data.instance_of?(Array))
250
+ req.set_form_data(data, '&') # Should handle Array as multiple entries with the same key, and Hash
251
+ else # Assuming data can become a string that makes sense to the other end
252
+ req.body = data.to_s # raw string
252
253
  end
253
254
 
254
255
  @response = @session.request(req)
data/version CHANGED
@@ -1,2 +1,2 @@
1
1
  PROJECT="wikk_webbrowser"
2
- VERSION="0.9.7"
2
+ VERSION="0.9.8"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wikk_webbrowser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.7
4
+ version: 0.9.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Burrowes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-09 00:00:00.000000000 Z
11
+ date: 2022-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -70,14 +70,14 @@ dependencies:
70
70
  requirements:
71
71
  - - "~>"
72
72
  - !ruby/object:Gem::Version
73
- version: '3.23'
73
+ version: '3.25'
74
74
  type: :development
75
75
  prerelease: false
76
76
  version_requirements: !ruby/object:Gem::Requirement
77
77
  requirements:
78
78
  - - "~>"
79
79
  - !ruby/object:Gem::Version
80
- version: '3.23'
80
+ version: '3.25'
81
81
  description: |-
82
82
  Wrapper around ruby http and https libraries.
83
83
 
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
122
  - !ruby/object:Gem::Version
123
123
  version: '0'
124
124
  requirements: []
125
- rubygems_version: 3.2.22
125
+ rubygems_version: 3.3.7
126
126
  signing_key:
127
127
  specification_version: 4
128
128
  summary: Wrapper around ruby http and https libraries