wreq-rb 0.3.3-x86_64-linux → 0.4.0-x86_64-linux

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: cf84faeca7aa9a95fbcf9b668759a3a6dc32feac3db1ab31b83d8913f396cae4
4
- data.tar.gz: 49b0600349bdd1ec3c15dd2ffcf03fec6788fc7ba3760cf4e8973b2f4f997138
3
+ metadata.gz: 45e9244eaa5314f5f2911f9f63d7921e6122201dd7d6365bc7bde52d7f206cc5
4
+ data.tar.gz: b510bfdc5608384768a1f55bacddf4b7afaab3d7d50efb2ac3965407eb0ef0ae
5
5
  SHA512:
6
- metadata.gz: 8a7e145c477b0fe490232c1667dc88e69be08e6f0a8fd6e5a954206596f38346ff6319dd6437d5ae7fb9da370ed3103f203d8ecc238bfd2e77cd8374c119ba12
7
- data.tar.gz: 706122cb902ef405776ebbc91f34c9677e32d87a039600b64db7b6a1e9dfe4a874c4be8571d9bff9b5eff2d8cfe939d5d6142b7ec32df43ed3cc856d060c4401
6
+ metadata.gz: cf92efbdef531bcf02ef5d601cee3ac144546f6d900f93ee0dda7ceac2a6822eb616dd06269de5d50b138a1f186d73712b39f199850bbf6d72379d797434cf30
7
+ data.tar.gz: 1de845fcf3ee8c58cfaba52a0998c96d2cf18faf0dfcd812d6aa07ec43ef9ee12a5617c76b5b07da46c5fdd66c9ef80a6fd101c8804d017a529b2c632882167b
data/README.md CHANGED
@@ -76,6 +76,7 @@ client = Wreq::Client.new(
76
76
  deflate: true, # enable deflate decompression
77
77
  zstd: true, # enable zstd decompression
78
78
  emulation: "chrome_143", # browser emulation (enabled by default)
79
+ emulation_os: "windows", # OS emulation: windows, macos (default), linux, android, ios
79
80
  headers: { # default headers for all requests
80
81
  "Accept" => "application/json"
81
82
  }
@@ -116,6 +117,7 @@ Pass an options hash as the second argument to any HTTP method:
116
117
  | `basic` | Array | `[username, password]` for Basic auth |
117
118
  | `proxy` | String | Per-request proxy URL |
118
119
  | `emulation` | String/Boolean | Per-request emulation override |
120
+ | `emulation_os` | String | OS emulation: `windows`, `macos`, `linux`, `android`, `ios` |
119
121
 
120
122
  ## Browser Emulation
121
123
 
@@ -132,6 +134,10 @@ client = Wreq::Client.new(emulation: "edge_142")
132
134
  # Disable emulation entirely
133
135
  client = Wreq::Client.new(emulation: false)
134
136
 
137
+ # Emulate a specific OS (default is macOS)
138
+ client = Wreq::Client.new(emulation: "chrome_145", emulation_os: "windows")
139
+ client = Wreq::Client.new(emulation: "chrome_145", emulation_os: "linux")
140
+
135
141
  # Emulation + custom user-agent (user_agent overrides emulation's UA)
136
142
  client = Wreq::Client.new(emulation: "chrome_143", user_agent: "MyBot/1.0")
137
143
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Wreq
4
- VERSION = "0.3.3"
4
+ VERSION = "0.4.0"
5
5
  end
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wreq-rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.4.0
5
5
  platform: x86_64-linux
6
6
  authors:
7
7
  - Yicheng Zhou