client_side_validations-formtastic 2.0.0.beta.2 → 2.0.0.beta.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -16,12 +16,13 @@ Gem::Specification.new do |gem|
16
16
  gem.add_dependency 'client_side_validations', '~> 3.2.0.beta.1'
17
17
  gem.add_dependency 'formtastic', '~> 2.0.0'
18
18
 
19
- gem.add_development_dependency 'actionpack', '~> 3.2.0'
20
- gem.add_development_dependency 'railties', '~> 3.2.0'
19
+ gem.add_development_dependency 'rails', '~> 3.2.0'
20
+ gem.add_development_dependency 'mocha'
21
21
 
22
22
  # For QUnit testing
23
23
  gem.add_development_dependency 'sinatra', '~> 1.0'
24
24
  gem.add_development_dependency 'shotgun'
25
25
  gem.add_development_dependency 'thin'
26
26
  gem.add_development_dependency 'json'
27
+ gem.add_development_dependency 'coffee-script'
27
28
  end
@@ -1,5 +1,5 @@
1
1
  module ClientSideValidations
2
2
  module Formtastic
3
- VERSION = '2.0.0.beta.2'
3
+ VERSION = '2.0.0.beta.3'
4
4
  end
5
5
  end
@@ -0,0 +1,15 @@
1
+ module ClientSideValidations
2
+ module Generators
3
+ class SimpleForm
4
+ def self.assets
5
+ [{
6
+ :path => File.expand_path('../../../../vendor/assets/javascripts', __FILE__),
7
+ :file => 'rails.validations.formtastic.js'
8
+ }]
9
+ end
10
+
11
+ Generators.register_assets(self)
12
+ end
13
+ end
14
+ end
15
+
@@ -1 +1,7 @@
1
+ require 'client_side_validations'
1
2
  require 'client_side_validations/formtastic'
3
+
4
+ if defined?(::Rails)
5
+ require 'client_side_validations/generators/formtastic'
6
+ end
7
+
@@ -1,28 +1,37 @@
1
- /*!
2
- * Client Side Validations - Formtastic - v2.0.0.beta.2
3
- * https://github.com/dockyard/client_side_validations-formtastic
4
- *
5
- * Copyright (c) 2012 DockYard, LLC
6
- * Licensed under the MIT license
7
- * http://www.opensource.org/licenses/mit-license.php
8
- */
9
1
 
10
- ClientSideValidations.formBuilders['Formtastic::FormBuilder'] = {
11
- add: function(element, settings, message) {
12
- if (element.data('valid') !== false) {
13
- var wrapper = element.closest('li');
14
- wrapper.addClass('error');
15
- var errorElement = $('<p class="' + settings.inline_error_class + '">' + message + '</p>');
16
- wrapper.append(errorElement);
17
- } else {
18
- element.parent().find('p.' + settings.inline_error_class).text(message);
2
+ /*
3
+ Client Side Validations - Formtastic - v2.0.0.beta.3
4
+ https://github.com/dockyard/client_side_validations-formtastic
5
+
6
+ Copyright (c) 2012 DockYard, LLC
7
+ Licensed under the MIT license
8
+ http://www.opensource.org/licenses/mit-license.php
9
+ */
10
+
11
+ (function() {
12
+
13
+ ClientSideValidations.formBuilders['Formtastic::FormBuilder'] = {
14
+ add: function(element, settings, message) {
15
+ var errorElement, wrapper;
16
+ if (element.data('valid') !== false) {
17
+ wrapper = element.closest('li');
18
+ errorElement = $('<p/>', {
19
+ "class": settings.inline_error_class,
20
+ text: message
21
+ });
22
+ wrapper.addClass('error');
23
+ return wrapper.append(errorElement);
24
+ } else {
25
+ return element.parent().find("p." + settings.inline_error_class).text(message);
26
+ }
27
+ },
28
+ remove: function(element, settings) {
29
+ var errorElement, wrapper;
30
+ wrapper = element.closest('li.error');
31
+ errorElement = wrapper.find("p." + settings.inline_error_class);
32
+ wrapper.removeClass('error');
33
+ return errorElement.remove();
19
34
  }
20
- },
21
- remove: function(element, settings) {
22
- var wrapper = element.closest('li.error');
23
- wrapper.removeClass('error');
24
- var errorElement = wrapper.find('p.' + settings.inline_error_class);
25
- errorElement.remove();
26
- }
27
- }
35
+ };
28
36
 
37
+ }).call(this);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: client_side_validations-formtastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0.beta.2
4
+ version: 2.0.0.beta.3
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-22 00:00:00.000000000Z
12
+ date: 2012-01-25 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: client_side_validations
16
- requirement: &70155695090780 !ruby/object:Gem::Requirement
16
+ requirement: &70277720387380 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.2.0.beta.1
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70155695090780
24
+ version_requirements: *70277720387380
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: formtastic
27
- requirement: &70155695088300 !ruby/object:Gem::Requirement
27
+ requirement: &70277720386380 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 2.0.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70155695088300
35
+ version_requirements: *70277720386380
36
36
  - !ruby/object:Gem::Dependency
37
- name: actionpack
38
- requirement: &70155695086840 !ruby/object:Gem::Requirement
37
+ name: rails
38
+ requirement: &70277720385360 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,21 +43,21 @@ dependencies:
43
43
  version: 3.2.0
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70155695086840
46
+ version_requirements: *70277720385360
47
47
  - !ruby/object:Gem::Dependency
48
- name: railties
49
- requirement: &70155695084080 !ruby/object:Gem::Requirement
48
+ name: mocha
49
+ requirement: &70277720384600 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
- - - ~>
52
+ - - ! '>='
53
53
  - !ruby/object:Gem::Version
54
- version: 3.2.0
54
+ version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70155695084080
57
+ version_requirements: *70277720384600
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: sinatra
60
- requirement: &70155695082100 !ruby/object:Gem::Requirement
60
+ requirement: &70277720383880 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '1.0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70155695082100
68
+ version_requirements: *70277720383880
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: shotgun
71
- requirement: &70155695079220 !ruby/object:Gem::Requirement
71
+ requirement: &70277720383440 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70155695079220
79
+ version_requirements: *70277720383440
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: thin
82
- requirement: &70155695073920 !ruby/object:Gem::Requirement
82
+ requirement: &70277720382920 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,21 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70155695073920
90
+ version_requirements: *70277720382920
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: json
93
- requirement: &70155695071600 !ruby/object:Gem::Requirement
93
+ requirement: &70277720382400 !ruby/object:Gem::Requirement
94
+ none: false
95
+ requirements:
96
+ - - ! '>='
97
+ - !ruby/object:Gem::Version
98
+ version: '0'
99
+ type: :development
100
+ prerelease: false
101
+ version_requirements: *70277720382400
102
+ - !ruby/object:Gem::Dependency
103
+ name: coffee-script
104
+ requirement: &70277720381840 !ruby/object:Gem::Requirement
94
105
  none: false
95
106
  requirements:
96
107
  - - ! '>='
@@ -98,7 +109,7 @@ dependencies:
98
109
  version: '0'
99
110
  type: :development
100
111
  prerelease: false
101
- version_requirements: *70155695071600
112
+ version_requirements: *70277720381840
102
113
  description: Formtastic Plugin for ClientSideValidaitons
103
114
  email:
104
115
  - bcardarella@gmail.com
@@ -114,6 +125,7 @@ files:
114
125
  - lib/client_side_validations/formtastic/helpers.rb
115
126
  - lib/client_side_validations/formtastic/helpers/input_helper.rb
116
127
  - lib/client_side_validations/formtastic/version.rb
128
+ - lib/client_side_validations/generators/formtastic.rb
117
129
  - vendor/assets/javascripts/rails.validations.formtastic.js
118
130
  homepage: https://github.com/dockyard/client_side_validations-formtastic
119
131
  licenses: []