Skip to content

Commit

Permalink
Merge branch 'main' into issue_400/jruby_process_launch
Browse files Browse the repository at this point in the history
  • Loading branch information
jemelyah committed Jan 15, 2024
2 parents 7ac8b6d + 0d1b3e9 commit d0ca1e5
Show file tree
Hide file tree
Showing 54 changed files with 1,098 additions and 653 deletions.
9 changes: 0 additions & 9 deletions .github/gemfiles/websocket-driver-0.6.x.gemfile

This file was deleted.

9 changes: 0 additions & 9 deletions .github/gemfiles/websocket-driver-0.7.x.gemfile

This file was deleted.

3 changes: 2 additions & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true

- name: Run linters
run: |
bundle exec rubocop --parallel
14 changes: 6 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ jobs:
strategy:
fail-fast: false
matrix:
gemfile: [websocket-driver-0.6.x, websocket-driver-0.7.x]
ruby: [2.6, 2.7, "3.0", 3.1, 3.2]
ruby: [2.7, "3.0", 3.1, 3.2, 3.3]
runs-on: ubuntu-latest
env:
FERRUM_PROCESS_TIMEOUT: 25
FERRUM_DEFAULT_TIMEOUT: 15
BUNDLE_GEMFILE: .github/gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Setup Ruby
uses: ruby/setup-ruby@v1
Expand All @@ -33,13 +31,13 @@ jobs:
with:
chrome-version: stable

- run: mkdir -p /tmp/ferrum

- name: Run tests
run: bundle exec rake
run: |
mkdir -p /tmp/ferrum
bundle exec rake
- name: Archive artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: ${{ failure() }}
with:
name: footprints
Expand Down
2 changes: 1 addition & 1 deletion .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
--color
--format=doc
--format=progress
--require spec_helper
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 2.7
NewCops: enable
SuggestExtensions: false

Expand Down
23 changes: 20 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,30 @@
- `#files` information about downloaded files
- `#wait` wait for file download to be completed
- `#set_behavior` where and whether to store file
- `Browser::Client#command` accepts :async parameter [#433]
- `Ferrum::Browser` introduce `:flatten` mode with one connection and sessions [#434]
- Support for ping requests [#417]
- `Ferrum::Browser` introduce `:ws_url` option to set external websocket for a browser [#435]

### Changed
- `Ferrum::Page#screeshot` accepts :area option [#410]
- Resizing page on creation is gone and moved to Cuprite [#427]
- Min Ruby version is 2.7
- Refactored internal API of `Ferrum::Browser`, `Ferrum::Page`, `Ferrum::Context`, `Ferrum::Contexts`, `Ferrum::Target`
instead of passing browser and making cyclic dependency on the browser instance, we pass now a thin client [#431]
- Bump `websocket-driver` to `~> 0.7` [#432]
- Got rid of `Concurrent::Async` in `Ferrum::Browser::Subscriber` [#432]
- `Ferrum::Page#set_window_bounds` is renamed to `Ferrum::Page#window_bounds=`
- `Ferrum::Page` get right client from the Target and passes it down everywhere [#433]
- `Ferrum::Network::InterceptedRequest` accepts `Ferrum::Browser::Client` instead of `Ferrum::Page` [#433]
- `Ferrum::Browser::Client` -> `Ferrum::Client` [#433]

### Fixed

- Exceptions within `.on()` were swallowed by a thread pool of `Concurrent::Async` [#432]
- `Ferrum::Context#add_target` puts wrong target to pendings sometimes [#433]
- Leaking connection descriptors in tests and after browser quit [#433]

### Removed


Expand Down Expand Up @@ -518,9 +536,8 @@ to `Ferrum::Browser#default_context`
### Fixed

### Removed
- `Ferrum::EmptyTargetsError`
- the `hack` to handle `new window` which doesn't have events at all by `Ferrum::Page#session_id` with
`Target.attachToTarget` and `Target.detachFromTarget` usage
- `Ferrum::EmptyTargetsError` the hack to handle `new window` which doesn't have events at all by
`Ferrum::Page#session_id` with `Target.attachToTarget` and `Target.detachFromTarget` usage
- `Ferrum::Page#close_connection` - the logic is moved to `Ferrum::Page#close` directly
- the third argument (`new_window = false`) for `Ferrum::Page` initializer
- `Ferrum::Targets` class with the delegations to `Ferrum::Targets` instance in `Ferrum::Browser` instance:
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ gem "byebug", "~> 11.0", platforms: %i[mri mingw x64_mingw]
gem "chunky_png", "~> 1.3"
gem "image_size", "~> 2.0"
gem "kramdown", "~> 2.0", require: false
gem "pdf-reader", "~> 2.2"
gem "pdf-reader", "~> 2.12"
gem "puma", ">= 5.6.7"
gem "rake", "~> 13.0"
gem "redcarpet", require: false, platform: :mri
gem "rspec", "~> 3.8"
gem "rubocop", "~> 1.22"
gem "rubocop-rake", require: false
gem "sinatra", "~> 2.0"
gem "sinatra", "~> 3.2"
gem "yard", "~> 0.9", require: false

gemspec
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2022 Dmitry Vorotilin
Copyright (c) 2019-2023 Dmitry Vorotilin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading

0 comments on commit d0ca1e5

Please sign in to comment.