step_render 0.1.0 → 0.1.1

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
  SHA1:
3
- metadata.gz: 1dbac8447ea28251a3dfd1c2495681bbb9cc576a
4
- data.tar.gz: 14ba0115c59490d1bb9464ef9fa827b5736eb3fa
3
+ metadata.gz: 934c510f9f3c2e2c7921454b8a7eb22677a547d2
4
+ data.tar.gz: c5f266a0b69f29254b513c63b92bb5093177b270
5
5
  SHA512:
6
- metadata.gz: 9a23a1c1d8d18f9dcff748baaa41b217c181780d874517eb00aadb096992a64b62e5cca13c5614382a6ce1fbc28ced59fef0de0500c9541e3d4b9c325899c229
7
- data.tar.gz: 49a2d59fda93f573b882d8ffab21f5e5dfb772e29c0e36c4a212b490f2573c66015cb2d08e51ee68e1045380ad7f5603c4b685bf38bfb84092f31ef0522463c4
6
+ metadata.gz: 17d9303657879233b215840ad791703b2f743ebf08ed6655a4822d9e10fd50359f9036cfee9b4b106bfde9e2198ad14a19d1eeaaa02369c5704ff99ee4aad3ef
7
+ data.tar.gz: 984d5cdaa8edf8c0cbc23d6dc20d675c344f71b51f7fed9b626479d2a081150119595247e1cd83044b0d09d2fa37755234cff34018dd4b8b8efcbad89a6f49f9
@@ -1,3 +1,3 @@
1
1
  module StepRender
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -2,15 +2,11 @@
2
2
  module StepRender
3
3
  module ViewHelper
4
4
  def step_render(*options)
5
- if Rails.cache.is_a?(ActiveSupport::Cache::NullStore)
6
- render *options
7
- else
8
- key = "lazy-partial-#{SecureRandom.hex(12)}"
9
- cookies.signed[key] = { value: Marshal.dump(ActiveJob::Arguments.serialize(options)), expires: 2.hour.from_now }
10
- # if use cache store
11
- # Rails.cache.fetch(key, skip_digest: true, expires_in: 10.minute) { ActiveJob::Arguments.serialize(options) }
12
- %(<div class= "related-articles lazyload" data-include="#{step_render_path(key)}">loading</div>).html_safe
13
- end
5
+ key = "lazy-partial-#{SecureRandom.hex(12)}"
6
+ cookies.signed[key] = { value: Marshal.dump(ActiveJob::Arguments.serialize(options)), expires: 2.hour.from_now }
7
+ # if use cache store
8
+ # Rails.cache.fetch(key, skip_digest: true, expires_in: 10.minute) { ActiveJob::Arguments.serialize(options) }
9
+ %(<div class= "related-articles lazyload" data-include="#{step_render_path(key)}">loading</div>).html_safe
14
10
  end
15
11
  def import_step_render
16
12
  '<script src="https://cdnjs.cloudflare.com/ajax/libs/lazysizes/3.0.0/lazysizes.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/lazysizes/3.0.0/plugins/include/ls.include.min.js"></script>'.html_safe
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: step_render
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - EastResident