puppeteer-ruby 0.35.0 → 0.35.1

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: 7386b90fffcd353eb933d6dcb35d1e7cab9482fa70eaa536bf7bd19bba594edf
4
- data.tar.gz: a4bad8a9ab93025fd2864e2a4cd4ff9c6e972156a19898f6cefab84397a9526e
3
+ metadata.gz: b6261fae36fcaf6fad5ebcc8a6721496ea1ba7e76cdc770885f1b9cb6c49582b
4
+ data.tar.gz: cd7c4dbc2370568973c4319158e8c0d2f79248f83a7d7fd0a1f00d8c9f38ffa8
5
5
  SHA512:
6
- metadata.gz: d884728c758d4109ac19e72845a36677186b02d723f1be5e5dc5f5e7eb688b7e87ec17d134a1c02818a68273eeb5aaa49759f2b8554a2200ab1ea7a149c9df7a
7
- data.tar.gz: 2fb46af25d069bd75411abc56a5787b04ba0d2af000c06a046df2f300b096c191978628ed5d68d12653dd8b61bb2131008da90baaf0a190942caa10daf9f6cdc
6
+ metadata.gz: 0cb8cb7bebc28260088f3f558225c83f8e15bfbe539c0eabbca2fdcf324e941d3c4f61ebd08b57600bf3a366219bcb2f9c0930e250f796caca367601baab9daf
7
+ data.tar.gz: e3532e2a9b2da82d819b6946a7c4b2b870312dfb359739b997a7f2c72bc13772998a89453a3e244e64d0db0a6c9f6f70b95d86ba2d02c1b7d8cd5411a67c482f
data/CHANGELOG.md CHANGED
@@ -1,7 +1,13 @@
1
- ### master [[diff](https://github.com/YusukeIwaki/puppeteer-ruby/compare/0.35.0...master)]
1
+ ### master [[diff](https://github.com/YusukeIwaki/puppeteer-ruby/compare/0.35.1...master)]
2
2
 
3
3
  * xxx
4
4
 
5
+ ### 0.35.1 [[diff](https://github.com/YusukeIwaki/puppeteer-ruby/compare/0.35.0...0.35.1)]
6
+
7
+ New features:
8
+
9
+ * Allow Rails users to use this library without `require 'puppeteer'`.
10
+
5
11
  ### 0.35.0 [[diff](https://github.com/YusukeIwaki/puppeteer-ruby/compare/0.34.3...0.35.0)]
6
12
 
7
13
  New features:
data/README.md CHANGED
@@ -20,31 +20,29 @@ gem 'puppeteer-ruby'
20
20
 
21
21
  And then execute:
22
22
 
23
- $ bundle
24
-
25
- Or install it yourself as:
26
-
27
- $ gem install puppeteer-ruby
23
+ $ bundle install
28
24
 
29
25
  ### Capture a site
30
26
 
31
27
  ```ruby
32
- require 'puppeteer'
28
+ require 'puppeteer-ruby'
33
29
 
34
30
  Puppeteer.launch(headless: false) do |browser|
35
- page = browser.pages.first || browser.new_page
31
+ page = browser.new_page
36
32
  page.goto("https://github.com/YusukeIwaki")
37
33
  page.screenshot(path: "YusukeIwaki.png")
38
34
  end
39
35
  ```
40
36
 
37
+ NOTE: `require 'puppeteer-ruby'` is not necessary in Rails.
38
+
41
39
  ### Simple scraping
42
40
 
43
41
  ```ruby
44
- require 'puppeteer'
42
+ require 'puppeteer-ruby'
45
43
 
46
44
  Puppeteer.launch(headless: false, slow_mo: 50, args: ['--guest', '--window-size=1280,800']) do |browser|
47
- page = browser.pages.first || browser.new_page
45
+ page = browser.new_page
48
46
  page.viewport = Puppeteer::Viewport.new(width: 1280, height: 800)
49
47
  page.goto("https://github.com/", wait_until: 'domcontentloaded')
50
48
 
@@ -69,10 +67,10 @@ end
69
67
  ### Evaluate JavaScript
70
68
 
71
69
  ```ruby
72
- require 'puppeteer'
70
+ require 'puppeteer-ruby'
73
71
 
74
72
  Puppeteer.launch do |browser|
75
- page = browser.pages.last || browser.new_page
73
+ page = browser.new_page
76
74
  page.goto 'https://github.com/YusukeIwaki'
77
75
 
78
76
  # Get the "viewport" of the page, as reported by the page.
data/docs/api_coverage.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # API coverages
2
2
  - Puppeteer version: v10.1.0
3
- - puppeteer-ruby version: 0.35.0
3
+ - puppeteer-ruby version: 0.35.1
4
4
 
5
5
  ## Puppeteer
6
6
 
@@ -0,0 +1,2 @@
1
+ # just an alias.
2
+ require 'puppeteer'
@@ -1,3 +1,3 @@
1
1
  module Puppeteer
2
- VERSION = '0.35.0'
2
+ VERSION = '0.35.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppeteer-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.35.0
4
+ version: 0.35.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-02 00:00:00.000000000 Z
11
+ date: 2021-07-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -244,15 +244,14 @@ files:
244
244
  - ".rspec"
245
245
  - ".rubocop.yml"
246
246
  - CHANGELOG.md
247
- - Dockerfile
248
247
  - Gemfile
249
248
  - LICENSE
250
249
  - README.md
251
250
  - Rakefile
252
251
  - bin/console
253
252
  - bin/setup
254
- - docker-compose.yml
255
253
  - docs/api_coverage.md
254
+ - lib/puppeteer-ruby.rb
256
255
  - lib/puppeteer.rb
257
256
  - lib/puppeteer/aria_query_handler.rb
258
257
  - lib/puppeteer/browser.rb
data/Dockerfile DELETED
@@ -1,9 +0,0 @@
1
- FROM circleci/ruby:3.0.0-rc1-buster-node-browsers
2
-
3
- USER root
4
-
5
- RUN wget -O nightly.tar.bz2 "https://download.mozilla.org/?product=firefox-nightly-latest-ssl&os=linux64&lang=en-US" \
6
- && tar xf nightly.tar.bz2 \
7
- && ln -s $(pwd)/firefox/firefox /usr/bin/firefox
8
-
9
- USER circleci
data/docker-compose.yml DELETED
@@ -1,34 +0,0 @@
1
- version: "3"
2
- services:
3
- chrome:
4
- tty: true
5
- stdin_open: true
6
- build: .
7
- environment:
8
- BUNDLE_PATH: /usr/local/bundle
9
- DEBUG: 1
10
- CI: 1
11
- volumes:
12
- - .:/puppeteer-ruby
13
- - bundle-data:/usr/local/bundle
14
- working_dir: /puppeteer-ruby
15
- command: bundle exec rspec
16
-
17
- firefox:
18
- tty: true
19
- stdin_open: true
20
- build: .
21
- environment:
22
- BUNDLE_PATH: /usr/local/bundle
23
- PUPPETEER_PRODUCT_RSPEC: firefox
24
- DEBUG: 1
25
- CI: 1
26
- volumes:
27
- - .:/puppeteer-ruby
28
- - bundle-data:/usr/local/bundle
29
- working_dir: /puppeteer-ruby
30
- command: bundle exec rspec spec/integration/
31
-
32
- volumes:
33
- bundle-data:
34
- driver: local