asynchronizer 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/MIT-LICENSE +20 -0
- data/lib/asynchronizer.rb +4 -0
- data/lib/asynchronizer/engine.rb +5 -0
- data/lib/asynchronizer/version.rb +3 -0
- data/vendor/assets/javascripts/asynchronizer.coffee +26 -0
- metadata +77 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0253ade0238ee9a80719fd725d5cd22966751f63
|
4
|
+
data.tar.gz: e70d8c93f160c30ebaeb36f6123c7c2de6f74829
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2046717cb1dafe2dc826b56c51aaf8b47e9c7cf8fe7a99651a6a3cf8be7aa42cf1bf3214e211069a33348d55ef044e3c02f3a001342f30855541d68717a9c6d9
|
7
|
+
data.tar.gz: ace17307412cf3fe6664ac559534de85c8224c87b65b33035d1e8a3b3f1fe6c1c41351a96e91bc5f99749aff5cacf4f0059c8659ba72de90bedc5327d514a526
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2014 Kevin Goslar
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# Collects data from asynchronous events.
|
2
|
+
|
3
|
+
class window.Asynchronizer
|
4
|
+
|
5
|
+
# conditions: array of simple conditions to wait for.
|
6
|
+
# callback: method that is called when all required conditions are met.
|
7
|
+
# Provides the collected data.
|
8
|
+
constructor: (conditions, callback) ->
|
9
|
+
|
10
|
+
# The callback to call when all conditions are fulfilled.
|
11
|
+
@callback = callback
|
12
|
+
|
13
|
+
# The conditions that still need to be fulfilled before we are done
|
14
|
+
# and can call the callback.
|
15
|
+
@remaining_conditions = conditions
|
16
|
+
|
17
|
+
# The accumulated values.
|
18
|
+
@values = []
|
19
|
+
|
20
|
+
|
21
|
+
# Registers that the given condition is fulfilled, and collects the given value associated with it.
|
22
|
+
check: (condition, value) ->
|
23
|
+
@values.push value if value
|
24
|
+
@remaining_conditions = _.without @remaining_conditions, condition
|
25
|
+
if @remaining_conditions.length is 0
|
26
|
+
@callback @values
|
metadata
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: asynchronizer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.6
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Kevin Goslar
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-01-07 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 4.0.2
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 4.0.2
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: sqlite3
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: Plugin for the asset pipeline.
|
42
|
+
email:
|
43
|
+
- kevin.goslar@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- vendor/assets/javascripts/asynchronizer.coffee
|
49
|
+
- lib/asynchronizer/engine.rb
|
50
|
+
- lib/asynchronizer/version.rb
|
51
|
+
- lib/asynchronizer.rb
|
52
|
+
- MIT-LICENSE
|
53
|
+
homepage: https://github.com/kevgo/asynchronizer-rails
|
54
|
+
licenses:
|
55
|
+
- MIT
|
56
|
+
metadata: {}
|
57
|
+
post_install_message:
|
58
|
+
rdoc_options: []
|
59
|
+
require_paths:
|
60
|
+
- lib
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
66
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - '>='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: '0'
|
71
|
+
requirements: []
|
72
|
+
rubyforge_project:
|
73
|
+
rubygems_version: 2.0.14
|
74
|
+
signing_key:
|
75
|
+
specification_version: 4
|
76
|
+
summary: Provides Asynchronizer to Ruby on Rails applications.
|
77
|
+
test_files: []
|