progressive_render 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -3
- data/Appraisals +5 -0
- data/README.md +34 -7
- data/gemfiles/rails_4_1.gemfile.lock +12 -13
- data/gemfiles/rails_4_2.gemfile.lock +14 -15
- data/gemfiles/rails_5_0_0_beta4.gemfile +9 -0
- data/gemfiles/rails_5_0_0_beta4.gemfile.lock +206 -0
- data/lib/progressive_render/rails/view_renderer.rb +2 -2
- data/lib/progressive_render/version.rb +1 -1
- data/vendor/assets/javascripts/progressive_render.js.coffee +2 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2b9a3f8c18f83d1552eb57f92fe03559ff4cb928
|
4
|
+
data.tar.gz: 840b52a7d149e70d980bc1fde05e0f9513b2ab28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f86a82ec6cd7096af2a4eb5f2cae30335c427ebb3e03741c97b31f870df0fa4a3f2c1f7ec02fe3588477cec863e310bb4bd77f548567e2ecac7ce0f8cd0937fb
|
7
|
+
data.tar.gz: 909bc7ba4ae306a1c5e257425c4b3123826b280b03ec2586f17b4c5e7514745f562375ab08e3d9b6507f98e0edc4015734f9dd7b8db5e8c7f4ef77ef825160c5
|
data/.travis.yml
CHANGED
@@ -1,16 +1,21 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.1.
|
4
|
-
- 2.2.
|
3
|
+
- 2.1.10
|
4
|
+
- 2.2.5
|
5
|
+
- 2.3.1
|
5
6
|
- ruby-head
|
6
7
|
|
7
8
|
before_install: gem install bundler -v 1.10.3
|
8
9
|
|
9
10
|
gemfile:
|
11
|
+
- gemfiles/rails_5_0_0_beta4.gemfile
|
10
12
|
- gemfiles/rails_4_2.gemfile
|
11
13
|
- gemfiles/rails_4_1.gemfile
|
12
14
|
|
13
15
|
matrix:
|
14
16
|
fast_finish: true
|
15
17
|
allow_failures:
|
16
|
-
- rvm: ruby-head
|
18
|
+
- rvm: ruby-head
|
19
|
+
exclude:
|
20
|
+
- rvm: 2.1.10
|
21
|
+
gemfile: gemfiles/rails_5_0_0_beta4.gemfile
|
data/Appraisals
CHANGED
data/README.md
CHANGED
@@ -4,10 +4,13 @@
|
|
4
4
|
|
5
5
|
Slow content got you down? Load it later! Use this gem to defer loading of portions of your page until after load. They will be fetched via AJAX and placed on the page when ready.
|
6
6
|
|
7
|
+
## Why? ##
|
8
|
+
You wrote all your code and it got a bit slow with all that production data. Or perhaps you have less important content that you want on the view, but it's not worth blocking the entire page for. With this gem there's almost no developer work to make this happen. All requests go through your controller and your normal filters so you're permissions are respected. The only added overhead is an additional round-trip for each partial and duplicated rendering of the main view.
|
9
|
+
|
7
10
|
## State of Project ##
|
8
11
|
[![Build Status](https://travis-ci.org/johnsonj/progressive_render.svg?branch=master)](https://travis-ci.org/johnsonj/progressive_render) [![Code Climate](https://codeclimate.com/github/johnsonj/progressive_load/badges/gpa.svg)](https://codeclimate.com/github/johnsonj/progressive_load) [![Test Coverage](https://codeclimate.com/github/johnsonj/progressive_load/badges/coverage.svg)](https://codeclimate.com/github/johnsonj/progressive_load/coverage)
|
9
12
|
|
10
|
-
This gem
|
13
|
+
This gem follows semantic versioning. The important part of that being the API will not make breaking changes except for major version numbers. Please use released versions via RubyGems for production applications. Old versions do not have a maintenance plan. [See open issues](https://github.com/johnsonj/progressive_render/issues). Report any issues you have!
|
11
14
|
|
12
15
|
## Installation ##
|
13
16
|
|
@@ -17,12 +20,19 @@ Add this line to your application's Gemfile and run `bundle install`
|
|
17
20
|
gem 'progressive_render'
|
18
21
|
```
|
19
22
|
|
20
|
-
Then add the following to your application.js
|
23
|
+
Then add the following to your `application.js`:
|
21
24
|
|
22
25
|
```javascript
|
23
|
-
//=progressive_render
|
26
|
+
//= require progressive_render
|
24
27
|
```
|
25
28
|
|
29
|
+
If you plan on using the default placeholder, add this to your `application.css`:
|
30
|
+
|
31
|
+
```css
|
32
|
+
/*
|
33
|
+
*= require progressive_render
|
34
|
+
*/
|
35
|
+
```
|
26
36
|
## Basic Usage ##
|
27
37
|
|
28
38
|
Wrap slow content in your view with a call to `progressive_render`:
|
@@ -51,7 +61,7 @@ For a more indepth example, see the test application located within this reposit
|
|
51
61
|
|
52
62
|
Each `progressive_render` call in the view can specify its own placeholder by providing a path to the partial you'd like to initially display to the user:
|
53
63
|
|
54
|
-
```
|
64
|
+
```erb
|
55
65
|
<%=progressive_render placeholder: 'shared/loading' do %>
|
56
66
|
<h1>Content!</h1>
|
57
67
|
<% sleep 5 %>
|
@@ -64,12 +74,29 @@ The placeholder defaults to rendering the partial `progressive_render/placeholde
|
|
64
74
|
|
65
75
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rspec` to run the tests. There is a dummy application located in `spec/dummy/` that demonstrates a sample integration and can be used for interactive testing.
|
66
76
|
|
67
|
-
|
77
|
+
## CI Environment ##
|
78
|
+
|
79
|
+
Travis.ci is used to validate changes to the github project. The CI build runs the gem against multiple versions of rails/ruby. When making a change to any dependencies or the version number of the application, be sure to run `appraisal` to update the dependent Gemfile.locks.
|
68
80
|
|
69
81
|
## Contributing ##
|
70
82
|
|
71
|
-
Bug reports and pull requests are welcome on [GitHub](https://github.com/johnsonj/progressive_render).
|
83
|
+
Bug reports and pull requests are welcome on [GitHub](https://github.com/johnsonj/progressive_render). Any contribution should not decrease test coverage significantly. Please feel free to [reach out](johnsonjeff@gmail.com) if you have an issues contributing.
|
84
|
+
|
85
|
+
## Release Process ##
|
86
|
+
|
87
|
+
```bash
|
88
|
+
gem install gem-release
|
89
|
+
gem bump --version [major, minor, patch]
|
90
|
+
cd spec/dummy
|
91
|
+
bundle install
|
92
|
+
cd ../../
|
93
|
+
appraisal install
|
94
|
+
git add spec/dummy/Gemfile.lock
|
95
|
+
git add gemfiles/*.lock
|
96
|
+
git commit -am "Bumping collateral for new gem version"
|
97
|
+
gem release --tag
|
98
|
+
```
|
72
99
|
|
73
100
|
## License ##
|
74
101
|
|
75
|
-
|
102
|
+
[MIT License](http://opensource.org/licenses/MIT).
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../
|
3
3
|
specs:
|
4
|
-
progressive_render (0.
|
4
|
+
progressive_render (0.3.0)
|
5
5
|
coffee-rails
|
6
6
|
jquery-rails
|
7
7
|
nokogiri
|
@@ -51,18 +51,18 @@ GEM
|
|
51
51
|
codeclimate-test-reporter (0.4.8)
|
52
52
|
simplecov (>= 0.7.1, < 1.0.0)
|
53
53
|
coderay (1.1.0)
|
54
|
-
coffee-rails (4.1.
|
54
|
+
coffee-rails (4.1.1)
|
55
55
|
coffee-script (>= 2.2.0)
|
56
|
-
railties (>= 4.0.0, < 5.
|
56
|
+
railties (>= 4.0.0, < 5.1.x)
|
57
57
|
coffee-script (2.4.1)
|
58
58
|
coffee-script-source
|
59
59
|
execjs
|
60
|
-
coffee-script-source (1.
|
60
|
+
coffee-script-source (1.10.0)
|
61
61
|
columnize (0.9.0)
|
62
62
|
diff-lcs (1.2.5)
|
63
63
|
docile (1.1.5)
|
64
64
|
erubis (2.7.0)
|
65
|
-
execjs (2.
|
65
|
+
execjs (2.7.0)
|
66
66
|
i18n (0.7.0)
|
67
67
|
jquery-rails (3.1.4)
|
68
68
|
railties (>= 3.0, < 5.0)
|
@@ -123,13 +123,13 @@ GEM
|
|
123
123
|
rspec-mocks (~> 3.3.0)
|
124
124
|
rspec-support (~> 3.3.0)
|
125
125
|
rspec-support (3.3.0)
|
126
|
-
sass (3.4.
|
127
|
-
sass-rails (5.0.
|
126
|
+
sass (3.4.22)
|
127
|
+
sass-rails (5.0.4)
|
128
128
|
railties (>= 4.0.0, < 5.0)
|
129
129
|
sass (~> 3.1)
|
130
130
|
sprockets (>= 2.8, < 4.0)
|
131
131
|
sprockets-rails (>= 2.0, < 4.0)
|
132
|
-
tilt (
|
132
|
+
tilt (>= 1.1, < 3)
|
133
133
|
simplecov (0.10.0)
|
134
134
|
docile (~> 1.1.0)
|
135
135
|
json (~> 1.8)
|
@@ -145,12 +145,11 @@ GEM
|
|
145
145
|
sqlite3 (1.3.10)
|
146
146
|
thor (0.19.1)
|
147
147
|
thread_safe (0.3.5)
|
148
|
-
tilt (
|
148
|
+
tilt (2.0.5)
|
149
149
|
tzinfo (1.2.2)
|
150
150
|
thread_safe (~> 0.1)
|
151
|
-
uglifier (
|
152
|
-
execjs (>= 0.3.0)
|
153
|
-
json (>= 1.8.0)
|
151
|
+
uglifier (3.0.0)
|
152
|
+
execjs (>= 0.3.0, < 3)
|
154
153
|
|
155
154
|
PLATFORMS
|
156
155
|
ruby
|
@@ -169,4 +168,4 @@ DEPENDENCIES
|
|
169
168
|
sqlite3
|
170
169
|
|
171
170
|
BUNDLED WITH
|
172
|
-
1.
|
171
|
+
1.12.5
|
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: ../
|
3
3
|
specs:
|
4
|
-
progressive_render (0.
|
4
|
+
progressive_render (0.3.0)
|
5
5
|
coffee-rails
|
6
6
|
jquery-rails
|
7
7
|
nokogiri
|
@@ -60,23 +60,23 @@ GEM
|
|
60
60
|
codeclimate-test-reporter (0.4.8)
|
61
61
|
simplecov (>= 0.7.1, < 1.0.0)
|
62
62
|
coderay (1.1.0)
|
63
|
-
coffee-rails (4.1.
|
63
|
+
coffee-rails (4.1.1)
|
64
64
|
coffee-script (>= 2.2.0)
|
65
|
-
railties (>= 4.0.0, < 5.
|
65
|
+
railties (>= 4.0.0, < 5.1.x)
|
66
66
|
coffee-script (2.4.1)
|
67
67
|
coffee-script-source
|
68
68
|
execjs
|
69
|
-
coffee-script-source (1.
|
69
|
+
coffee-script-source (1.10.0)
|
70
70
|
columnize (0.9.0)
|
71
71
|
diff-lcs (1.2.5)
|
72
72
|
docile (1.1.5)
|
73
73
|
erubis (2.7.0)
|
74
|
-
execjs (2.
|
74
|
+
execjs (2.7.0)
|
75
75
|
globalid (0.3.6)
|
76
76
|
activesupport (>= 4.1.0)
|
77
77
|
i18n (0.7.0)
|
78
|
-
jquery-rails (4.
|
79
|
-
rails-dom-testing (
|
78
|
+
jquery-rails (4.1.1)
|
79
|
+
rails-dom-testing (>= 1, < 3)
|
80
80
|
railties (>= 4.2.0)
|
81
81
|
thor (>= 0.14, < 2.0)
|
82
82
|
json (1.8.3)
|
@@ -146,13 +146,13 @@ GEM
|
|
146
146
|
rspec-mocks (~> 3.3.0)
|
147
147
|
rspec-support (~> 3.3.0)
|
148
148
|
rspec-support (3.3.0)
|
149
|
-
sass (3.4.
|
150
|
-
sass-rails (5.0.
|
149
|
+
sass (3.4.22)
|
150
|
+
sass-rails (5.0.4)
|
151
151
|
railties (>= 4.0.0, < 5.0)
|
152
152
|
sass (~> 3.1)
|
153
153
|
sprockets (>= 2.8, < 4.0)
|
154
154
|
sprockets-rails (>= 2.0, < 4.0)
|
155
|
-
tilt (
|
155
|
+
tilt (>= 1.1, < 3)
|
156
156
|
simplecov (0.10.0)
|
157
157
|
docile (~> 1.1.0)
|
158
158
|
json (~> 1.8)
|
@@ -168,12 +168,11 @@ GEM
|
|
168
168
|
sqlite3 (1.3.10)
|
169
169
|
thor (0.19.1)
|
170
170
|
thread_safe (0.3.5)
|
171
|
-
tilt (
|
171
|
+
tilt (2.0.5)
|
172
172
|
tzinfo (1.2.2)
|
173
173
|
thread_safe (~> 0.1)
|
174
|
-
uglifier (
|
175
|
-
execjs (>= 0.3.0)
|
176
|
-
json (>= 1.8.0)
|
174
|
+
uglifier (3.0.0)
|
175
|
+
execjs (>= 0.3.0, < 3)
|
177
176
|
|
178
177
|
PLATFORMS
|
179
178
|
ruby
|
@@ -192,4 +191,4 @@ DEPENDENCIES
|
|
192
191
|
sqlite3
|
193
192
|
|
194
193
|
BUNDLED WITH
|
195
|
-
1.
|
194
|
+
1.12.5
|
@@ -0,0 +1,206 @@
|
|
1
|
+
PATH
|
2
|
+
remote: ../
|
3
|
+
specs:
|
4
|
+
progressive_render (0.3.0)
|
5
|
+
coffee-rails
|
6
|
+
jquery-rails
|
7
|
+
nokogiri
|
8
|
+
rails (>= 4.1)
|
9
|
+
railties
|
10
|
+
sass
|
11
|
+
sass-rails
|
12
|
+
uglifier
|
13
|
+
|
14
|
+
GEM
|
15
|
+
remote: https://rubygems.org/
|
16
|
+
specs:
|
17
|
+
actioncable (5.0.0.beta4)
|
18
|
+
actionpack (= 5.0.0.beta4)
|
19
|
+
nio4r (~> 1.2)
|
20
|
+
websocket-driver (~> 0.6.1)
|
21
|
+
actionmailer (5.0.0.beta4)
|
22
|
+
actionpack (= 5.0.0.beta4)
|
23
|
+
actionview (= 5.0.0.beta4)
|
24
|
+
activejob (= 5.0.0.beta4)
|
25
|
+
mail (~> 2.5, >= 2.5.4)
|
26
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
27
|
+
actionpack (5.0.0.beta4)
|
28
|
+
actionview (= 5.0.0.beta4)
|
29
|
+
activesupport (= 5.0.0.beta4)
|
30
|
+
rack (~> 2.x)
|
31
|
+
rack-test (~> 0.6.3)
|
32
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
33
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
34
|
+
actionview (5.0.0.beta4)
|
35
|
+
activesupport (= 5.0.0.beta4)
|
36
|
+
builder (~> 3.1)
|
37
|
+
erubis (~> 2.7.0)
|
38
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
39
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
40
|
+
activejob (5.0.0.beta4)
|
41
|
+
activesupport (= 5.0.0.beta4)
|
42
|
+
globalid (>= 0.3.6)
|
43
|
+
activemodel (5.0.0.beta4)
|
44
|
+
activesupport (= 5.0.0.beta4)
|
45
|
+
activerecord (5.0.0.beta4)
|
46
|
+
activemodel (= 5.0.0.beta4)
|
47
|
+
activesupport (= 5.0.0.beta4)
|
48
|
+
arel (~> 7.0)
|
49
|
+
activesupport (5.0.0.beta4)
|
50
|
+
concurrent-ruby (~> 1.0)
|
51
|
+
i18n (~> 0.7)
|
52
|
+
minitest (~> 5.1)
|
53
|
+
tzinfo (~> 1.1)
|
54
|
+
appraisal (2.1.0)
|
55
|
+
bundler
|
56
|
+
rake
|
57
|
+
thor (>= 0.14.0)
|
58
|
+
arel (7.0.0)
|
59
|
+
builder (3.2.2)
|
60
|
+
byebug (9.0.5)
|
61
|
+
codeclimate-test-reporter (0.5.1)
|
62
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
63
|
+
coderay (1.1.1)
|
64
|
+
coffee-rails (4.1.1)
|
65
|
+
coffee-script (>= 2.2.0)
|
66
|
+
railties (>= 4.0.0, < 5.1.x)
|
67
|
+
coffee-script (2.4.1)
|
68
|
+
coffee-script-source
|
69
|
+
execjs
|
70
|
+
coffee-script-source (1.10.0)
|
71
|
+
concurrent-ruby (1.0.2)
|
72
|
+
diff-lcs (1.2.5)
|
73
|
+
docile (1.1.5)
|
74
|
+
erubis (2.7.0)
|
75
|
+
execjs (2.7.0)
|
76
|
+
globalid (0.3.6)
|
77
|
+
activesupport (>= 4.1.0)
|
78
|
+
i18n (0.7.0)
|
79
|
+
jquery-rails (4.1.1)
|
80
|
+
rails-dom-testing (>= 1, < 3)
|
81
|
+
railties (>= 4.2.0)
|
82
|
+
thor (>= 0.14, < 2.0)
|
83
|
+
json (1.8.3)
|
84
|
+
loofah (2.0.3)
|
85
|
+
nokogiri (>= 1.5.9)
|
86
|
+
mail (2.6.4)
|
87
|
+
mime-types (>= 1.16, < 4)
|
88
|
+
method_source (0.8.2)
|
89
|
+
mime-types (3.1)
|
90
|
+
mime-types-data (~> 3.2015)
|
91
|
+
mime-types-data (3.2016.0521)
|
92
|
+
mini_portile2 (2.1.0)
|
93
|
+
minitest (5.9.0)
|
94
|
+
nio4r (1.2.1)
|
95
|
+
nokogiri (1.6.8)
|
96
|
+
mini_portile2 (~> 2.1.0)
|
97
|
+
pkg-config (~> 1.1.7)
|
98
|
+
pkg-config (1.1.7)
|
99
|
+
pry (0.10.3)
|
100
|
+
coderay (~> 1.1.0)
|
101
|
+
method_source (~> 0.8.1)
|
102
|
+
slop (~> 3.4)
|
103
|
+
pry-byebug (3.4.0)
|
104
|
+
byebug (~> 9.0)
|
105
|
+
pry (~> 0.10)
|
106
|
+
rack (2.0.0.rc1)
|
107
|
+
json
|
108
|
+
rack-test (0.6.3)
|
109
|
+
rack (>= 1.0)
|
110
|
+
rails (5.0.0.beta4)
|
111
|
+
actioncable (= 5.0.0.beta4)
|
112
|
+
actionmailer (= 5.0.0.beta4)
|
113
|
+
actionpack (= 5.0.0.beta4)
|
114
|
+
actionview (= 5.0.0.beta4)
|
115
|
+
activejob (= 5.0.0.beta4)
|
116
|
+
activemodel (= 5.0.0.beta4)
|
117
|
+
activerecord (= 5.0.0.beta4)
|
118
|
+
activesupport (= 5.0.0.beta4)
|
119
|
+
bundler (>= 1.3.0, < 2.0)
|
120
|
+
railties (= 5.0.0.beta4)
|
121
|
+
sprockets-rails (>= 2.0.0)
|
122
|
+
rails-deprecated_sanitizer (1.0.3)
|
123
|
+
activesupport (>= 4.2.0.alpha)
|
124
|
+
rails-dom-testing (1.0.7)
|
125
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
126
|
+
nokogiri (~> 1.6.0)
|
127
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
128
|
+
rails-html-sanitizer (1.0.3)
|
129
|
+
loofah (~> 2.0)
|
130
|
+
railties (5.0.0.beta4)
|
131
|
+
actionpack (= 5.0.0.beta4)
|
132
|
+
activesupport (= 5.0.0.beta4)
|
133
|
+
method_source
|
134
|
+
rake (>= 0.8.7)
|
135
|
+
thor (>= 0.18.1, < 2.0)
|
136
|
+
rake (10.5.0)
|
137
|
+
rspec (3.1.0)
|
138
|
+
rspec-core (~> 3.1.0)
|
139
|
+
rspec-expectations (~> 3.1.0)
|
140
|
+
rspec-mocks (~> 3.1.0)
|
141
|
+
rspec-core (3.1.7)
|
142
|
+
rspec-support (~> 3.1.0)
|
143
|
+
rspec-expectations (3.1.2)
|
144
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
145
|
+
rspec-support (~> 3.1.0)
|
146
|
+
rspec-mocks (3.1.3)
|
147
|
+
rspec-support (~> 3.1.0)
|
148
|
+
rspec-rails (3.1.0)
|
149
|
+
actionpack (>= 3.0)
|
150
|
+
activesupport (>= 3.0)
|
151
|
+
railties (>= 3.0)
|
152
|
+
rspec-core (~> 3.1.0)
|
153
|
+
rspec-expectations (~> 3.1.0)
|
154
|
+
rspec-mocks (~> 3.1.0)
|
155
|
+
rspec-support (~> 3.1.0)
|
156
|
+
rspec-support (3.1.2)
|
157
|
+
sass (3.4.22)
|
158
|
+
sass-rails (5.0.4)
|
159
|
+
railties (>= 4.0.0, < 5.0)
|
160
|
+
sass (~> 3.1)
|
161
|
+
sprockets (>= 2.8, < 4.0)
|
162
|
+
sprockets-rails (>= 2.0, < 4.0)
|
163
|
+
tilt (>= 1.1, < 3)
|
164
|
+
simplecov (0.11.2)
|
165
|
+
docile (~> 1.1.0)
|
166
|
+
json (~> 1.8)
|
167
|
+
simplecov-html (~> 0.10.0)
|
168
|
+
simplecov-html (0.10.0)
|
169
|
+
slop (3.6.0)
|
170
|
+
sprockets (3.6.0)
|
171
|
+
concurrent-ruby (~> 1.0)
|
172
|
+
rack (> 1, < 3)
|
173
|
+
sprockets-rails (3.0.4)
|
174
|
+
actionpack (>= 4.0)
|
175
|
+
activesupport (>= 4.0)
|
176
|
+
sprockets (>= 3.0.0)
|
177
|
+
sqlite3 (1.3.11)
|
178
|
+
thor (0.19.1)
|
179
|
+
thread_safe (0.3.5)
|
180
|
+
tilt (2.0.5)
|
181
|
+
tzinfo (1.2.2)
|
182
|
+
thread_safe (~> 0.1)
|
183
|
+
uglifier (3.0.0)
|
184
|
+
execjs (>= 0.3.0, < 3)
|
185
|
+
websocket-driver (0.6.4)
|
186
|
+
websocket-extensions (>= 0.1.0)
|
187
|
+
websocket-extensions (0.1.2)
|
188
|
+
|
189
|
+
PLATFORMS
|
190
|
+
ruby
|
191
|
+
|
192
|
+
DEPENDENCIES
|
193
|
+
appraisal
|
194
|
+
bundler (~> 1.10)
|
195
|
+
codeclimate-test-reporter
|
196
|
+
nokogiri
|
197
|
+
progressive_render!
|
198
|
+
pry-byebug
|
199
|
+
rails (= 5.0.0.beta4)
|
200
|
+
rake (~> 10.0)
|
201
|
+
rspec
|
202
|
+
rspec-rails
|
203
|
+
sqlite3
|
204
|
+
|
205
|
+
BUNDLED WITH
|
206
|
+
1.12.5
|
@@ -16,8 +16,8 @@ module ProgressiveRender
|
|
16
16
|
def render_fragment(path, fragment_name)
|
17
17
|
content = context.render_to_string template: path, layout: false
|
18
18
|
stripped = Nokogiri::HTML(content).at_css("div##{fragment_name}_progressive_render")
|
19
|
-
context.render
|
19
|
+
context.render plain: stripped.to_html
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
23
|
-
end
|
23
|
+
end
|
@@ -6,6 +6,7 @@ $ ->
|
|
6
6
|
setup_listener = ->
|
7
7
|
$(document).on 'progressive_render:end', load_missing_content
|
8
8
|
$(document).on 'ajax:end', load_missing_content
|
9
|
+
$(document).on 'turbolinks:load', load_missing_content if window.Turbolinks
|
9
10
|
|
10
11
|
load_missing_content = ->
|
11
12
|
$('[data-progressive-render-placeholder=true]').each ->
|
@@ -17,4 +18,4 @@ load_missing_content = ->
|
|
17
18
|
# Start the load
|
18
19
|
$.ajax url: $this.data('progressive-render-path'), cache: false, success: (response) ->
|
19
20
|
$this.html(response);
|
20
|
-
$(document).trigger('progressive_render:end')
|
21
|
+
$(document).trigger('progressive_render:end')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: progressive_render
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeff Johnson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -246,6 +246,8 @@ files:
|
|
246
246
|
- gemfiles/rails_4_1.gemfile.lock
|
247
247
|
- gemfiles/rails_4_2.gemfile
|
248
248
|
- gemfiles/rails_4_2.gemfile.lock
|
249
|
+
- gemfiles/rails_5_0_0_beta4.gemfile
|
250
|
+
- gemfiles/rails_5_0_0_beta4.gemfile.lock
|
249
251
|
- lib/progressive_render.rb
|
250
252
|
- lib/progressive_render/controller.rb
|
251
253
|
- lib/progressive_render/fragment_name_iterator.rb
|
@@ -281,7 +283,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
281
283
|
version: '0'
|
282
284
|
requirements: []
|
283
285
|
rubyforge_project:
|
284
|
-
rubygems_version: 2.
|
286
|
+
rubygems_version: 2.4.8
|
285
287
|
signing_key:
|
286
288
|
specification_version: 4
|
287
289
|
summary: Progressively load static or dynamic content on page load
|