styx 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,4 @@
1
+ rvm:
2
+ - 1.9.3
3
+ - jruby-19mode
4
+ script: "bundle exec rake spec"
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- styx (0.1.0)
4
+ styx (0.1.1)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ The MIT License
2
+
3
+ Copyright (c) 2012 Round Lake, inc.,
4
+ Peter Zotov <whitequark@whitequark.org>.
5
+
6
+ Permission is hereby granted, free of charge, to any person obtaining a copy
7
+ of this software and associated documentation files (the "Software"), to deal
8
+ in the Software without restriction, including without limitation the rights
9
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10
+ copies of the Software, and to permit persons to whom the Software is
11
+ furnished to do so, subject to the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be included in
14
+ all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22
+ THE SOFTWARE.
data/README.md CHANGED
@@ -7,6 +7,8 @@ Bridge between Server (Rails) side and Client (JS) side which is divided into se
7
7
  * **Initializer**: organizes JS into bootstrap classes and allows you to pass data from controller/view.
8
8
  * **Forms**: remote validation engine.
9
9
 
10
+ ![Travis CI](https://secure.travis-ci.org/roundlake/styx.png)
11
+
10
12
 
11
13
  Installation
12
14
  ------------
@@ -108,14 +110,14 @@ If validation failed appropriate form fields will be wrapped in a native way:
108
110
 
109
111
  ```javascript
110
112
  // Light case
111
- Forms.attach('#foo_form')
113
+ Joosy.Forms.validate('#foo_form')
112
114
 
113
115
 
114
116
  // Heavy case
115
117
  success_callback = function(data) {} // Form validated and stored. Data is what you pass from server.
116
118
  error_callback = function() {} // Form wasn't validated
117
119
 
118
- Forms.attach('#foo_form', success_callback, error_callback)
120
+ Joosy.Forms.validate('#foo_form', success_callback, error_callback)
119
121
  ```
120
122
 
121
123
  Note that if success_callback was not given but server responded with some data, **Styx.Forms** will try
@@ -163,26 +165,15 @@ You can use two helpers to work without models (i.e. to serve login form):
163
165
  JS part will concatenate *entity_name* + *field_name* to locate which fields have to be marked as invalid.
164
166
  So if you don't have entity, simply pass empty string as the first arg.
165
167
 
166
- License
168
+ Credits
169
+ -------
170
+
171
+ <img src="http://roundlake.ru/assets/logo.png" align="right" />
172
+
173
+ * Boris Staal ([@_inossidabile](http://twitter.com/#!/_inossidabile))
174
+ * Alexander Pavlenko ([@alerticus](http://twitter.com/#!/alerticus))
175
+
176
+ LICENSE
167
177
  -------
168
178
 
169
- Copyright (C) 2011 by Boris Staal <boris@roundlake.ru>
170
- Alexander Pavlenko <a.pavlenko@roundlake.ru>
171
-
172
- Permission is hereby granted, free of charge, to any person obtaining a copy
173
- of this software and associated documentation files (the "Software"), to deal
174
- in the Software without restriction, including without limitation the rights
175
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
176
- copies of the Software, and to permit persons to whom the Software is
177
- furnished to do so, subject to the following conditions:
178
-
179
- The above copyright notice and this permission notice shall be included in
180
- all copies or substantial portions of the Software.
181
-
182
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
183
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
184
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
185
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
186
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
187
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
188
- THE SOFTWARE.
179
+ It is free software, and may be redistributed under the terms of MIT license.
@@ -14,8 +14,6 @@
14
14
 
15
15
  errors = jQuery.parseJSON xhr.responseText
16
16
 
17
- console.log errors if console?
18
-
19
17
  for field, notifications of errors.messages
20
18
  field = substitutions[field] if substitutions[field]?
21
19
  input = $(element).find("##{errors.entity}_#{field}")
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "styx"
3
- s.version = "0.1.1"
3
+ s.version = "0.1.2"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.summary = "Set of helpers to maintain bridge between Server (Rails) side and Client (JS) side"
6
6
  s.email = "boris@roundlake.ru"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: styx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-01-21 00:00:00.000000000 Z
13
+ date: 2012-06-04 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: combustion
17
- requirement: &70311668649520 !ruby/object:Gem::Requirement
17
+ requirement: &70357844857160 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 0.3.1
23
23
  type: :development
24
24
  prerelease: false
25
- version_requirements: *70311668649520
25
+ version_requirements: *70357844857160
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rspec-rails
28
- requirement: &70311668649040 !ruby/object:Gem::Requirement
28
+ requirement: &70357844856680 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 2.8.1
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *70311668649040
36
+ version_requirements: *70357844856680
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: capybara
39
- requirement: &70311685239200 !ruby/object:Gem::Requirement
39
+ requirement: &70357844856220 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: 1.1.2
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *70311685239200
47
+ version_requirements: *70357844856220
48
48
  description: Set of helpers to maintain bridge between Server (Rails) side and Client
49
49
  (JS) side
50
50
  email: boris@roundlake.ru
@@ -53,8 +53,10 @@ extensions: []
53
53
  extra_rdoc_files: []
54
54
  files:
55
55
  - .gitignore
56
+ - .travis.yml
56
57
  - Gemfile
57
58
  - Gemfile.lock
59
+ - LICENSE
58
60
  - README.md
59
61
  - Rakefile
60
62
  - app/assets/javascripts/styx.forms.js.coffee