editmode 1.7.0.pre.2 → 1.7.0.pre.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: 639a7a79d9adcdeac5e17b953350f0394b382fcc814be7d3f90e876e73ee4386
4
- data.tar.gz: fa62f7b43894da4c3cb00bb82061b110d0327d8459c55924e9240be99a920bce
3
+ metadata.gz: 6ccfb14c467ba1d9cf222c8ad5536aa77fc2ec97d9d8819e47951959a68a38c5
4
+ data.tar.gz: 62e8d0ffa22c375b6346d2eb7caa1ea6ff74bb3d29970d4bf0b0d764797fffd8
5
5
  SHA512:
6
- metadata.gz: c71fc8c8bf0f9346788e62f3e36506861ce0d479a10662cd17be36d32cda9ec4ffc39372efb2f2c931731eb116b977c2fc4a03f84a36854ee4fee0a892453a3a
7
- data.tar.gz: f397df0a103752539063d9019e445b57efa8431de7734472392285e6b3681c114b4549918e138cbf442cfcd578e2ab2b9eec4921401d26c662a36b0cbb57b23a
6
+ metadata.gz: b8465c2b1962540c653cd3c654dec448146b5cd7749621f4aeacab32810ff8914fa2be2f2f726d04336ddf3e4aed0571c0aaed0cda79149fa8b7c9c889c6756c
7
+ data.tar.gz: 103435c578a6d735ca9870217fc1e51c52719201bc66e091c2e40d3c6aea778b34059ddc42ee1f825714a1b2b4d6c54c3cfcbbaaafb8643ff045076f8a2c7cee
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") 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.2"
2
+ VERSION = "1.7.0.pre.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: editmode
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.7.0.pre.2
4
+ version: 1.7.0.pre.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Ennis