editmode 1.7.0.pre.1 → 1.8.0

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: 313e1df1d86642ca691796a539f96e858778d750907e68cc100858dfded13383
4
- data.tar.gz: 869dd13bc453613476cb29b5a47dd7ff624839f3d9b49503f1254a84719297a1
3
+ metadata.gz: 01c9fd51164ce3e8b9bed2c927bd533f6e06f53d14928855eac1ac240fc541e7
4
+ data.tar.gz: d510c689a3f8682bce7d050599dfcd20fb51307e60d69d4e90178b4ccafb5412
5
5
  SHA512:
6
- metadata.gz: cb741fae8de3d34b844e1b42ee698fd832aa90fff5f7099082fbc61c1c7eaea3cb39b67f0d1d565ece04eea97523c3789c98b0b17d0fc1360d61b7a90478aba3
7
- data.tar.gz: 7d12781cab8bcf4b1629ce6614f1f9586f1afcd4323004c1c2bdc1ec095f733fdf6180ea7f0872e96b3c5e0b15849e33e14f742b237dd1f5349dc9c1df3405af
6
+ metadata.gz: 3597c1cc86692fbc67f94a073cb7daf31939c0793765c96bacbd80d0f4ec7df06c24122ce0fddf97359a98ceedf148d87763b071d5e341078a5624af496266f5
7
+ data.tar.gz: dba3fbb8b64679e3a57c0325d12195c24bac7cfd27d2acf6cb9cdfe37341c514dfe6177d617ba34352aa4199a19b0c151ae5b53d03a55d27047cb19f9d67af5d
data/Gemfile CHANGED
@@ -2,5 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in chunks.gemspec
4
4
  gem 'pry-rails'
5
- gem 'rails', '~> 5.2.0'
5
+ gem 'rails', '6.0.3'
6
6
  gemspec
@@ -63,27 +63,29 @@ module Editmode
63
63
  end
64
64
 
65
65
  if chunks.any?
66
- content_tag :div, class: "chunks-collection-wrapper #{parent_class}", data: {chunk_collection_identifier: collection_identifier, chunk_tags: tags.join("|")} do
66
+ return content_tag :div, class: "chunks-collection-wrapper #{parent_class}", data: {chunk_collection_identifier: collection_identifier, chunk_tags: tags.join("|")} do
67
67
  chunks.each_with_index do |chunk, index|
68
68
  @custom_field_chunk = chunk
69
- concat(content_tag(:div, class: "chunks-collection-item--wrapper #{item_class}") do
70
- yield(@custom_field_chunk, index)
71
- end)
69
+ concat(
70
+ content_tag(:div, class: "chunks-collection-item--wrapper #{item_class}") do
71
+ yield(@custom_field_chunk, index)
72
+ end
73
+ )
72
74
  end
73
-
75
+
74
76
  # Placeholder element for new collection item
75
77
  @custom_field_chunk = chunks.first.merge!({placeholder: true})
76
- concat(content_tag(:template, class: "chunks-hide chunks-col-placeholder-wrapper") do
77
- yield(@custom_field_chunk)
78
+ concat(content_tag("em-template", class: "chunks-col-placeholder-wrapper", style: "display: none") do
79
+ yield(@custom_field_chunk, 0)
78
80
  end)
79
81
  end
80
82
  else
81
- content_tag(:span, "&nbsp".html_safe)
83
+ return content_tag(:span, "&nbsp".html_safe)
82
84
  end
83
85
  end
84
86
  rescue => error
85
87
  puts error
86
- return []
88
+ return ""
87
89
  end
88
90
  end
89
91
  alias_method :c, :chunk_collection
@@ -198,7 +200,7 @@ module Editmode
198
200
  options[:variable_fallbacks] = @custom_field_chunk["variable_fallbacks"] || {}
199
201
  options[:variable_values] = options[:variables] || {}
200
202
 
201
- chunk_field_value(@custom_field_chunk, field_name, options)
203
+ chunk_field_value(@custom_field_chunk, field_name, **options)
202
204
  end
203
205
  alias_method :F, :render_custom_field
204
206
 
@@ -43,7 +43,7 @@ module Editmode
43
43
  end
44
44
 
45
45
  def script_url
46
- ENV["EDITMODE_OVERRIDE_SCRIPT_URL"] || "https://unpkg.com/editmode-magic-editor@^0/dist/magic-editor.js"
46
+ ENV["EDITMODE_OVERRIDE_SCRIPT_URL"] || "https://unpkg.com/editmode-magic-editor@~1/dist/magic-editor.js"
47
47
  end
48
48
 
49
49
  end
@@ -1,3 +1,3 @@
1
1
  module Editmode
2
- VERSION = "1.7.0.pre.1"
2
+ VERSION = "1.8.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: editmode
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0.pre.1
4
+ version: 1.8.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Ennis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-22 00:00:00.000000000 Z
11
+ date: 2021-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -108,9 +108,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
108
108
  version: '0'
109
109
  required_rubygems_version: !ruby/object:Gem::Requirement
110
110
  requirements:
111
- - - ">"
111
+ - - ">="
112
112
  - !ruby/object:Gem::Version
113
- version: 1.3.1
113
+ version: '0'
114
114
  requirements: []
115
115
  rubygems_version: 3.0.3.1
116
116
  signing_key: