site_prism 4.0.2 → 4.0.3

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: 6702577fd95053cdaaa208fd2ee9434e3b6634cf7f20da087fa6d7d858c952cc
4
- data.tar.gz: 8832e3b57c435d0e715e92c8c179781dc865ec98942518cb3cd982ecd845ca22
3
+ metadata.gz: 31d906cda08dd376f6e81fe3ed760b954cf172d2037dcee25d91c01b3b8ace24
4
+ data.tar.gz: aefc0ed612cf57548101505e46c92845ef9fa2f7482b23e5d6b38cc7c37cf9f7
5
5
  SHA512:
6
- metadata.gz: d2607bc319b31ad2621e4b65d97680d24762d134f0ce0afa7a193e7e0d7021dfdc675f903d7b5b18f389f85dc30537d178a45dccdab3611b79c04c946dc9bca8
7
- data.tar.gz: 5c2e419d8b490bb10a1afb0bb0673f8dbe4124786fcd7bc17d5ff8d6c90001da8e163a27ca6212158cb28d042043d0b5af1ad9750144c8891bdb89fe41f46bdf
6
+ metadata.gz: 9eda5c088201fe6055d67d92cdd3a5f08a90ffe9ccbd2788ac1b4da6e6a0dff32e000c59819e113b4091fc33d2c38d875c9b3d36bd4d2dc549d42d4e1f071ac3
7
+ data.tar.gz: 5f926bac135af87939fc52ce5d110dd806ed7e3708bad8b885670a71e75065057d58de506547389ac11f2216ffcc043031262c4eeb5d11697ff38f114d1685f9
data/LICENSE.md CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2011-2022, The SitePrism team
1
+ Copyright (c) 2011-2023, The SitePrism team
2
2
 
3
3
  All rights reserved.
4
4
 
@@ -39,7 +39,7 @@ module SitePrism
39
39
  #
40
40
  # @return [Array]
41
41
  def elements_present
42
- _mapped_items.select { |name| there?(name) }
42
+ elements_to_check.select { |name| there?(name) }
43
43
  end
44
44
 
45
45
  # Returns each element that is not currently present inside the scope being tested
@@ -52,20 +52,7 @@ module SitePrism
52
52
  private
53
53
 
54
54
  def elements_to_check
55
- if _expected_items
56
- SitePrism.logger.debug('Expected Items has been set.')
57
- _mapped_items.select { |name| _expected_items.include?(name) }
58
- else
59
- _mapped_items
60
- end
61
- end
62
-
63
- def _mapped_items
64
- self.class.mapped_items.values.flatten.uniq
65
- end
66
-
67
- def _expected_items
68
- self.class.expected_items
55
+ SitePrism::AllThere::ExpectedItems.new(self).send(:mapped_checklist)
69
56
  end
70
57
 
71
58
  def there?(name)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SitePrism
4
- VERSION = '4.0.2'
4
+ VERSION = '4.0.3'
5
5
  end
data/lib/site_prism.rb CHANGED
@@ -43,14 +43,10 @@ module SitePrism
43
43
  @logger ||= SitePrism::Logger.new.create
44
44
  end
45
45
 
46
- # `Logger#reopen` was added in Ruby 2.3 - Which is now the minimum version
47
- # for the site_prism gem
46
+ # Configure where you want the output of the site_prism logs to go (Default is $stdout)
48
47
  #
49
- # This writer method allows you to configure where you want the output of
50
- # the site_prism logs to go (Default is $stdout)
51
- #
52
- # example: SitePrism.log_path = 'site_prism.log' would save all
53
- # log messages to `./site_prism.log`
48
+ # To save all logs to a specific output file
49
+ # SitePrism.log_path = 'site_prism.log'
54
50
  def log_path=(logdev)
55
51
  logger.reopen(logdev)
56
52
  end
@@ -68,8 +64,7 @@ module SitePrism
68
64
  end
69
65
 
70
66
  # To query what level is being logged
71
- # SitePrism.log_level
72
- # => :UNKNOWN # By default
67
+ # SitePrism.log_level # => :UNKNOWN # By default
73
68
  def log_level
74
69
  %i[DEBUG INFO WARN ERROR FATAL UNKNOWN][logger.level]
75
70
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: site_prism
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Hill
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2023-05-23 00:00:00.000000000 Z
12
+ date: 2023-07-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: addressable
@@ -219,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
219
219
  - !ruby/object:Gem::Version
220
220
  version: '0'
221
221
  requirements: []
222
- rubygems_version: 3.0.3.1
222
+ rubygems_version: 3.4.13
223
223
  signing_key:
224
224
  specification_version: 4
225
225
  summary: A Page Object Model DSL for Capybara