hoarder-js 0.0.1 → 0.0.2
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.
- data/CHANGELOG +2 -0
- data/Gemfile.lock +2 -2
- data/Manifest +14 -3
- data/assets/scripts/coffee/hoarder/form/form.coffee +47 -44
- data/assets/scripts/coffee/hoarder/form/form_serializer.coffee +23 -0
- data/assets/scripts/coffee/hoarder/form_manager.coffee +35 -19
- data/assets/scripts/coffee/hoarder/submitter/form_submitter.coffee +10 -15
- data/assets/scripts/coffee/hoarder/submitter/submitters/base_submitter.coffee +11 -0
- data/assets/scripts/coffee/hoarder/submitter/submitters/polling_submitter.coffee +30 -27
- data/assets/scripts/coffee/hoarder/submitter/submitters/simple_submitter.coffee +11 -21
- data/assets/scripts/coffee/hoarder/validator/constraints/alpha_constraint.coffee +8 -14
- data/assets/scripts/coffee/hoarder/validator/constraints/alphanumeric_constraint.coffee +8 -14
- data/assets/scripts/coffee/hoarder/validator/constraints/base_constraint.coffee +10 -0
- data/assets/scripts/coffee/hoarder/validator/constraints/credit_card_constraint.coffee +8 -14
- data/assets/scripts/coffee/hoarder/validator/constraints/email_constraint.coffee +8 -14
- data/assets/scripts/coffee/hoarder/validator/constraints/max_length_constraint.coffee +8 -14
- data/assets/scripts/coffee/hoarder/validator/constraints/min_length_constraint.coffee +8 -14
- data/assets/scripts/coffee/hoarder/validator/constraints/numeric_constraint.coffee +8 -14
- data/assets/scripts/coffee/hoarder/validator/constraints/phone_constraint.coffee +8 -14
- data/assets/scripts/coffee/hoarder/validator/constraints/required_constraint.coffee +8 -14
- data/assets/scripts/coffee/hoarder/validator/form_validator.coffee +30 -25
- data/assets/scripts/coffee/hoarder/validator/rules/validation_rule.coffee +10 -0
- data/assets/scripts/js/lib/bonzo.js +1151 -0
- data/assets/scripts/js/lib/qwery.js +369 -0
- data/assets/scripts/js/lib/reqwest.js +565 -0
- data/assets/scripts/js/patches/event_listeners.js +73 -0
- data/bin/hoarder.js +2807 -369
- data/hoarder-js.gemspec +3 -3
- data/spec/jasmine.yml +3 -0
- data/spec/runner.html +44 -34
- data/spec/support/fixtures.coffee +19 -0
- data/spec/support/lib/jasmine-fixture.js +506 -0
- data/spec/support/lib/jquery-1.7.1.min.js +4 -0
- data/spec/support/mocks.coffee +12 -37
- data/spec/support/requirements.coffee +0 -1
- data/spec/tests/form/form_serializer_spec.coffee +78 -0
- data/spec/tests/form/form_spec.coffee +127 -0
- data/spec/tests/form_manager_spec.coffee +128 -40
- data/spec/tests/submitter/form_submitter_spec.coffee +59 -42
- data/spec/tests/submitter/submitters/polling_submitter_spec.coffee +102 -57
- data/spec/tests/submitter/submitters/simple_submitter_spec.coffee +42 -16
- data/spec/tests/validator/constraints_spec.coffee +65 -57
- data/spec/tests/validator/form_validator_spec.coffee +39 -23
- data/spec/tests/validator/validation_rule_spec.coffee +14 -0
- metadata +16 -5
- data/assets/scripts/coffee/hoarder/form/form_element.coffee +0 -22
- data/assets/scripts/coffee/hoarder/validator/error/validation_error.coffee +0 -9
- data/assets/scripts/js/lib/jquery.js +0 -5
@@ -1,60 +1,105 @@
|
|
1
1
|
PollingSubmitter = require "hoarder/submitter/submitters/polling_submitter"
|
2
|
+
Form = require 'hoarder/form/form'
|
2
3
|
|
3
4
|
describe "PollingSubmitter", ->
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
5
|
+
submitter = form = null
|
6
|
+
|
7
|
+
reqwestCallback = null
|
8
|
+
reqwestResponse = null
|
9
|
+
reqwestSpy = (params)-> params[reqwestCallback].apply null, reqwestResponse
|
10
|
+
|
11
|
+
# these are a result of using Function::apply above
|
12
|
+
successResponse = -> reqwestResponse[0]
|
13
|
+
errorResponse = -> reqwestResponse[1]
|
14
|
+
|
15
|
+
callbacks =
|
16
|
+
successHappened: (form, data)->
|
17
|
+
errorHappened: (form, errorMessage)->
|
18
|
+
|
19
|
+
beforeEach ->
|
20
|
+
createTestFormFixture()
|
21
|
+
|
22
|
+
form = new Form(document.getElementById('test-form'))
|
23
|
+
submitter = new PollingSubmitter("/poll-url", 500)
|
24
|
+
|
25
|
+
reqwestCallback = "success"
|
26
|
+
spyOn(callbacks, 'successHappened').andCallThrough()
|
27
|
+
spyOn(callbacks, 'errorHappened').andCallThrough()
|
28
|
+
submitter.submittedWithSuccess.add callbacks.successHappened
|
29
|
+
submitter.submittedWithError.add callbacks.errorHappened
|
30
|
+
spyOn(window, 'reqwest').andCallFake(reqwestSpy)
|
31
|
+
|
32
|
+
describe '#submit', ->
|
33
|
+
|
34
|
+
describe "when the submission is successful", ->
|
35
|
+
|
36
|
+
it "will initiate a poll", ->
|
37
|
+
spyOn(submitter, 'poll')
|
38
|
+
reqwestResponse = mocks.pollingSubmitSuccessResponse
|
39
|
+
submitter.submit(form)
|
40
|
+
expect(submitter.poll).toHaveBeenCalledWith(form, successResponse().processId)
|
41
|
+
|
42
|
+
describe "when an error occurs in the submission", ->
|
43
|
+
|
44
|
+
it "will call callbacks added to the submittedWithError signal", ->
|
45
|
+
reqwestCallback = "error"
|
46
|
+
reqwestResponse = mocks.errorResponse
|
47
|
+
submitter.submit(form)
|
48
|
+
expect(callbacks.errorHappened).toHaveBeenCalledWith(form, errorResponse())
|
49
|
+
|
50
|
+
describe '#poll', ->
|
51
|
+
|
52
|
+
beforeEach ->
|
53
|
+
spyOn(submitter, "poll").andCallThrough()
|
54
|
+
|
55
|
+
it "will poll with the given frequency", ->
|
56
|
+
reqwestResponse = mocks.pollingProcessNotCompletedResponse
|
57
|
+
jasmine.Clock.useMock()
|
58
|
+
submitter.poll(form, "1234")
|
59
|
+
expect(submitter.poll.calls.length).toEqual 1
|
60
|
+
jasmine.Clock.tick 501
|
61
|
+
expect(submitter.poll.calls.length).toEqual 2
|
62
|
+
jasmine.Clock.tick 501
|
63
|
+
expect(submitter.poll.calls.length).toEqual 3
|
64
|
+
|
65
|
+
describe "when the poll is successful", ->
|
66
|
+
|
67
|
+
describe "and the process has completed", ->
|
68
|
+
|
69
|
+
it "will stop polling", ->
|
70
|
+
reqwestResponse = mocks.pollingProcessNotCompletedResponse
|
71
|
+
jasmine.Clock.useMock()
|
72
|
+
submitter.poll(form, "1234")
|
73
|
+
expect(submitter.poll.calls.length).toEqual 1
|
74
|
+
reqwestResponse = mocks.pollingProcessCompletedResponse
|
75
|
+
jasmine.Clock.tick 501
|
76
|
+
expect(submitter.poll.calls.length).toEqual 2
|
77
|
+
jasmine.Clock.tick 501
|
78
|
+
expect(submitter.poll.calls.length).toEqual 2
|
79
|
+
|
80
|
+
it "will call callbacks added to the submittedWithSuccess signal", ->
|
81
|
+
reqwestResponse = mocks.pollingProcessCompletedResponse
|
82
|
+
submitter.poll(form, "1234")
|
83
|
+
expect(callbacks.successHappened).toHaveBeenCalledWith(form, successResponse().processData)
|
84
|
+
|
85
|
+
describe "and the process has not yet completed", ->
|
86
|
+
|
87
|
+
it "will initiate another poll", ->
|
88
|
+
reqwestResponse = mocks.pollingProcessNotCompletedResponse
|
89
|
+
jasmine.Clock.useMock()
|
90
|
+
submitter.poll(form, "1234")
|
91
|
+
jasmine.Clock.tick 501
|
92
|
+
expect(submitter.poll.calls.length).toBeGreaterThan 1
|
93
|
+
|
94
|
+
it "will not call callbacks added to the submittedWithSuccess signal", ->
|
95
|
+
reqwestResponse = mocks.pollingProcessNotCompletedResponse
|
96
|
+
submitter.poll(form, "1234")
|
97
|
+
expect(callbacks.successHappened).not.toHaveBeenCalled()
|
98
|
+
|
99
|
+
describe "when an error occurs in the polling", ->
|
100
|
+
|
101
|
+
it "will call callbacks added to the submittedWithError signal", ->
|
102
|
+
reqwestCallback = "error"
|
103
|
+
reqwestResponse = mocks.errorResponse
|
104
|
+
submitter.poll(form, "1234")
|
105
|
+
expect(callbacks.errorHappened).toHaveBeenCalledWith(form, errorResponse())
|
@@ -1,19 +1,45 @@
|
|
1
1
|
SimpleSubmitter = require "hoarder/submitter/submitters/simple_submitter"
|
2
|
+
Form = require 'hoarder/form/form'
|
2
3
|
|
3
4
|
describe "SimpleSubmitter", ->
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
5
|
+
submitter = form = null
|
6
|
+
|
7
|
+
reqwestCallback = "success"
|
8
|
+
reqwestResponse = null
|
9
|
+
reqwestSpy = (params)-> params[reqwestCallback].apply null, reqwestResponse
|
10
|
+
|
11
|
+
# these are a result of using Function::apply above
|
12
|
+
successResponse = -> reqwestResponse[0]
|
13
|
+
errorResponse = -> reqwestResponse[1]
|
14
|
+
|
15
|
+
callbacks =
|
16
|
+
successHappened: (form, data)->
|
17
|
+
errorHappened: (form, errorMessage)->
|
18
|
+
|
19
|
+
beforeEach ->
|
20
|
+
createTestFormFixture()
|
21
|
+
|
22
|
+
form = new Form(document.getElementById('test-form'))
|
23
|
+
submitter = new SimpleSubmitter()
|
24
|
+
spyOn(callbacks, 'successHappened').andCallThrough()
|
25
|
+
spyOn(callbacks, 'errorHappened').andCallThrough()
|
26
|
+
submitter.submittedWithSuccess.add callbacks.successHappened
|
27
|
+
submitter.submittedWithError.add callbacks.errorHappened
|
28
|
+
spyOn(window, 'reqwest').andCallFake(reqwestSpy)
|
29
|
+
|
30
|
+
describe '#submit', ->
|
31
|
+
|
32
|
+
describe "when the submission is successful", ->
|
33
|
+
|
34
|
+
it "will call callbacks added to the submittedWithSuccess signal", ->
|
35
|
+
reqwestResponse = mocks.simpleSuccessResponse
|
36
|
+
submitter.submit(form)
|
37
|
+
expect(callbacks.successHappened).toHaveBeenCalledWith(form, successResponse())
|
38
|
+
|
39
|
+
describe "when an error occurs in the submission", ->
|
40
|
+
|
41
|
+
it "will call callbacks added to the submittedWithError signal", ->
|
42
|
+
reqwestCallback = 'error'
|
43
|
+
reqwestResponse = mocks.errorResponse
|
44
|
+
submitter.submit(form)
|
45
|
+
expect(callbacks.errorHappened).toHaveBeenCalledWith(form, errorResponse())
|
@@ -1,6 +1,4 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
#AlphaConstraint = require "/hoarder/validator/constraints/alpha_constraint"
|
1
|
+
AlphaConstraint = require "hoarder/validator/constraints/alpha_constraint"
|
4
2
|
AlphanumericConstraint = require "hoarder/validator/constraints/alphanumeric_constraint"
|
5
3
|
CreditCardConstraint = require "hoarder/validator/constraints/credit_card_constraint"
|
6
4
|
EmailConstraint = require "hoarder/validator/constraints/email_constraint"
|
@@ -11,64 +9,74 @@ PhoneConstraint = require "hoarder/validator/constraints/phone_constraint"
|
|
11
9
|
RequiredConstraint = require "hoarder/validator/constraints/required_constraint"
|
12
10
|
|
13
11
|
describe "Validator Constraints", ->
|
14
|
-
it "can require that a value be alphanumeric only", ->
|
15
|
-
constraint = new AlphanumericConstraint()
|
16
|
-
validElement = new FormElement("fullName", "71m5h3lburn3")
|
17
|
-
invalidElement = new FormElement("fullName", "T!m $h3lbur*3")
|
18
|
-
expect(constraint.handle(validElement)).toEqual []
|
19
|
-
expect(constraint.handle(invalidElement)[0].message).toEqual "This field only accepts numbers and characters (0-9, A-Z, a-z)."
|
20
12
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
13
|
+
newElement = (name, value)-> { name: name, value: value }
|
14
|
+
|
15
|
+
it "can require that a value be alpha only", ->
|
16
|
+
constraint = new AlphaConstraint()
|
17
|
+
validElement = newElement("fullName", "ABCabc")
|
18
|
+
invalidElement = newElement("fullName", "a1b2c3")
|
19
|
+
expect(-> constraint.handle(validElement)).not.toThrow()
|
20
|
+
expect(-> constraint.handle(invalidElement)).toThrow()
|
21
|
+
|
22
|
+
it "can require that a value be alphanumeric only", ->
|
23
|
+
constraint = new AlphanumericConstraint()
|
24
|
+
validElement = newElement("fullName", "71m5h3lburn3")
|
25
|
+
invalidElement = newElement("fullName", "T!m $h3lbur*3")
|
26
|
+
expect(-> constraint.handle(validElement)).not.toThrow()
|
27
|
+
expect(-> constraint.handle(invalidElement)).toThrow()
|
28
|
+
|
29
|
+
it "can require that a value be a valid credit card number", ->
|
30
|
+
constraint = new CreditCardConstraint()
|
31
|
+
validElement = newElement("number", "4111111111111111")
|
32
|
+
invalidElement = newElement("number", "12345")
|
33
|
+
expect(-> constraint.handle(validElement)).not.toThrow()
|
34
|
+
expect(-> constraint.handle(invalidElement)).toThrow()
|
27
35
|
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
36
|
+
it "can require that a value be a valid email address", ->
|
37
|
+
constraint = new EmailConstraint()
|
38
|
+
validElement = newElement("email", "tim@musiconelive.com")
|
39
|
+
invalidElement = newElement("email", "tim she@d")
|
40
|
+
expect(-> constraint.handle(validElement)).not.toThrow()
|
41
|
+
expect(-> constraint.handle(invalidElement)).toThrow()
|
34
42
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
+
it "can require that a value have a maximum length", ->
|
44
|
+
constraint = new MaxLengthConstraint()
|
45
|
+
validElement = newElement("zipCode", "78765")
|
46
|
+
validElementTwo = newElement("zipCode", "787")
|
47
|
+
invalidElement = newElement("zipCode", "787657")
|
48
|
+
expect(-> constraint.handle(validElement, { context: 5 })).not.toThrow()
|
49
|
+
expect(-> constraint.handle(validElementTwo, { context: 5 })).not.toThrow()
|
50
|
+
expect(-> constraint.handle(invalidElement, { context: 5 })).toThrow()
|
43
51
|
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
+
it "can require that a value have a minimum length", ->
|
53
|
+
constraint = new MinLengthConstraint()
|
54
|
+
validElement = newElement("zipCode", "78765")
|
55
|
+
validElementTwo = newElement("zipCode", "787643")
|
56
|
+
invalidElement = newElement("zipCode", "787")
|
57
|
+
expect(-> constraint.handle(validElement, { context: 5 })).not.toThrow()
|
58
|
+
expect(-> constraint.handle(validElementTwo, { context: 5 })).not.toThrow()
|
59
|
+
expect(-> constraint.handle(invalidElement, { context: 5 })).toThrow()
|
52
60
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
61
|
+
it "can require that a value be numeric only", ->
|
62
|
+
constraint = new NumericConstraint()
|
63
|
+
validElement = newElement("zipCode", "78765")
|
64
|
+
invalidElement = newElement("zipCode", "Seven8765")
|
65
|
+
expect(-> constraint.handle(validElement)).not.toThrow()
|
66
|
+
expect(-> constraint.handle(invalidElement)).toThrow()
|
59
67
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
68
|
+
it "can require that a value be a valid phone number", ->
|
69
|
+
constraint = new PhoneConstraint()
|
70
|
+
validElement = newElement("phone", "(555)555-5555")
|
71
|
+
invalidElement = newElement("phone", "12341")
|
72
|
+
expect(-> constraint.handle(validElement)).not.toThrow()
|
73
|
+
expect(-> constraint.handle(invalidElement)).toThrow()
|
66
74
|
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
+
it "can require that a value be required", ->
|
76
|
+
constraint = new RequiredConstraint()
|
77
|
+
validElement = newElement("fullName", "Tim Shelburne")
|
78
|
+
invalidElement = newElement("fullName", "")
|
79
|
+
invalidElementTwo = newElement("fullName", null)
|
80
|
+
expect(-> constraint.handle(validElement)).not.toThrow()
|
81
|
+
expect(-> constraint.handle(invalidElement)).toThrow()
|
82
|
+
expect(-> constraint.handle(invalidElementTwo)).toThrow()
|
@@ -1,29 +1,45 @@
|
|
1
|
-
|
1
|
+
Form = require 'hoarder/form/form'
|
2
2
|
FormValidator = require "hoarder/validator/form_validator"
|
3
3
|
|
4
4
|
describe "FormValidator", ->
|
5
5
|
validator = null
|
6
|
-
|
6
|
+
form = cityElement = null
|
7
7
|
|
8
8
|
beforeEach ->
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
9
|
+
createTestFormFixture()
|
10
|
+
|
11
|
+
formElement = document.getElementById 'test-form'
|
12
|
+
cityElement = formElement['city']
|
13
|
+
|
14
|
+
form = new Form(formElement)
|
15
|
+
validator = FormValidator.create()
|
16
|
+
|
17
|
+
describe '#validateForm', ->
|
18
|
+
|
19
|
+
it "will return true if the form is valid", ->
|
20
|
+
expect(validator.validateForm form).toBeTruthy()
|
21
|
+
|
22
|
+
it "will return false if any part of the form is invalid", ->
|
23
|
+
cityElement.value = 5
|
24
|
+
expect(validator.validateForm form).toBeFalsy()
|
25
|
+
|
26
|
+
it "will mark the invalid elements with a validity message", ->
|
27
|
+
cityElement.value = 5
|
28
|
+
validator.validateForm form
|
29
|
+
expect(cityElement.validationMessage).toEqual "This field only accepts numbers and characters (0-9, A-Z, a-z)."
|
30
|
+
|
31
|
+
describe '#validateElement', ->
|
32
|
+
|
33
|
+
it "will return true if the element is valid", ->
|
34
|
+
expect(validator.validateElement cityElement).toBeTruthy()
|
35
|
+
|
36
|
+
describe "when the element is invalid", ->
|
37
|
+
|
38
|
+
it "will return false", ->
|
39
|
+
cityElement.value = 5
|
40
|
+
expect(validator.validateElement cityElement).toBeFalsy()
|
41
|
+
|
42
|
+
it "will mark the element with a validity message", ->
|
43
|
+
cityElement.value = 5
|
44
|
+
validator.validateElement cityElement
|
45
|
+
expect(cityElement.validationMessage).toEqual "This field only accepts numbers and characters (0-9, A-Z, a-z)."
|
@@ -0,0 +1,14 @@
|
|
1
|
+
ValidationRule = require 'hoarder/validator/rules/validation_rule'
|
2
|
+
|
3
|
+
describe 'ValidationRule', ->
|
4
|
+
|
5
|
+
describe '::fromString', ->
|
6
|
+
|
7
|
+
it "will build a rule with only a type", ->
|
8
|
+
rule = ValidationRule.fromString("email")
|
9
|
+
expect(rule.constructor).toEqual ValidationRule
|
10
|
+
|
11
|
+
it "will build a rule with context", ->
|
12
|
+
rule = ValidationRule.fromString("maxLength=5")
|
13
|
+
expect(rule.constructor).toEqual ValidationRule
|
14
|
+
expect(rule.context).toEqual "5"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hoarder-js
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-08-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jasmine
|
@@ -64,13 +64,15 @@ files:
|
|
64
64
|
- README.rdoc
|
65
65
|
- Rakefile
|
66
66
|
- assets/scripts/coffee/hoarder/form/form.coffee
|
67
|
-
- assets/scripts/coffee/hoarder/form/
|
67
|
+
- assets/scripts/coffee/hoarder/form/form_serializer.coffee
|
68
68
|
- assets/scripts/coffee/hoarder/form_manager.coffee
|
69
69
|
- assets/scripts/coffee/hoarder/submitter/form_submitter.coffee
|
70
|
+
- assets/scripts/coffee/hoarder/submitter/submitters/base_submitter.coffee
|
70
71
|
- assets/scripts/coffee/hoarder/submitter/submitters/polling_submitter.coffee
|
71
72
|
- assets/scripts/coffee/hoarder/submitter/submitters/simple_submitter.coffee
|
72
73
|
- assets/scripts/coffee/hoarder/validator/constraints/alpha_constraint.coffee
|
73
74
|
- assets/scripts/coffee/hoarder/validator/constraints/alphanumeric_constraint.coffee
|
75
|
+
- assets/scripts/coffee/hoarder/validator/constraints/base_constraint.coffee
|
74
76
|
- assets/scripts/coffee/hoarder/validator/constraints/credit_card_constraint.coffee
|
75
77
|
- assets/scripts/coffee/hoarder/validator/constraints/email_constraint.coffee
|
76
78
|
- assets/scripts/coffee/hoarder/validator/constraints/max_length_constraint.coffee
|
@@ -78,9 +80,12 @@ files:
|
|
78
80
|
- assets/scripts/coffee/hoarder/validator/constraints/numeric_constraint.coffee
|
79
81
|
- assets/scripts/coffee/hoarder/validator/constraints/phone_constraint.coffee
|
80
82
|
- assets/scripts/coffee/hoarder/validator/constraints/required_constraint.coffee
|
81
|
-
- assets/scripts/coffee/hoarder/validator/error/validation_error.coffee
|
82
83
|
- assets/scripts/coffee/hoarder/validator/form_validator.coffee
|
83
|
-
- assets/scripts/
|
84
|
+
- assets/scripts/coffee/hoarder/validator/rules/validation_rule.coffee
|
85
|
+
- assets/scripts/js/lib/bonzo.js
|
86
|
+
- assets/scripts/js/lib/qwery.js
|
87
|
+
- assets/scripts/js/lib/reqwest.js
|
88
|
+
- assets/scripts/js/patches/event_listeners.js
|
84
89
|
- bin/hoarder.js
|
85
90
|
- config/assets.rb
|
86
91
|
- lib/hoarder.rb
|
@@ -88,16 +93,22 @@ files:
|
|
88
93
|
- spec/jasmine.yml
|
89
94
|
- spec/runner.html
|
90
95
|
- spec/support/classes.coffee
|
96
|
+
- spec/support/fixtures.coffee
|
91
97
|
- spec/support/helpers.coffee
|
98
|
+
- spec/support/lib/jasmine-fixture.js
|
99
|
+
- spec/support/lib/jquery-1.7.1.min.js
|
92
100
|
- spec/support/mocks.coffee
|
93
101
|
- spec/support/objects.coffee
|
94
102
|
- spec/support/requirements.coffee
|
103
|
+
- spec/tests/form/form_serializer_spec.coffee
|
104
|
+
- spec/tests/form/form_spec.coffee
|
95
105
|
- spec/tests/form_manager_spec.coffee
|
96
106
|
- spec/tests/submitter/form_submitter_spec.coffee
|
97
107
|
- spec/tests/submitter/submitters/polling_submitter_spec.coffee
|
98
108
|
- spec/tests/submitter/submitters/simple_submitter_spec.coffee
|
99
109
|
- spec/tests/validator/constraints_spec.coffee
|
100
110
|
- spec/tests/validator/form_validator_spec.coffee
|
111
|
+
- spec/tests/validator/validation_rule_spec.coffee
|
101
112
|
- hoarder-js.gemspec
|
102
113
|
homepage: https://github.com/tshelburne/hoarder-js
|
103
114
|
licenses: []
|