|
| 1 | +## [0.5.0] - (Sep 27, 2019) ## |
| 2 | + |
| 3 | +### Added |
| 4 | + |
| 5 | +- description of `Thread safety` approach section in README |
| 6 | + |
| 7 | +- `Ferrum::NoSuchTargetError` |
| 8 | + |
| 9 | +- `Ferrum::Network::Request#url_fragment` - delegation to `urlFragment` of instance `request` |
| 10 | + |
| 11 | +- The removing of temporary directory on `Ferrum::Browser::Process#stop`: |
| 12 | + |
| 13 | + `Ferrum::Browser::Process.directory_remover` proc for remove entry with the passed path to the temporary directory as an argument |
| 14 | + |
| 15 | +- `Ferrum::Page#viewport_size` - evaluates JS: `innerWidth` and `innerHeight` values on `window` object |
| 16 | + |
| 17 | +- `Ferrum::Page#document_size` - evaluates JS: `offsetWidth` and `offsetHeight` values on `document.documentElement` object |
| 18 | + |
| 19 | +- `Ferrum::Browser#viewport_size` - delegation to `Ferrum::Page#viewport_size` |
| 20 | + |
| 21 | +- `Ferrum::Context` class implementation: |
| 22 | + |
| 23 | + - initializer accepts three arguments: |
| 24 | + |
| 25 | + - `browser` as first - instance of `Ferrum::Browser` |
| 26 | + |
| 27 | + - `contexts` as second - instance of `Ferrum::Contexts` |
| 28 | + |
| 29 | + - `id` as third - the value of browser command: `Target.createBrowserContext.browserContextId` |
| 30 | + |
| 31 | + - includes `id` attribute reader - the passed argument: `id` |
| 32 | + |
| 33 | + - includes `targets` attribute reader - the thread safe instance of hash |
| 34 | + |
| 35 | + - includes `pendings` attribute reader - the thread safe instance of mutable variable |
| 36 | + |
| 37 | + - includes `POSITION` constant - the freeze array of `first` `last` symbols |
| 38 | + |
| 39 | + - `#default_target` - memoization of `#create_target` result |
| 40 | + |
| 41 | + - `#create_target` - assigns `target.id` as fetch of `targetId` from `Target.createTarget` with assign `target` from `targetInfo` |
| 42 | + |
| 43 | + - `#page` - delegation to `default_target` of `Ferrum::Context` |
| 44 | + |
| 45 | + - `#pages` - delegations to `page`'s taken from `Ferrum::Context#targets` as `values` |
| 46 | + |
| 47 | + - `#windows` - delegations to `page`'s taken from `Ferrum::Context#targets` as `values` with `window?` truthy condition |
| 48 | + |
| 49 | + takes `position` as first argument and optional second argument `size` with `1` as default value |
| 50 | + |
| 51 | + may raise `ArgumentError` on the passed `position` which not included into `Ferrum::Context::POSITION` constant values |
| 52 | + |
| 53 | + - `#create_page` - delegation to `target` with the `target` recreation by `Ferrum::Context#create_target` |
| 54 | + |
| 55 | + - `#add_target` - creates new instance of `Ferrum::Target` with fill by `Ferrum::Target.window?` condition of: |
| 56 | + |
| 57 | + `targets` instance variable on `id` or `pendings` instance variable as replace of `@value` |
| 58 | + |
| 59 | + - `#update_target` - updates specific `target` in `targets` instance variable by `target_id` and `params` which are passed as arguments |
| 60 | + |
| 61 | + - `#delete_target` - deletes from `targets` instance variable by passed `target_id` as argument |
| 62 | + |
| 63 | + - `#dispose` - disposes from `contexts` instance variable by passed `id` as attribute reader |
| 64 | + |
| 65 | + - `#inspect` - simple implementation of native `inspect` method with returns of the current internal state |
| 66 | + |
| 67 | +- `Ferrum::Target` class implementation: |
| 68 | + |
| 69 | + - initializer accepts two arguments: |
| 70 | + |
| 71 | + - `browser` as first - instance of `Ferrum::Browser` |
| 72 | + |
| 73 | + - `params` as second (optional) - instance of `Ferrum::Contexts` |
| 74 | + |
| 75 | + - `#update` - attribute writer for `params` instance variable by passed `params` as one argument |
| 76 | + |
| 77 | + - `#page` - new instance of `Ferrum::Page` created for specific `targetId` |
| 78 | + |
| 79 | + - `#window?` - boolean of the check the exists of `Ferrum::Target#opener_id` |
| 80 | + |
| 81 | + - `#id` - delegation to `targetId` of passed to instance `params` |
| 82 | + |
| 83 | + - `#type` - delegation to `type` of passed to instance `params` |
| 84 | + |
| 85 | + - `#title` - delegation to `title` of passed to instance `params` |
| 86 | + |
| 87 | + - `#url` - delegation to `url` of passed to instance `params` |
| 88 | + |
| 89 | + - `#opener_id` - delegation to `openerId` of passed to instance `params` |
| 90 | + |
| 91 | + - `#context_id` - delegation to `browserContextId` of passed to instance `params` |
| 92 | + |
| 93 | +- `Ferrum::Contexts` class implementation: (subscriber on `Target.targetCreated`) |
| 94 | + |
| 95 | + - initializer accepts `browser` as the one argument |
| 96 | + |
| 97 | + - includes `contexts` attribute reader - the thread safe instance of hash |
| 98 | + |
| 99 | + - `#default_context` - memoization of `#create` result |
| 100 | + |
| 101 | + - `#find_by` - finding the last match in `contexts` instance variable by match of passed `target_id` into `targets.keys` |
| 102 | + |
| 103 | + required `target_id: value` argument |
| 104 | + |
| 105 | + returns `nil` on the not-matched case |
| 106 | + |
| 107 | + - `#create` - assigns new instance of `Ferrum::Context` with fetched `browserContextId` from `Target.createBrowserContext` into `contexts` instance variable |
| 108 | + |
| 109 | + returns the created instance of `Ferrum::Context` |
| 110 | + |
| 111 | + - `#dispose` - removes specific `context` from `contexts` instance variable by passed `context_id` with fires `Target.disposeBrowserContext` browser command |
| 112 | + |
| 113 | + returns `true` boolean on the success dispose |
| 114 | + |
| 115 | + - `#reset` - nullify the `default_context` instance variable and fires the `dispose` method on each `context` in `contexts` instance variable |
| 116 | + |
| 117 | +- `Ferrum::Browser#contexts` - reader of `Ferrum::Contexts` instance: |
| 118 | + |
| 119 | +- `Ferrum::Browser#default_context` - delegation to `Ferrum::Browser#contexts` |
| 120 | + |
| 121 | +- the delegation to `Ferrum::Browser#default_context`: |
| 122 | + |
| 123 | + - `Ferrum::Browser#create_target` |
| 124 | + |
| 125 | + - `Ferrum::Browser#create_page` |
| 126 | + |
| 127 | + - `Ferrum::Browser#pages` |
| 128 | + |
| 129 | + - `Ferrum::Browser#windows` |
| 130 | + |
| 131 | +### Changed |
| 132 | + |
| 133 | +- `Ferrum::NoSuchWindowError` into `NoSuchPageError` |
| 134 | + |
| 135 | +- `Ferrum::Page::NEW_WINDOW_WAIT` moved as unchanged to `Ferrum::Target` |
| 136 | + |
| 137 | +- `Ferrum::Browser#page` - the delegation from `Ferrum::Browser#targets` to `Ferrum::Browser#default_context` |
| 138 | + |
| 139 | +- `Ferrum::Browser#page` - from the instance of `Ferrum::Browser#targets` into delegation to `Ferrum::Browser#default_context` |
| 140 | + |
| 141 | +### Removed |
| 142 | + |
| 143 | +- `Ferrum::EmptyTargetsError` |
| 144 | + |
| 145 | +- 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 |
| 146 | + |
| 147 | +- `Ferrum::Page#close_connection` - the logic is moved to `Ferrum::Page#close` directly |
| 148 | + |
| 149 | +- the third argument (`new_window = false`) for `Ferrum::Page` initializer |
| 150 | + |
| 151 | +- `Ferrum::Targets` class with the delegations to `Ferrum::Targets` instance in `Ferrum::Browser` instance: |
| 152 | + |
| 153 | + - `Ferrum::Browser#window_handle` |
| 154 | + |
| 155 | + - `Ferrum::Browser#window_handles` |
| 156 | + |
| 157 | + - `Ferrum::Browser#switch_to_window` |
| 158 | + |
| 159 | + - `Ferrum::Browser#open_new_window` |
| 160 | + |
| 161 | + - `Ferrum::Browser#close_window` |
| 162 | + |
| 163 | + - `Ferrum::Browser#within_window` |
| 164 | + |
1 | 165 | ## [0.4.0] - (Sep 17, 2019) ##
|
2 | 166 |
|
3 | 167 | ### Added
|
|
366 | 530 |
|
367 | 531 | - classes of errors with a description of specific raises reasons
|
368 | 532 |
|
| 533 | +[0.5.0]: https://github.com/rubycdp/ferrum/compare/v0.4...v0.5 |
369 | 534 | [0.4.0]: https://github.com/rubycdp/ferrum/compare/v0.3...v0.4
|
370 | 535 | [0.3.0]: https://github.com/rubycdp/ferrum/compare/v0.2.1...v0.3
|
371 | 536 | [0.2.1]: https://github.com/rubycdp/ferrum/compare/v0.2...v0.2.1
|
|
0 commit comments