nexaas-async-collector 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/controllers/nexaas/async/collector/async_resource_controller.rb +1 -0
- data/app/helpers/nexaas/async/collector/application_helper.rb +1 -1
- data/app/views/nexaas/async/collector/async_resource/_loading.html.erb +2 -2
- data/app/views/nexaas/async/collector/async_resource/_show.html.erb +4 -3
- data/app/views/nexaas/async/collector/async_resource/show.js.erb +4 -2
- data/lib/nexaas/async/collector/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee2109580d4539bc01aa2015e35fdb66a03a5e47
|
4
|
+
data.tar.gz: b36924123c2122b0fec86735195899cb0fa70b2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 965dd0712b7f5d4e6cc82be1a1ccbf256a74a95253ab155759f8934e84d92fbcefea0fc673d23e98847330867b3ecf52f4a55a6ca3204c61beb449b783c76169
|
7
|
+
data.tar.gz: abbae053baa51b8313e474544a56bcfcdd448f98539244fb330ef7fb11de8121e9fa3d98ddd0ce809c6f5531dbacfeb3ae42d78de39a1d8a56e9c0e28c3343c3
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
Agnostic collector and generator of async content for Rails apps. Used in production in a few [Nexaas](www.nexaas.com) systems.
|
9
9
|
|
10
|
-
This gems is compatible with Ruby 2.
|
10
|
+
This gems is compatible with Ruby 2.3+ and Rails 3.2+.
|
11
11
|
|
12
12
|
## Prerequisites
|
13
13
|
The prerequisites of this project are:
|
@@ -16,7 +16,7 @@ module Nexaas
|
|
16
16
|
validate_options(opts)
|
17
17
|
opts.merge!({ collect_id: collect_id })
|
18
18
|
AsyncResourceJob.perform_async(opts)
|
19
|
-
render(partial: 'nexaas/async/collector/async_resource/show')
|
19
|
+
render(partial: 'nexaas/async/collector/async_resource/show', locals: { unique_id: SecureRandom.hex })
|
20
20
|
end
|
21
21
|
|
22
22
|
# Rails 4.x does not add this helper automatically as Rails 5.X and 3.X does. So we had to created it to keep
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<style type="text/css">
|
1
|
+
<style type="text/css" id="js-nexaas-async-collector-style-<%= unique_id %>">
|
2
2
|
.nexaas-async-collector-loading img {
|
3
3
|
vertical-align: middle;
|
4
4
|
}
|
@@ -8,7 +8,7 @@
|
|
8
8
|
}
|
9
9
|
</style>
|
10
10
|
|
11
|
-
<div class="nexaas-async-collector-loading">
|
11
|
+
<div class="nexaas-async-collector-loading" id="js-nexaas-async-collector-loading-<%= unique_id %>">
|
12
12
|
<%= image_tag 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHdpZHRoPSIyMnB4IiBoZWlnaHQ9IjIycHgiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDEwMCAxMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaWRZTWlkIiBjbGFzcz0idWlsLXNwaW4iPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiBmaWxsPSJub25lIiBjbGFzcz0iYmsiPjwvcmVjdD48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSg1MCA1MCkiPjxnIHRyYW5zZm9ybT0icm90YXRlKDApIHRyYW5zbGF0ZSgzNCAwKSI+PGNpcmNsZSBjeD0iMCIgY3k9IjAiIHI9IjYiIGZpbGw9IiMwMDAiPjxhbmltYXRlIGF0dHJpYnV0ZU5hbWU9Im9wYWNpdHkiIGZyb209IjEiIHRvPSIwLjEiIGJlZ2luPSItMC44N3MiIGR1cj0iMXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIj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V0ZU5hbWU9Im9wYWNpdHkiIGZyb209IjEiIHRvPSIwLjEiIGJlZ2luPSItMHMiIGR1cj0iMXMiIHJlcGVhdENvdW50PSJpbmRlZmluaXRlIj48L2FuaW1hdGU+PGFuaW1hdGVUcmFuc2Zvcm0gYXR0cmlidXRlTmFtZT0idHJhbnNmb3JtIiB0eXBlPSJzY2FsZSIgZnJvbT0iMS41IiB0bz0iMSIgYmVnaW49Ii0wcyIgZHVyPSIxcyIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiPjwvYW5pbWF0ZVRyYW5zZm9ybT48L2NpcmNsZT48L2c+PC9nPjwvc3ZnPg==' %>
|
13
13
|
<%= I18n.t('nexaas.async.collector.loading') %>
|
14
14
|
</div>
|
@@ -1,12 +1,13 @@
|
|
1
|
-
<script type="text/javascript" id="js-nexaas-async-collector">
|
1
|
+
<script type="text/javascript" id="js-nexaas-async-collector-<%= unique_id %>">
|
2
2
|
var requestContent = function() {
|
3
3
|
$.ajax({
|
4
4
|
url: '<%= nexaas_async_collector.async_resource_path(@collect_id) %>',
|
5
|
-
dataType: 'script'
|
5
|
+
dataType: 'script',
|
6
|
+
data: { unique_id: '<%= unique_id %>' }
|
6
7
|
})
|
7
8
|
}
|
8
9
|
|
9
10
|
window.nexaas_async_interval = setInterval(requestContent, 3000);
|
10
11
|
</script>
|
11
12
|
|
12
|
-
<%= render partial: "nexaas/async/collector/async_resource/loading" %>
|
13
|
+
<%= render partial: "nexaas/async/collector/async_resource/loading", locals: { unique_id: unique_id } %>
|
@@ -1,5 +1,7 @@
|
|
1
1
|
<% if @result.content_is_ready? %>
|
2
2
|
clearInterval(window.nexaas_async_interval);
|
3
|
-
$('
|
4
|
-
$('#js-nexaas-async-collector').parent().append("<%= escape_javascript(@result.content.html_safe) %>");
|
3
|
+
$('#js-nexaas-async-collector-loading-<%= @unique_id %>').remove();
|
4
|
+
$('#js-nexaas-async-collector-<%= @unique_id %>').parent().append("<%= escape_javascript(@result.content.html_safe) %>");
|
5
|
+
$('#js-nexaas-async-collector-<%= @unique_id %>').remove()
|
6
|
+
$('#js-nexaas-async-collector-style-<%= @unique_id %>').remove()
|
5
7
|
<% end %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nexaas-async-collector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eduardo Hertz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-07-
|
11
|
+
date: 2017-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|