capybara-reloads 0.1.1 → 0.2.0

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: 6ca41333829cece1959c266f182ceca2622c6abe13c07d53e79b4bf674506a10
4
- data.tar.gz: 9c8846534b44bfe1f06e7c349aa75ebc040255b0418bba7f80831e2905e6ec22
3
+ metadata.gz: ca574edf64e50af0ff0ba6f59eee344bdd645e2879840b0699e98f911f481644
4
+ data.tar.gz: bb8790ec884c160cefad30146f0f89c0786efed1537615c4a9cba855800bb4a8
5
5
  SHA512:
6
- metadata.gz: 35a58ce5c4a7bbb7949b2c56aa1525d4957178cbc56ef89a9983cd5d7e19bbae31cd381e9be39674edeb64d705fbc3b432e37b32d29c422f56b767c11111bc25
7
- data.tar.gz: 47f77b92798291e98141c3b1351d3ec80cff90bc471f5e08e19231332c0de0ddc1ec84d90731339535f11b7481dbf6829bba6d4ddcb72be76396897703fa8449
6
+ metadata.gz: 43ef9babe505b02e1cc7b365bb302c608f6d792ba74577c653d762f4bdd6db1d1be95afbd58070e58fb4b2ca5b0d51608dbb1f7360600f4f6285e7fea148bc2c
7
+ data.tar.gz: 6ec27817f684afee2f5787916e0e7de04ce3223bc524c680498e9373636d0da2cac3de08ca8b72da362c5e9dfad64194d64c04ddffcfd9c1335cbe06ac8872a6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.2.0] - 2022-12-30
4
+
5
+ ### Added
6
+
7
+ - The state contains the exception backtrace along with the instance. This makes it easier to see which selector exactly has filed
8
+
9
+ ## [0.1.2] - 2022-12-25
10
+
11
+ ### Added
12
+
13
+ - Changing homepage and changelog uri for rubygems.org
14
+
3
15
  ## [0.1.1] - 2022-12-25
4
16
 
5
17
  - Dummy version with a change to image to make sure rubygems is correctly setup
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- capybara-reloads (0.1.1)
4
+ capybara-reloads (0.2.0)
5
5
  capybara (~> 3.0)
6
6
  capybara-screenshot (~> 1.0)
7
7
 
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2022 TODO: Write your name
3
+ Copyright (c) 2022 Kiril Mitov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ Gem::Specification.new do |spec|
9
9
  spec.email = ["kiril+rubygems [ at ] retreaver [with the dot] com"]
10
10
 
11
11
  spec.summary = "Utilities for Capybara to allow us to reload the page and check if examples will then pass."
12
- spec.homepage = "https://kmitov.com"
12
+ spec.homepage = "https://github.com/thebravoman/capybara-reloads"
13
13
  spec.license = "MIT"
14
14
  spec.required_ruby_version = ">= 2.6.0"
15
15
 
16
16
  spec.metadata["homepage_uri"] = spec.homepage
17
17
  spec.metadata["source_code_uri"] = "https://github.com/thebravoman/capybara-reloads"
18
- spec.metadata["changelog_uri"] = "https://github.com/thebravoman/capybara-reloads/CHANGELOG.md"
18
+ spec.metadata["changelog_uri"] = "https://github.com/thebravoman/capybara-reloads/blob/main/CHANGELOG.md"
19
19
 
20
20
  # Specify which files should be added to the gem when it is released.
21
21
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -33,7 +33,7 @@ module Capybara
33
33
  raise e
34
34
  end
35
35
  reloads_made+=1
36
- args = {base: self, exception: e}
36
+ args = { base: self, exception: e }
37
37
  # Allows us to change the way we report that a refresh should happend
38
38
  if Capybara::Reloads.before_reload_callback != nil
39
39
  Capybara::Reloads.before_reload_callback.call(args)
@@ -61,7 +61,16 @@ module Capybara
61
61
  html_and_image = Capybara::Screenshot.screenshot_and_save_page
62
62
  # html_and_image is of the form
63
63
  # {:html=>"...screenshot_2022-12-25-17-42-37.712.html", :image=>"...screenshot_2022-12-25-17-42-37.712.png"}
64
- @previous_states << html_and_image.merge({exception: exception, reloads_made: reloads_made})
64
+ exception_hash = exception ?
65
+ {
66
+ instance: exception,
67
+ backtrace: exception.backtrace
68
+ } : nil
69
+
70
+ @previous_states << html_and_image.merge({
71
+ exception: exception_hash,
72
+ reloads_made: reloads_made
73
+ })
65
74
  end
66
75
 
67
76
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Capybara
4
4
  module Reloads
5
- VERSION = "0.1.1"
5
+ VERSION = "0.2.0"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: capybara-reloads
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kiril Mitov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-25 00:00:00.000000000 Z
11
+ date: 2022-12-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -57,13 +57,13 @@ files:
57
57
  - lib/capybara/reloads/node/matchers.rb
58
58
  - lib/capybara/reloads/version.rb
59
59
  - sig/capybara/reloads.rbs
60
- homepage: https://kmitov.com
60
+ homepage: https://github.com/thebravoman/capybara-reloads
61
61
  licenses:
62
62
  - MIT
63
63
  metadata:
64
- homepage_uri: https://kmitov.com
64
+ homepage_uri: https://github.com/thebravoman/capybara-reloads
65
65
  source_code_uri: https://github.com/thebravoman/capybara-reloads
66
- changelog_uri: https://github.com/thebravoman/capybara-reloads/CHANGELOG.md
66
+ changelog_uri: https://github.com/thebravoman/capybara-reloads/blob/main/CHANGELOG.md
67
67
  post_install_message:
68
68
  rdoc_options: []
69
69
  require_paths: