site_prism-all_there 2.0.1 → 2.0.2

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: 30c5d744ba8f905404ca0528296024d8cde291be2e7608d2c50202c74990edbe
4
- data.tar.gz: 6f10c96510f93848b8ecb2088fb344c28d89a0e0059e686811dd076777d14e05
3
+ metadata.gz: dbdb3fd1e22f9f832cb21e808f77a1c0c236f25442874f692df69bb0d1437367
4
+ data.tar.gz: b98ec38bc16d1f410dc1584ced388a451856295660a9492d64a2b789cd450153
5
5
  SHA512:
6
- metadata.gz: e8a8ec5769a6a32eb9b8c7475544a3d39491e35d4f30b38418e3b8eb59f5daa8b3de8a98ae0bb0d2aa8aa51166a53902db5d41d70750a76493c028c088ae9cdb
7
- data.tar.gz: d1d7abc5f369069f99681c8488aa1ee500c1ffdaf41702a7496b3292eff9769e8ddf5e11c4261b146691051f0b40ca8df8debb168ec486be5557ed1d6c17daa6
6
+ metadata.gz: b068d588ecb66eae71bb7a5bca3ed990b6f38a7c5b6a6b617edab27f63666a2bfb7a6afd21c07f362cfbcc4930a2ce6b4b1dd6abb724927793f5f2438ba2602a
7
+ data.tar.gz: 0fa5d87ac1f7aa303dac2754eb3b6303522bfb5ba0b70772e971207f8a0da0621e606f7243c8db2f6065df0d22fc2202d2d31d998606dc3cdc0201710c8a8216
@@ -64,18 +64,14 @@ module SitePrism
64
64
  end
65
65
 
66
66
  def mapped_checklist
67
- if expected_items
67
+ if instance.class.expected_items
68
68
  SitePrism.logger.debug('Expected Items has been set.')
69
- mapped_items.array.select { |name| expected_items.include?(name) }
69
+ mapped_items.array & instance.class.expected_items
70
70
  else
71
71
  mapped_items.array
72
72
  end
73
73
  end
74
74
 
75
- def expected_items
76
- instance.class.expected_items
77
- end
78
-
79
75
  def mapped_items
80
76
  @mapped_items ||= MappedItems.new(instance)
81
77
  end
@@ -8,11 +8,10 @@ module SitePrism
8
8
  # The Expected Items on a SitePrism Page or Section structured in an enumerable way
9
9
  #
10
10
  class MappedItems
11
- attr_reader :instance
12
- private :instance
11
+ attr_reader :hash
13
12
 
14
13
  def initialize(instance)
15
- @instance = instance
14
+ @hash = instance.class.mapped_items
16
15
  end
17
16
 
18
17
  # @return [Array<Symbol>]
@@ -20,12 +19,6 @@ module SitePrism
20
19
  def array
21
20
  hash.values.flatten.uniq
22
21
  end
23
-
24
- # @return [Hash<Symbol>]
25
- # All expected mapped items on the SitePrism instance as a Symbol Hash
26
- def hash
27
- instance.class.mapped_items
28
- end
29
22
  end
30
23
  end
31
24
  end
@@ -4,6 +4,6 @@ module SitePrism
4
4
  module AllThere
5
5
  # @return [String]
6
6
  # Version of the gem
7
- VERSION = '2.0.1'
7
+ VERSION = '2.0.2'
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: site_prism-all_there
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luke Hill
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-01 00:00:00.000000000 Z
11
+ date: 2023-07-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -132,7 +132,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  requirements: []
135
- rubygems_version: 3.4.13
135
+ rubygems_version: 3.1.6
136
136
  signing_key:
137
137
  specification_version: 4
138
138
  summary: An extension to allow you to recurse through your SitePrism Pages/Sections