bookshop-array-structures 2.0.0.pre.alpha.17 → 2.0.0.pre.alpha.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 745dd2b8e4da388d9cb1e0b7d8ccd076d9ef1f57502b5d596b55871ea65f6f00
4
- data.tar.gz: 7259bf36b8cfeba1ff644551ad2576c46817cabf8695526f9202a393adaf7a72
3
+ metadata.gz: ffe817204ff4c9f64cb28ea3b5016a4511ee24c0a7673c72d04cb5d92d1b6ac8
4
+ data.tar.gz: 9b1e308639b9fd6fe37cf766ec0de492dc9c6c9e31dff433a2730160b78a5e55
5
5
  SHA512:
6
- metadata.gz: bb176066d661bf8bd3516a296b1e5d9b1a6cca9bdc255fc372955c7450f2fd177a862e5b9924f9ba42a47b488b649e66c761bea119b59201981085a7519275a6
7
- data.tar.gz: 84423360dd6bd6ecf25cba1be682c80881469fd0025a0fa769a720ebb59bb9e77448a14b0d8c47849f525080887693eaf4416c4adc02d4f755d124ef8a4614de
6
+ metadata.gz: fb006014847f7a8744268c8767672ee47f1e66360f96d131156cddcd05ae3e066423566eb328eaf00629df3e0181d096ec77224400491837753842155f40a9ab
7
+ data.tar.gz: bb2b543bcda1169f2d17d84b9d36184eccf77423a4adef0446aa3edcc15c3c9c902cd1d5026b1fe69cc2fb26f5c8a7835f94b26d9d3566a69175b08b864b534d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bookshop-array-structures (2.0.0.pre.alpha.14)
4
+ bookshop-array-structures (2.0.0.pre.alpha.17)
5
5
  dry-inflector (>= 0.1, < 1.0)
6
6
  jekyll (>= 3.7, < 5.0)
7
7
  toml-rb (>= 2.0, < 3.0)
@@ -9,7 +9,7 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- addressable (2.7.0)
12
+ addressable (2.8.0)
13
13
  public_suffix (>= 2.0.2, < 5.0)
14
14
  ansi (1.5.0)
15
15
  ast (2.4.2)
@@ -17,7 +17,7 @@ GEM
17
17
  citrus (3.0.2)
18
18
  colorator (1.1.0)
19
19
  concurrent-ruby (1.1.9)
20
- dry-inflector (0.2.0)
20
+ dry-inflector (0.2.1)
21
21
  em-websocket (0.5.2)
22
22
  eventmachine (>= 0.12.9)
23
23
  http_parser.rb (~> 0.6.0)
@@ -31,9 +31,7 @@ module Bookshop
31
31
  value_context = structure["value"] if value_context.nil?
32
32
  inflector = Dry::Inflector.new
33
33
  value_obj.each_pair {|key, value|
34
- if value_context.has_key?(key)
35
- next
36
- end
34
+ next if value_context.has_key?(key)
37
35
 
38
36
  if value.is_a? Hash
39
37
  comment = value["--bookshop_comment"] ||
@@ -68,6 +66,11 @@ module Bookshop
68
66
  structure["_comments"][key] = value[0]["--bookshop_comment"]
69
67
  end
70
68
 
69
+ if structure["raw_fields"]&.include?(key)
70
+ value_context[key] = nil
71
+ next
72
+ end
73
+
71
74
  singular_title = inflector.classify(key).gsub(/(.)([A-Z])/, '\1 \2')
72
75
  structure["_array_structures"][key] ||= {
73
76
  "values" => [{
@@ -176,6 +179,7 @@ module Bookshop
176
179
  results.push(transform_template_component(result))
177
180
  end
178
181
  result.delete("_template")
182
+ result.delete("raw_fields")
179
183
  return results
180
184
  end
181
185
 
@@ -1,5 +1,5 @@
1
1
  module Bookshop
2
2
  module Arraystructures
3
- VERSION = "2.0.0.pre.alpha.17"
3
+ VERSION = "2.0.0.pre.alpha.18"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookshop-array-structures
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.pre.alpha.17
4
+ version: 2.0.0.pre.alpha.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - CloudCannon
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-08 00:00:00.000000000 Z
11
+ date: 2021-07-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll