err_supply 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/err_supply.gemspec CHANGED
@@ -13,11 +13,8 @@ Gem::Specification.new do |s|
13
13
  s.description = %q{Simple, beautiful error messages for Rails. Err_supply unpacks and rekeys the standard Rails error hash to make applying error messages to your views dead simple. Even better, because the library cures Rails' brain-damaged way of recording errors from nested resources/attributes, err_supply works with both simple and complex forms.}
14
14
 
15
15
  s.add_dependency "rails", ">= 3.0.0"
16
-
17
16
  s.add_development_dependency "rspec", ">= 2.0.0"
18
17
 
19
- s.rubyforge_project = "err_supply"
20
-
21
18
  s.files = `git ls-files`.split("\n")
22
19
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
23
20
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -1,8 +1,17 @@
1
+ //= require jquery.qtip
2
+
1
3
  /*
2
4
  ErrSupply jQuery Adapter
3
5
  Copyright (c) 2011 Coroutine LLC
4
6
  Licensed under the MIT license
5
7
  */
8
+ ErrSupply = {
9
+ arrow_color: "#c00",
10
+ background_color: "#c00",
11
+ border_color: "#c00",
12
+ text_color: "#c00"
13
+ };
14
+
6
15
  jQuery(function($) {
7
16
  $("form").live("err_supply:loaded", function(event, errors) {
8
17
 
@@ -68,14 +77,14 @@ jQuery(function($) {
68
77
  style: {
69
78
  border: {
70
79
  radius: 4,
71
- color: "#c00"
80
+ color: ErrSupply.border_color
72
81
  },
73
- background: "#c00",
74
- color: "#fff",
82
+ background: ErrSupply.background_color,
83
+ color: ErrSupply.text_color,
75
84
  width: 280,
76
85
  tip: {
77
86
  corner: position.tooltip,
78
- color: "#c00",
87
+ color: ErrSupply.arrow_color,
79
88
  size: {
80
89
  x: 10,
81
90
  y: 12
@@ -1,3 +1,3 @@
1
1
  module ErrSupply
2
- VERSION = "0.1.2"
2
+ VERSION = '0.1.3'
3
3
  end
data/lib/err_supply.rb CHANGED
@@ -1,3 +1,8 @@
1
- require "err_supply/view_helpers"
1
+ require 'err_supply/version'
2
+ require 'err_supply/view_helpers'
2
3
 
3
- ActionView::Base.module_eval { include ErrSupply::ViewHelpers } if defined? ActionView
4
+ module ErrSupply
5
+ class Engine < ::Rails::Engine
6
+ ActionView::Base.module_eval { include ErrSupply::ViewHelpers } if defined? ActionView
7
+ end
8
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: err_supply
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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-13 00:00:00.000000000 Z
13
+ date: 2012-12-19 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &70157305154580 !ruby/object:Gem::Requirement
17
+ requirement: &70333073230720 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 3.0.0
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70157305154580
25
+ version_requirements: *70333073230720
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rspec
28
- requirement: &70157305153260 !ruby/object:Gem::Requirement
28
+ requirement: &70333073229580 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,7 +33,7 @@ dependencies:
33
33
  version: 2.0.0
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *70157305153260
36
+ version_requirements: *70333073229580
37
37
  description: Simple, beautiful error messages for Rails. Err_supply unpacks and rekeys
38
38
  the standard Rails error hash to make applying error messages to your views dead
39
39
  simple. Even better, because the library cures Rails' brain-damaged way of recording
@@ -51,14 +51,11 @@ files:
51
51
  - README.md
52
52
  - Rakefile
53
53
  - err_supply.gemspec
54
- - init.rb
54
+ - lib/assets/javascripts/err_supply.js
55
55
  - lib/err_supply.rb
56
56
  - lib/err_supply/version.rb
57
57
  - lib/err_supply/view_helpers.rb
58
- - lib/generators/err_supply/install/USAGE
59
- - lib/generators/err_supply/install/install_generator.rb
60
- - lib/generators/err_supply/install/templates/err_supply.js
61
- - lib/generators/err_supply/install/templates/jquery.qtip-1.0.0-rc3.min.js
58
+ - vendor/javascripts/jquery.qtip.js
62
59
  homepage: http://github.com/coroutine/err_supply
63
60
  licenses: []
64
61
  post_install_message:
@@ -78,8 +75,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
75
  - !ruby/object:Gem::Version
79
76
  version: '0'
80
77
  requirements: []
81
- rubyforge_project: err_supply
82
- rubygems_version: 1.8.10
78
+ rubyforge_project:
79
+ rubygems_version: 1.8.15
83
80
  signing_key:
84
81
  specification_version: 3
85
82
  summary: Simple, beautiful error messages for Rails.
data/init.rb DELETED
@@ -1 +0,0 @@
1
- require "err_supply"
@@ -1,3 +0,0 @@
1
- Description:
2
- Copies two javascript files: (1) the default jquery error handler for err_supply,
3
- and (2) the jquery plugin qtip, which the default handler uses to make tooltips.
@@ -1,14 +0,0 @@
1
- module ErrSupply
2
- module Generators
3
-
4
- class InstallGenerator < Rails::Generators::Base
5
- source_root File.expand_path('../templates', __FILE__)
6
-
7
- def add_javascript_files
8
- copy_file "jquery.qtip-1.0.0-rc3.min.js", "public/javascripts/jquery.qtip-1.0.0-rc3.min.js"
9
- copy_file "err_supply.js", "public/javascripts/err_supply.js"
10
- end
11
- end
12
-
13
- end
14
- end