javascript_util_asset_pack 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module JavascriptUtilAssetPack
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -5,6 +5,8 @@ jQuery(document).ajaxError (event, xhr, settings, exception) ->
5
5
 
6
6
  if xhr.status is 404
7
7
  friendly = "#{friendly}Page not found"
8
+ else if xhr.status is 401
9
+ friendly = "#{friendly}Access Denied"
8
10
  else if xhr.status is 422
9
11
  friendly = "Your submission has one or more errors. \n\nPlease correct the following issues: \n"
10
12
  validationErrors = jQuery.parseJSON(xhr.responseText)
@@ -18,7 +20,7 @@ jQuery(document).ajaxError (event, xhr, settings, exception) ->
18
20
 
19
21
  if window.Rails?.env is "DEVELOPMENT"
20
22
  contentType = xhr.getResponseHeader("content-type")
21
- if contentType.indexOf('html') > -1
23
+ if contentType?.indexOf('html') > -1
22
24
  body = "<div>#{xhr.responseText}</div>"
23
25
  fragment = $(body).find "h1"
24
26
  local = "#{local} \n#{fragment.text()}"
metadata CHANGED
@@ -1,61 +1,113 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: javascript_util_asset_pack
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.8
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 9
9
+ version: 0.0.9
6
10
  platform: ruby
7
- authors:
11
+ authors:
8
12
  - Jesse House
9
13
  autorequire:
10
14
  bindir: bin
11
15
  cert_chain: []
12
- date: 2012-02-07 00:00:00.000000000Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
16
+
17
+ date: 2012-03-01 00:00:00 -08:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
15
21
  name: rails
16
- requirement: &70152683429160 !ruby/object:Gem::Requirement
17
- none: false
18
- requirements:
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
19
25
  - - ~>
20
- - !ruby/object:Gem::Version
21
- version: '3.1'
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 3
29
+ - 1
30
+ version: "3.1"
22
31
  type: :runtime
23
- prerelease: false
24
- version_requirements: *70152683429160
25
- - !ruby/object:Gem::Dependency
32
+ version_requirements: *id001
33
+ - !ruby/object:Gem::Dependency
26
34
  name: javascript_safe_logger
27
- requirement: &70152683427580 !ruby/object:Gem::Requirement
28
- none: false
29
- requirements:
35
+ prerelease: false
36
+ requirement: &id002 !ruby/object:Gem::Requirement
37
+ requirements:
30
38
  - - ~>
31
- - !ruby/object:Gem::Version
39
+ - !ruby/object:Gem::Version
40
+ segments:
41
+ - 0
42
+ - 0
43
+ - 4
32
44
  version: 0.0.4
33
45
  type: :runtime
34
- prerelease: false
35
- version_requirements: *70152683427580
36
- description: ! "== Rails 3.1 javascript - Util asset pack\n\n== Sets up a window.Util
37
- object which includes\n\n* Spinner, with methods to set spinner next to element
38
- or hide the spinner\n* AjaxForm, to ajax enable simple forms\n* jQuery ajaxError
39
- global handler, exception data during development and friendly message in production\n\n==
40
- Usage\n\nspinner (js version)\n\n window.Util.spinner.nextTo('#my_button'); \n
41
- \ window.Util.spinner.nextTo('#my_button', 3, 4); // selector, top offset, left
42
- offset\n window.Util.spinner.hide();\n \najax form (coffee script version)\n\n
43
- \ jQuery ->\n new window.Util.AjaxForm '#my_form', -> \n log
44
- \"my_form submit success callback\"\n\n== Install\n\nUpdate the Gemfile in your
45
- rails project, add the following line\n\n gem 'javascript_util_asset_pack'\n\nRun
46
- the generator\n\n rails generate javascript_util_asset_pack\n \ndoes the following:\n\n*
47
- Copy spinner.gif to /app/assets/images\n* Update application.html.erb adding javascript
48
- create window.Rails.env variable\n* Update application.html.erb adding image_tag
49
- for spinner.gif\n* Update application.js adding util_pack\n\n== Coming Soon\n\n*
50
- configuration object \n * text in ajaxError overrides\n * spinner id override\n\n==
51
- Resources\n\n* spinner.gif generated using http://www.ajaxload.info\n\n== License\n\nThe
52
- Unlicense (aka: public domain)\nhttp://unlicense.org\n\n"
53
- email:
46
+ version_requirements: *id002
47
+ description: |+
48
+ == Rails 3.1 javascript - Util asset pack
49
+
50
+ == Sets up a window.Util object which includes
51
+
52
+ * Spinner, with methods to set spinner next to element or hide the spinner
53
+ * AjaxForm, to ajax enable simple forms
54
+ * jQuery ajaxError global handler, exception data during development and friendly message in production
55
+
56
+ == Usage
57
+
58
+ spinner (js version)
59
+
60
+ window.Util.spinner.nextTo('#my_button');
61
+ window.Util.spinner.nextTo('#my_button', 3, 4); // selector, top offset, left offset
62
+ window.Util.spinner.hide();
63
+
64
+ ajax form (coffee script version)
65
+
66
+ jQuery ->
67
+ new window.Util.AjaxForm '#my_form', ->
68
+ log "my_form submit success callback"
69
+
70
+ == Install
71
+
72
+ Update the Gemfile in your rails project, add the following line
73
+
74
+ gem 'javascript_util_asset_pack'
75
+
76
+ Run the generator
77
+
78
+ rails generate javascript_util_asset_pack
79
+
80
+ does the following:
81
+
82
+ * Copy spinner.gif to /app/assets/images
83
+ * Update application.html.erb adding javascript create window.Rails.env variable
84
+ * Update application.html.erb adding image_tag for spinner.gif
85
+ * Update application.js adding util_pack
86
+
87
+ == Coming Soon
88
+
89
+ * configuration object
90
+ * text in ajaxError overrides
91
+ * spinner id override
92
+
93
+ == Resources
94
+
95
+ * spinner.gif generated using http://www.ajaxload.info
96
+
97
+ == License
98
+
99
+ The Unlicense (aka: public domain)
100
+ http://unlicense.org
101
+
102
+ email:
54
103
  - jesse.house@gmail.com
55
104
  executables: []
105
+
56
106
  extensions: []
107
+
57
108
  extra_rdoc_files: []
58
- files:
109
+
110
+ files:
59
111
  - .gitignore
60
112
  - Gemfile
61
113
  - README.rdoc
@@ -71,29 +123,35 @@ files:
71
123
  - vendor/assets/javascripts/util_pack/index.js
72
124
  - vendor/assets/javascripts/util_pack/jquery_ajax_error.coffee
73
125
  - vendor/assets/javascripts/util_pack/spinner.coffee
126
+ has_rdoc: true
74
127
  homepage: https://github.com/house9/javascript_util_asset_pack
75
128
  licenses: []
129
+
76
130
  post_install_message:
77
131
  rdoc_options: []
78
- require_paths:
132
+
133
+ require_paths:
79
134
  - lib
80
- required_ruby_version: !ruby/object:Gem::Requirement
81
- none: false
82
- requirements:
83
- - - ! '>='
84
- - !ruby/object:Gem::Version
85
- version: '0'
86
- required_rubygems_version: !ruby/object:Gem::Requirement
87
- none: false
88
- requirements:
89
- - - ! '>='
90
- - !ruby/object:Gem::Version
91
- version: '0'
135
+ required_ruby_version: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ segments:
140
+ - 0
141
+ version: "0"
142
+ required_rubygems_version: !ruby/object:Gem::Requirement
143
+ requirements:
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ segments:
147
+ - 0
148
+ version: "0"
92
149
  requirements: []
150
+
93
151
  rubyforge_project: javascript_util_asset_pack
94
- rubygems_version: 1.8.10
152
+ rubygems_version: 1.3.6
95
153
  signing_key:
96
154
  specification_version: 3
97
- summary: Rails 3.1 javascript Util asset pack, show hide spinner, global jquery error
98
- handler, etc...
155
+ summary: Rails 3.1 javascript Util asset pack, show hide spinner, global jquery error handler, etc...
99
156
  test_files: []
157
+