render_async 0.1.2 → 0.1.3

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: 645326f6434ec60687de573fb760290c4d18fe67
4
- data.tar.gz: 886b51be64cc99628b151290e34dfcb3f4d1854f
3
+ metadata.gz: 8c70691a62b5d47023c92ed34bf99fa601a2225a
4
+ data.tar.gz: dfd318ae355aae16e66cb6f54f3f278a6fe3acbc
5
5
  SHA512:
6
- metadata.gz: 500f6acae0b23f1c3f79c3d6cb7e612dd9aefa3fc869c117b56b21f0c121c8c34aeb6bdc25dd88b8c903a2d68a0e673321de3ff7323e1e6ddfcf02187ac97192
7
- data.tar.gz: 7a2496aeee1bde44c49c78041648c454ac8b648f4b5356b830b7b18b011e25c7a1135782eb0018202b776a7f7e46f1759cbb094027001fdcf9a44ce4e2379dae
6
+ metadata.gz: 57655b60c806ca621cb2cd8e5be2084cf1c94293de75aeac3db279e8df6d5422ba2e7fdc06494c410b0cbec60a8b8aded087b92615df14883f596c625cd4af0e
7
+ data.tar.gz: eff5ef88ea6b2dd12f881c627d1a56d94d00289ef624069f25a0f536b8e4dddfaf772da85cc807afc42b594eaaadb18df81425027cb3418d7d2f6eb38d8f44e7
data/README.md CHANGED
@@ -1,6 +1,9 @@
1
- [![Build Status](https://semaphoreci.com/api/v1/renderedtext/render_async/branches/master/badge.svg)](https://semaphoreci.com/renderedtext/render_async)
1
+ [![Build Status](https://semaphoreci.com/api/v1/renderedtext/render_async/branches/master/shields_badge.svg)](https://semaphoreci.com/renderedtext/render_async)
2
+ [![Gem Version](https://badge.fury.io/rb/render_async.svg)](https://badge.fury.io/rb/render_async)
2
3
 
3
- # RenderAsync
4
+ ![render_async](https://semaphoreci.com/blog/assets/images/2017-06-08/speed-up-rendering-rails-pages-with-render-async-6c40eb39.png)
5
+
6
+ # render_async
4
7
 
5
8
  Renders partials to your views **asynchronously**. This is done through adding
6
9
  Javascript code that does AJAX request to your controller which then renders
@@ -32,7 +35,7 @@ And then execute:
32
35
 
33
36
  1. Include `render_async` view helper somewhere in your views:
34
37
 
35
- ```ruby
38
+ ```erb
36
39
  # app/views/comments/show.html.erb
37
40
 
38
41
  <%= render_async comment_stats_path %>
@@ -52,12 +55,12 @@ And then execute:
52
55
  def comment_stats
53
56
  @stats = Comment.get_stats
54
57
 
55
- render :patial => "comment_stats"
58
+ render :partial => "comment_stats"
56
59
  end
57
60
  ```
58
61
 
59
62
  4. Create a partial that will render
60
- ```ruby
63
+ ```erb
61
64
  # app/views/comments/_comment_stats.html.erb
62
65
 
63
66
  <div class="col-md-6">
@@ -66,7 +69,7 @@ And then execute:
66
69
  ```
67
70
 
68
71
  5. Add `content_for` in your base view file
69
- ```ruby
72
+ ```erb
70
73
  # application.html.erb
71
74
 
72
75
  <%= content_for :render_async %>
@@ -1,3 +1,3 @@
1
1
  module RenderAsync
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: render_async
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kasper Grubbe
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2017-05-17 00:00:00.000000000 Z
12
+ date: 2017-06-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -61,11 +61,9 @@ extensions: []
61
61
  extra_rdoc_files: []
62
62
  files:
63
63
  - ".gitignore"
64
- - ".gitmodules"
65
64
  - ".rspec"
66
65
  - Gemfile
67
66
  - LICENSE
68
- - LICENSE.txt
69
67
  - README.md
70
68
  - Rakefile
71
69
  - app/views/render_async/_render_async.html.erb
@@ -75,7 +73,6 @@ files:
75
73
  - lib/render_async/engine.rb
76
74
  - lib/render_async/version.rb
77
75
  - lib/render_async/view_helper.rb
78
- - lib/render_async/view_helpers.rb
79
76
  - render_async.gemspec
80
77
  homepage: https://github.com/renderedtext/render_async
81
78
  licenses:
data/.gitmodules DELETED
@@ -1,4 +0,0 @@
1
- [submodule "spec/fixtures/restaurant-reservations"]
2
- path = spec/fixtures/restaurant-reservations
3
- url = git@github.com:nikolalsvk/restaurant-reservations.git
4
- branch = nd/render-async
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2013 Kasper Grubbe
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1,11 +0,0 @@
1
- require 'securerandom'
2
-
3
- module RenderAsync
4
- module ViewHelpers
5
- def render_async(path)
6
- container_name = "render_async_#{SecureRandom.hex(5)}#{Time.now.to_i}"
7
-
8
- render 'render_async/render_async', {:container_name => container_name, :path => path}
9
- end
10
- end
11
- end