render_async 2.1.0 → 2.1.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.all-contributorsrc +88 -2
- data/.github/CONTRIBUTING.md +40 -0
- data/.github/FUNDING.yml +3 -0
- data/.gitignore +1 -0
- data/.gitmodules +4 -0
- data/CHANGELOG.md +71 -0
- data/README.md +405 -70
- data/app/views/render_async/_render_async.html.erb +20 -23
- data/app/views/render_async/_request_jquery.js.erb +146 -37
- data/app/views/render_async/_request_vanilla.js.erb +152 -38
- data/bin/integration-tests +7 -0
- data/lib/render_async/configuration.rb +4 -1
- data/lib/render_async/version.rb +1 -1
- data/lib/render_async/view_helper.rb +63 -23
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5eb3554f389bd0bcab8944c56c59238359d1c181c7dbc212d12e0335a9960fa6
|
4
|
+
data.tar.gz: a00cfb7925232e67825579356c33707d97258d369d41d92f676077c6e0b1d17e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acd95e67267622528c723d41ba5dfe1114319173f3455004523fd0dab784d8626a21314a389373f473d5147465e29773defb75c40d7ff6cb15053b7eba44e1a2
|
7
|
+
data.tar.gz: ccb2a071554bdca88a02b8b3b178711b01d116067eda7d48f01385056459cd3f59e8561d489ce76380be26ad8979398f40300759915c07962899aef608751e24
|
data/.all-contributorsrc
CHANGED
@@ -11,7 +11,7 @@
|
|
11
11
|
"login": "nikolalsvk",
|
12
12
|
"name": "Nikola Đuza",
|
13
13
|
"avatar_url": "https://avatars2.githubusercontent.com/u/3028124?v=4",
|
14
|
-
"profile": "
|
14
|
+
"profile": "https://nikolalsvk.github.io",
|
15
15
|
"contributions": [
|
16
16
|
"question",
|
17
17
|
"code",
|
@@ -138,7 +138,8 @@
|
|
138
138
|
"avatar_url": "https://avatars3.githubusercontent.com/u/1935686?v=4",
|
139
139
|
"profile": "https://github.com/reneklacan",
|
140
140
|
"contributions": [
|
141
|
-
"code"
|
141
|
+
"code",
|
142
|
+
"doc"
|
142
143
|
]
|
143
144
|
},
|
144
145
|
{
|
@@ -149,6 +150,91 @@
|
|
149
150
|
"contributions": [
|
150
151
|
"doc"
|
151
152
|
]
|
153
|
+
},
|
154
|
+
{
|
155
|
+
"login": "ThanhKhoaIT",
|
156
|
+
"name": "Khoa Nguyen",
|
157
|
+
"avatar_url": "https://avatars0.githubusercontent.com/u/6081795?v=4",
|
158
|
+
"profile": "https://github.com/ThanhKhoaIT",
|
159
|
+
"contributions": [
|
160
|
+
"code",
|
161
|
+
"doc"
|
162
|
+
]
|
163
|
+
},
|
164
|
+
{
|
165
|
+
"login": "preetsethi",
|
166
|
+
"name": "Preet Sethi",
|
167
|
+
"avatar_url": "https://avatars2.githubusercontent.com/u/8645918?v=4",
|
168
|
+
"profile": "https://www.linkedin.com/in/preetsethila/",
|
169
|
+
"contributions": [
|
170
|
+
"code"
|
171
|
+
]
|
172
|
+
},
|
173
|
+
{
|
174
|
+
"login": "fffx",
|
175
|
+
"name": "fangxing",
|
176
|
+
"avatar_url": "https://avatars3.githubusercontent.com/u/11586335?v=4",
|
177
|
+
"profile": "https://github.com/fffx",
|
178
|
+
"contributions": [
|
179
|
+
"code"
|
180
|
+
]
|
181
|
+
},
|
182
|
+
{
|
183
|
+
"login": "lipsumar",
|
184
|
+
"name": "Emmanuel Pire",
|
185
|
+
"avatar_url": "https://avatars3.githubusercontent.com/u/1191418?v=4",
|
186
|
+
"profile": "http://blog.lipsumarium.com",
|
187
|
+
"contributions": [
|
188
|
+
"code",
|
189
|
+
"doc"
|
190
|
+
]
|
191
|
+
},
|
192
|
+
{
|
193
|
+
"login": "maximgeerinck",
|
194
|
+
"name": "Maxim Geerinck",
|
195
|
+
"avatar_url": "https://avatars1.githubusercontent.com/u/615509?v=4",
|
196
|
+
"profile": "https://github.com/maximgeerinck",
|
197
|
+
"contributions": [
|
198
|
+
"code"
|
199
|
+
]
|
200
|
+
},
|
201
|
+
{
|
202
|
+
"login": "vanboom",
|
203
|
+
"name": "Don",
|
204
|
+
"avatar_url": "https://avatars1.githubusercontent.com/u/251706?v=4",
|
205
|
+
"profile": "https://github.com/vanboom",
|
206
|
+
"contributions": [
|
207
|
+
"code"
|
208
|
+
]
|
209
|
+
},
|
210
|
+
{
|
211
|
+
"login": "villu164",
|
212
|
+
"name": "villu164",
|
213
|
+
"avatar_url": "https://avatars0.githubusercontent.com/u/998682?v=4",
|
214
|
+
"profile": "https://github.com/villu164",
|
215
|
+
"contributions": [
|
216
|
+
"doc"
|
217
|
+
]
|
218
|
+
},
|
219
|
+
{
|
220
|
+
"login": "Mbuckley0",
|
221
|
+
"name": "Mitchell Buckley",
|
222
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/11203679?v=4",
|
223
|
+
"profile": "https://github.com/Mbuckley0",
|
224
|
+
"contributions": [
|
225
|
+
"code",
|
226
|
+
"doc"
|
227
|
+
]
|
228
|
+
},
|
229
|
+
{
|
230
|
+
"login": "yhirano55",
|
231
|
+
"name": "yhirano55",
|
232
|
+
"avatar_url": "https://avatars.githubusercontent.com/u/15371677?v=4",
|
233
|
+
"profile": "https://github.com/yhirano55",
|
234
|
+
"contributions": [
|
235
|
+
"code",
|
236
|
+
"doc"
|
237
|
+
]
|
152
238
|
}
|
153
239
|
],
|
154
240
|
"repoType": "github"
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# :pray: Contributing
|
2
|
+
|
3
|
+
Thank you for considering or deciding to contribute, this is much appreciated!
|
4
|
+
Any kind of bug reports and pull requests are encouraged and welcome on GitHub at
|
5
|
+
https://github.com/renderedtext/render_async.
|
6
|
+
|
7
|
+
## :inbox_tray: Installing dependencies
|
8
|
+
|
9
|
+
You can install all needed dependencies by running `bin/setup`.
|
10
|
+
|
11
|
+
## :runner: Running RSpec tests
|
12
|
+
|
13
|
+
You can run either `rake spec` or `bundle exec rspec` to run all the RSpec tests
|
14
|
+
in the project.
|
15
|
+
|
16
|
+
## :running_woman: Running integration tests
|
17
|
+
|
18
|
+
There is a simple command `bin/integration-tests` which sets up 2 submodules,
|
19
|
+
and runs Cucumber features in them.
|
20
|
+
|
21
|
+
There are 2 submodules for render_async. The submodules are Rails 5 and Rails 6
|
22
|
+
projects which are located in:
|
23
|
+
|
24
|
+
- `spec/fixtures/rails-5-base-app`, and
|
25
|
+
- `spec/fixtures/rails-6-base-app`.
|
26
|
+
|
27
|
+
You can find [Rails 5 base app here](https://github.com/nikolalsvk/rails-5-base-app/tree/render-async),
|
28
|
+
and the [Rails 6 base app here](https://github.com/nikolalsvk/rails-6-base-app/tree/render-async).
|
29
|
+
|
30
|
+
Each of them have different use cases of render_async defined in `app/views/render_asyncs/_use_cases.html.erb` in their repos.
|
31
|
+
All the feature tests are inside `features/render_async.feature` and `features/render_async_jquery.feature` files.
|
32
|
+
|
33
|
+
If you are adding one or more feature tests or use cases, make sure to make a
|
34
|
+
PR on those repos as well and include them in the PR on the render_async repo.
|
35
|
+
|
36
|
+
## :sos: Need help?
|
37
|
+
|
38
|
+
Got any issues or difficulties?
|
39
|
+
Join [render_async's Discord channel](https://discord.gg/SPfbeRm)
|
40
|
+
and ask questions there. We will try to respond to you as quickly as possible.
|
data/.github/FUNDING.yml
ADDED
data/.gitignore
CHANGED
data/.gitmodules
CHANGED
@@ -2,3 +2,7 @@
|
|
2
2
|
path = spec/fixtures/rails-5-base-app
|
3
3
|
url = git@github.com:nikolalsvk/rails-5-base-app.git
|
4
4
|
branch = render-async
|
5
|
+
[submodule "spec/fixtures/rails-6-base-app"]
|
6
|
+
path = spec/fixtures/rails-6-base-app
|
7
|
+
url = git@github.com:nikolalsvk/rails-6-base-app.git
|
8
|
+
branch = render-async
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,74 @@
|
|
1
|
+
### 2.1.10 (2021/03/21)
|
2
|
+
|
3
|
+
* [#146](https://github.com/renderedtext/render_async/pull/146): Add comment when we check if container is present - [@nikolalsvk](https://github.com/nikolalsvk).
|
4
|
+
* [#145](https://github.com/renderedtext/render_async/pull/145): Wrap html_options for turbolinks - [@yhirano55](https://github.com/yhirano55).
|
5
|
+
* [#144](https://github.com/renderedtext/render_async/pull/144): Avoid TypeError if container has already disappear - [@yhirano55](https://github.com/yhirano55).
|
6
|
+
|
7
|
+
### 2.1.9 (2021/02/23)
|
8
|
+
|
9
|
+
* [#142](https://github.com/renderedtext/render_async/pull/142): Update Turbolinks docs - [@nikolalsvk](https://github.com/nikolalsvk).
|
10
|
+
* [#141](https://github.com/renderedtext/render_async/pull/141): Add Support for Turbo - [@MBuckley0](https://github.com/Mbuckley0).
|
11
|
+
* [#139](https://github.com/renderedtext/render_async/pull/139): Fix readme configuration-options anchor - [@richardvenneman](https://github.com/richardvenneman).
|
12
|
+
* [#138](https://github.com/renderedtext/render_async/pull/138): Add Rails 6 base app as a fixture - [@nikolalsvk](https://github.com/nikolalsvk).
|
13
|
+
* [#137](https://github.com/renderedtext/render_async/pull/137): Rename config - [@nikolalsvk](https://github.com/nikolalsvk).
|
14
|
+
|
15
|
+
### 2.1.8 (2020/10/24)
|
16
|
+
|
17
|
+
* [#134](https://github.com/renderedtext/render_async/pull/134): Add config option for setting nonce - [@nikolalsvk](https://github.com/nikolalsvk).
|
18
|
+
* [#132](https://github.com/renderedtext/render_async/pull/132): Refresh render_async with an event - [@nikolalsvk](https://github.com/nikolalsvk).
|
19
|
+
* [#131](https://github.com/renderedtext/render_async/pull/131): Start to poll on page load with toggle - [@nikolalsvk](https://github.com/nikolalsvk).
|
20
|
+
* [#130](https://github.com/renderedtext/render_async/pull/130): Set up control events after document loaded - [@nikolalsvk](https://github.com/nikolalsvk).
|
21
|
+
* [#127](https://github.com/renderedtext/render_async/pull/127): Update README.md, to reflect correct turbolinks configuration value - [@villu164](https://github.com/villu164).
|
22
|
+
|
23
|
+
### 2.1.7 (2020/8/1)
|
24
|
+
|
25
|
+
* [#125](https://github.com/renderedtext/render_async/pull/125): Implement retry after some time feature - [@nikolalsvk](https://github.com/nikolalsvk).
|
26
|
+
* [#124](https://github.com/renderedtext/render_async/pull/124): Add more info on how to control polling - [@nikolalsvk](https://github.com/nikolalsvk).
|
27
|
+
* [#123](https://github.com/renderedtext/render_async/pull/123): Simplify calling of start and stop event when interval is defined - [@nikolalsvk](https://github.com/nikolalsvk).
|
28
|
+
* [#119](https://github.com/renderedtext/render_async/pull/119): Add polling control start/stop events - [@vanboom](https://github.com/vanboom).
|
29
|
+
* [#120](https://github.com/renderedtext/render_async/pull/120): Fine tune custom content_for feature - [@nikolalsvk](https://github.com/nikolalsvk).
|
30
|
+
* [#117](https://github.com/renderedtext/render_async/pull/117): Allow a custom content_for name - [@vanboom](https://github.com/vanboom).
|
31
|
+
|
32
|
+
### 2.1.6 (2020/5/9)
|
33
|
+
|
34
|
+
* [#114](https://github.com/renderedtext/render_async/pull/114): Call render_async logic if document state is ready or interactive - [@nikolalsvk](https://github.com/nikolalsvk).
|
35
|
+
* [#113](https://github.com/renderedtext/render_async/pull/113): Remove interval after Turbolinks visit event - [@nikolalsvk](https://github.com/nikolalsvk).
|
36
|
+
* [#112](https://github.com/renderedtext/render_async/pull/112): Add X-Requested-With header in Vanilla JS - [@nikolalsvk](https://github.com/nikolalsvk).
|
37
|
+
* [#110](https://github.com/renderedtext/render_async/pull/110): Remove preventDefault, and load toggle in stream - [@vanboom](https://github.com/vanboom).
|
38
|
+
|
39
|
+
### 2.1.5 (2020/3/22)
|
40
|
+
|
41
|
+
* [#105](https://github.com/renderedtext/render_async/pull/105): Load toggle listeners after page loads - [@nikolalsvk](https://github.com/nikolalsvk).
|
42
|
+
* [#104](https://github.com/renderedtext/render_async/pull/104): Attach container to dispatched events - [@nikolalsvk](https://github.com/nikolalsvk).
|
43
|
+
* [#103](https://github.com/renderedtext/render_async/pull/103): Add generic "load" and "error" events - [@lipsumar](https://github.com/lipsumar).
|
44
|
+
* [#98](https://github.com/renderedtext/render_async/pull/98): Bump nonce pattern in the README to follow Rails CSP standard - [@colinxfleming](https://github.com/colinxfleming).
|
45
|
+
|
46
|
+
### 2.1.4 (2019/11/11)
|
47
|
+
|
48
|
+
* [#96](https://github.com/renderedtext/render_async/pull/96): Add once option to remove event once it's triggered #94 - [@fffx](https://github.com/fffx).
|
49
|
+
|
50
|
+
### 2.1.3 (2019/9/24)
|
51
|
+
|
52
|
+
* [#95](https://github.com/renderedtext/render_async/pull/95): Use double quotes for displaying error message - [@nikolalsvk](https://github.com/nikolalsvk).
|
53
|
+
* [#93](https://github.com/renderedtext/render_async/pull/93): Fix: "Uncaught ReferenceError: \_interval" #92 - [@fffx](https://github.com/fffx).
|
54
|
+
|
55
|
+
### 2.1.2 (2019/8/17)
|
56
|
+
|
57
|
+
* [#89](https://github.com/renderedtext/render_async/pull/89): Bump version to 2.1.2 - [@nikolalsvk](https://github.com/nikolalsvk).
|
58
|
+
* [#82](https://github.com/renderedtext/render_async/pull/88): When toggle true, do not fire `_renderAsyncFunc` on `turbolinks:load` - [@ThanhKhoaIT](https://github.com/ThanhKhoaIT).
|
59
|
+
|
60
|
+
### 2.1.1 (2019/8/17)
|
61
|
+
|
62
|
+
* [#85](https://github.com/renderedtext/render_async/pull/85): Rename main JS function and support toggle feature with other features - [@nikolalsvk](https://github.com/nikolalsvk).
|
63
|
+
* [#82](https://github.com/renderedtext/render_async/pull/82): Add toggle selector and event to render - [@ThanhKhoaIT](https://github.com/ThanhKhoaIT).
|
64
|
+
* DEPRECATION WARNING - html_options is now a hash that you pass to render_async instead of an argument. If you passed for example a nonce: '21312aas...', you will need to pass
|
65
|
+
html_options: { nonce: '21312aas...' }
|
66
|
+
|
67
|
+
### 2.1.0 (2019/5/6)
|
68
|
+
|
69
|
+
* [#77](https://github.com/renderedtext/render_async/pull/77): Call render_async logic every N seconds - [@nikolalsvk](https://github.com/nikolalsvk).
|
70
|
+
* [#76](https://github.com/renderedtext/render_async/pull/76): Retry render_async on failure - [@nikolalsvk](https://github.com/nikolalsvk).
|
71
|
+
|
1
72
|
### 2.0.2 (2019/1/4)
|
2
73
|
|
3
74
|
* [#74](https://github.com/renderedtext/render_async/pull/74): Remove bundler as a dependency - [@nikolalsvk](https://github.com/nikolalsvk).
|