jquery-ui-rails 0.0.2 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of jquery-ui-rails might be problematic. Click here for more details.

Files changed (65) hide show
  1. data/License.txt +3 -0
  2. data/README.md +151 -113
  3. data/Rakefile +2 -3
  4. data/lib/jquery/ui/rails/version.rb +1 -1
  5. metadata +10 -69
  6. data/GPL-LICENSE.txt +0 -278
  7. data/MIT-LICENSE.txt +0 -20
  8. data/jquery-ui-rails.gemspec +0 -25
  9. data/testapp/Gemfile +0 -40
  10. data/testapp/Gemfile.lock +0 -119
  11. data/testapp/README.rdoc +0 -261
  12. data/testapp/Rakefile +0 -7
  13. data/testapp/app/assets/images/rails.png +0 -0
  14. data/testapp/app/assets/javascripts/application.js +0 -15
  15. data/testapp/app/assets/javascripts/home.js.coffee +0 -3
  16. data/testapp/app/assets/javascripts/jquery_ui_test.js +0 -5
  17. data/testapp/app/assets/stylesheets/application.css +0 -13
  18. data/testapp/app/assets/stylesheets/home.css.scss +0 -3
  19. data/testapp/app/assets/stylesheets/jquery_ui_test.css +0 -3
  20. data/testapp/app/controllers/application_controller.rb +0 -3
  21. data/testapp/app/controllers/home_controller.rb +0 -4
  22. data/testapp/app/helpers/application_helper.rb +0 -2
  23. data/testapp/app/helpers/home_helper.rb +0 -2
  24. data/testapp/app/mailers/.gitkeep +0 -0
  25. data/testapp/app/models/.gitkeep +0 -0
  26. data/testapp/app/views/home/index.html.erb +0 -4
  27. data/testapp/app/views/layouts/application.html.erb +0 -14
  28. data/testapp/config.ru +0 -4
  29. data/testapp/config/application.rb +0 -59
  30. data/testapp/config/boot.rb +0 -6
  31. data/testapp/config/database.yml +0 -25
  32. data/testapp/config/environment.rb +0 -5
  33. data/testapp/config/environments/development.rb +0 -37
  34. data/testapp/config/environments/production.rb +0 -67
  35. data/testapp/config/environments/test.rb +0 -37
  36. data/testapp/config/initializers/backtrace_silencers.rb +0 -7
  37. data/testapp/config/initializers/inflections.rb +0 -15
  38. data/testapp/config/initializers/mime_types.rb +0 -5
  39. data/testapp/config/initializers/secret_token.rb +0 -7
  40. data/testapp/config/initializers/session_store.rb +0 -8
  41. data/testapp/config/initializers/wrap_parameters.rb +0 -14
  42. data/testapp/config/locales/en.yml +0 -5
  43. data/testapp/config/routes.rb +0 -60
  44. data/testapp/db/seeds.rb +0 -7
  45. data/testapp/doc/README_FOR_APP +0 -2
  46. data/testapp/lib/assets/.gitkeep +0 -0
  47. data/testapp/lib/tasks/.gitkeep +0 -0
  48. data/testapp/log/.gitkeep +0 -0
  49. data/testapp/public/404.html +0 -26
  50. data/testapp/public/422.html +0 -26
  51. data/testapp/public/500.html +0 -25
  52. data/testapp/public/favicon.ico +0 -0
  53. data/testapp/public/robots.txt +0 -5
  54. data/testapp/script/rails +0 -6
  55. data/testapp/test/fixtures/.gitkeep +0 -0
  56. data/testapp/test/functional/.gitkeep +0 -0
  57. data/testapp/test/functional/home_controller_test.rb +0 -9
  58. data/testapp/test/integration/.gitkeep +0 -0
  59. data/testapp/test/performance/browsing_test.rb +0 -12
  60. data/testapp/test/test_helper.rb +0 -13
  61. data/testapp/test/unit/.gitkeep +0 -0
  62. data/testapp/test/unit/helpers/home_helper_test.rb +0 -4
  63. data/testapp/vendor/assets/javascripts/.gitkeep +0 -0
  64. data/testapp/vendor/assets/stylesheets/.gitkeep +0 -0
  65. data/testapp/vendor/plugins/.gitkeep +0 -0
@@ -0,0 +1,3 @@
1
+ jQuery UI as well as this gem are dual-licensed under the MIT license (see
2
+ jquery-ui/MIT-LICENSE.txt) and the GPL version 2 (see
3
+ jquery-ui/GPL-LICENSE.txt).
data/README.md CHANGED
@@ -14,31 +14,53 @@ In your Gemfile, add:
14
14
  gem 'jquery-ui-rails'
15
15
  end
16
16
 
17
- Then pick JavaScript and CSS modules to require, as listed bwlow.
17
+ ## Require Everything
18
18
 
19
- Dependencies between JavaScript modules and between CSS modules are
20
- automatically resolved, and the images required by the theme are available as
21
- assets. However, you may still need to include the corresponding CSS for any
22
- JavaScript.
19
+ To require all jQuery UI modules, add the following to your application.js:
23
20
 
24
- ### Example
21
+ ```javascript
22
+ //= require jquery.ui.all
23
+ ```
25
24
 
26
- Let's say you want to add a [date picker](http://jqueryui.com/themeroller/). In
27
- your application.js, simply require its JavaScript module:
25
+ Also add the jQuery UI CSS to your application.css:
28
26
 
29
- //= require jquery.ui.datepicker
27
+ ```css
28
+ /*
29
+ *= require jquery.ui.all
30
+ */
31
+ ```
30
32
 
31
- In your application.css, require the corresponding CSS module:
33
+ All images required by jQuery UI are automatically served through the asset
34
+ pipeline, so you are good to go! For example, this code will add a
35
+ [datepicker](http://jqueryui.com/demos/datepicker/):
36
+
37
+ ```javascript
38
+ $(function() {
39
+ $('.datepicker').datepicker();
40
+ });
41
+ ```
32
42
 
33
- /*
34
- *= require jquery.ui.datepicker
35
- */
43
+ ## Require Specific Modules
36
44
 
37
- And you are good to go:
45
+ The jQuery UI code weighs 51KB (minified + gzipped) and takes a while to
46
+ execute, so for production apps it's recommended to only include the modules
47
+ that your application actually uses. Dependencies are automatically resolved.
48
+ Simply pick one or more modules from the asset list below.
38
49
 
39
- $(function() {
40
- $('.datepicker').datepicker();
41
- });
50
+ For example, if you only need the datepicker module, add this to your
51
+ application.js:
52
+
53
+ ```javascript
54
+ //= require jquery.ui.datepicker
55
+ ```
56
+
57
+ In your application.css, require the corresponding CSS module:
58
+
59
+ ```css
60
+ /*
61
+ *= require jquery.ui.datepicker
62
+ */
63
+ ```
42
64
 
43
65
  ## JavaScript Assets
44
66
 
@@ -46,152 +68,168 @@ Pick and choose from the following modules:
46
68
 
47
69
  ### UI Core
48
70
 
49
- //= require jquery.ui.core
50
- //= require jquery.ui.widget
51
- //= require jquery.ui.mouse
52
- //= require jquery.ui.position
71
+ ```javascript
72
+ //= require jquery.ui.core
73
+ //= require jquery.ui.widget
74
+ //= require jquery.ui.mouse
75
+ //= require jquery.ui.position
76
+ ```
53
77
 
54
78
  You usually do not need to require these directly, as they are pulled in by the
55
79
  other JavaScript modules as needed.
56
80
 
57
81
  ### Interactions
58
82
 
59
- //= require jquery.ui.draggable
60
- //= require jquery.ui.droppable
61
- //= require jquery.ui.resizable
62
- //= require jquery.ui.selectable
63
- //= require jquery.ui.sortable
83
+ ```javascript
84
+ //= require jquery.ui.draggable
85
+ //= require jquery.ui.droppable
86
+ //= require jquery.ui.resizable
87
+ //= require jquery.ui.selectable
88
+ //= require jquery.ui.sortable
89
+ ```
64
90
 
65
91
  For `jquery.ui.resizable` and `jquery.ui.selectable`, remember to `require`
66
92
  their matching CSS files in your application.css as well.
67
93
 
68
94
  ### Widgets
69
95
 
70
- //= require jquery.ui.accordion
71
- //= require jquery.ui.autocomplete
72
- //= require jquery.ui.button
73
- //= require jquery.ui.dialog
74
- //= require jquery.ui.slider
75
- //= require jquery.ui.tabs
76
- //= require jquery.ui.datepicker
77
- //= require jquery.ui.progressbar
96
+ ```javascript
97
+ //= require jquery.ui.accordion
98
+ //= require jquery.ui.autocomplete
99
+ //= require jquery.ui.button
100
+ //= require jquery.ui.dialog
101
+ //= require jquery.ui.slider
102
+ //= require jquery.ui.tabs
103
+ //= require jquery.ui.datepicker
104
+ //= require jquery.ui.progressbar
105
+ ```
78
106
 
79
107
  For all of these, remember to `require` their matching CSS files in your
80
108
  application.css as well.
81
109
 
82
- Datepicker has optional i18n modules non-US locales, named
110
+ Datepicker has optional i18n modules for non-US locales, named
83
111
  `jquery.ui.datepicker-xx[-YY]`
84
112
  ([list](https://github.com/jquery/jquery-ui/tree/1.8.16/ui/i18n)), for example:
85
113
 
86
- //= require jquery.ui.datepicker-pt-BR
114
+ ```javascript
115
+ //= require jquery.ui.datepicker-pt-BR
116
+ ```
87
117
 
88
118
  ### Effects
89
119
 
90
- //= require jquery.effects.core
91
- //= require jquery.effects.blind
92
- //= require jquery.effects.bounce
93
- //= require jquery.effects.clip
94
- //= require jquery.effects.drop
95
- //= require jquery.effects.explode
96
- //= require jquery.effects.fade
97
- //= require jquery.effects.fold
98
- //= require jquery.effects.highlight
99
- //= require jquery.effects.pulsate
100
- //= require jquery.effects.scale
101
- //= require jquery.effects.shake
102
- //= require jquery.effects.slide
103
- //= require jquery.effects.transfer
104
-
105
- ### Everything
106
-
107
- When you are feeling lazy, you can also require all modules (UI and effects) at
108
- once:
109
-
110
- //= require jquery.ui.all
111
-
112
- This is only recommended for development, as it slows down the load and
113
- execution time. You should generally only require those modules that are
114
- actually used by your application.
120
+ ```javascript
121
+ //= require jquery.effects.core
122
+ //= require jquery.effects.blind
123
+ //= require jquery.effects.bounce
124
+ //= require jquery.effects.clip
125
+ //= require jquery.effects.drop
126
+ //= require jquery.effects.explode
127
+ //= require jquery.effects.fade
128
+ //= require jquery.effects.fold
129
+ //= require jquery.effects.highlight
130
+ //= require jquery.effects.pulsate
131
+ //= require jquery.effects.scale
132
+ //= require jquery.effects.shake
133
+ //= require jquery.effects.slide
134
+ //= require jquery.effects.transfer
135
+ ```
115
136
 
116
137
  ## Stylesheet Assets
117
138
 
118
139
  ### UI Core
119
140
 
120
- /*
121
- *= require jquery.ui.core
122
- *= require jquery.ui.theme
123
- */
141
+ ```css
142
+ /*
143
+ *= require jquery.ui.core
144
+ *= require jquery.ui.theme
145
+ */
146
+ ```
124
147
 
125
148
  You might want to require these if you do not use any of the following modules,
126
- but still want jQuery UI's basic theming CSS.
149
+ but still want jQuery UI's basic theming CSS. Otherwise they are automatically
150
+ pulled in as dependencies.
127
151
 
128
152
  ### Interactions
129
153
 
130
- /*
131
- *= require jquery.ui.resizable
132
- *= require jquery.ui.selectable
133
- */
154
+ ```css
155
+ /*
156
+ *= require jquery.ui.resizable
157
+ *= require jquery.ui.selectable
158
+ */
159
+ ```
134
160
 
135
161
  ### Widgets
136
162
 
137
- /*
138
- *= require jquery.ui.accordion
139
- *= require jquery.ui.autocomplete
140
- *= require jquery.ui.button
141
- *= require jquery.ui.dialog
142
- *= require jquery.ui.slider
143
- *= require jquery.ui.tabs
144
- *= require jquery.ui.datepicker
145
- *= require jquery.ui.progressbar
146
- */
163
+ ```css
164
+ /*
165
+ *= require jquery.ui.accordion
166
+ *= require jquery.ui.autocomplete
167
+ *= require jquery.ui.button
168
+ *= require jquery.ui.dialog
169
+ *= require jquery.ui.slider
170
+ *= require jquery.ui.tabs
171
+ *= require jquery.ui.datepicker
172
+ *= require jquery.ui.progressbar
173
+ */
174
+ ```
147
175
 
148
- ### Everything
176
+ ## Contributing
149
177
 
150
- As with the JavaScript, you can also require all CSS modules at once:
178
+ ### Bug Reports
151
179
 
152
- /*
153
- *= require jquery.ui.all
154
- */
180
+ For bugs in jQuery UI itself, head to the [jQuery UI Development
181
+ Center](http://jqueryui.com/development).
155
182
 
156
- ## Images
183
+ For bugs in this gem distribution, use the GitHub issue tracker. In particular,
184
+ the asset dependencies between files are set up by this gem, not by the jQuery
185
+ UI upstream. If you find that a JavaScript or CSS file does not pull in its
186
+ dependencies correctly, please open an issue!
157
187
 
158
- The images for the default theme are available as assets in the `jquery-ui`
159
- directory. You typically do not need to do anything about them, as they are
160
- automatically picked up by the `jquery.ui.theme` CSS file.
188
+ ### Setup
161
189
 
162
- ## Hacking and Contributing
190
+ ```bash
191
+ git clone git://github.com/joliss/jquery-ui-rails.git
192
+ cd jquery-ui-rails
193
+ git submodule update --init
194
+ bundle install
195
+ bundle exec rake
196
+ ```
163
197
 
164
- git clone git://github.com/joliss/jquery-ui-rails.git
165
- cd jquery-ui-rails
166
- git submodule update --init
167
- bundle install
168
- bundle exec rake # rebuild
198
+ Most of the code lives in the `Rakefile`. Pull requests are more than welcome!
169
199
 
170
- To hack jQuery UI:
200
+ ### Hacking jQuery UI
171
201
 
172
- cd jquery-ui
173
- git checkout master # or 1-8-stable
174
- ... hack-hack-hack ...
175
- cd ..
176
- bundle exec rake # rebuild assets based on your changes
202
+ The jquery-ui-rails repository has a git submodule containing the official
203
+ [jquery-ui repo](https://github.com/jquery/jquery-ui). This way it's easy to
204
+ hack the jQuery UI code:
205
+
206
+ ```bash
207
+ cd jquery-ui
208
+ git checkout master # or 1-8-stable
209
+ ... hack-hack-hack ...
210
+ bundle exec rake # rebuild assets based on your changes
211
+ ```
177
212
 
178
213
  Assuming your app's Gemfile points at your jquery-ui-rails checkout (`gem
179
214
  'jquery-ui-rails', :path => '~/path/to/jquery-ui-rails'`), all you need to do
180
215
  now is refresh your browser, and your changes to jQuery UI are live in your
181
- application.
216
+ Rails application.
182
217
 
183
- As a smoke test, a `testapp` application is available in the repository, which
184
- displays a checkmark and a date picker to make sure the assets load correctly:
218
+ You can send pull requests to the
219
+ [jquery-ui](https://github.com/jquery/jquery-ui) GitHub project straight out of
220
+ your submodule. See also their
221
+ [Getting Involved](http://wiki.jqueryui.com/w/page/35263114/Getting-Involved)
222
+ guide.
185
223
 
186
- cd testapp
187
- bundle install
188
- rails server
224
+ ### Testing
189
225
 
190
- Now load [http://localhost:3000/](http://localhost:3000/).
226
+ As a smoke test, a `testapp` application is available in the repository, which
227
+ displays a check mark and a datepicker to make sure the assets load correctly:
191
228
 
192
- ## License
229
+ ```bash
230
+ cd testapp
231
+ bundle install
232
+ rails server
233
+ ```
193
234
 
194
- jQuery UI is dual-licensed under the MIT License (jquery-ui/MIT-LICENSE.txt)
195
- and the GPL version 2 (jquery-ui/GPL-LICENSE.txt). This gem is dual-licensed
196
- under the MIT License (MIT-LICENSE.txt) and the GPL version 2 (GPL-LICENSE.txt)
197
- as well.
235
+ Now point your browser at [http://localhost:3000/](http://localhost:3000/).
data/Rakefile CHANGED
@@ -29,7 +29,6 @@ end
29
29
  desc "Remove the vendor directory"
30
30
  task :clean do
31
31
  FileUtils.rm_rf 'vendor'
32
- # We could do rm(Dir.glob('vendor/**/*.*') - `git ls-files vendor`.split("\n"))
33
32
  end
34
33
 
35
34
  desc "Generate the JavaScript assets"
@@ -70,9 +69,9 @@ task :stylesheets do
70
69
  unless basename =~ /\.(all|base|core|theme)\./
71
70
  dependencies = DEPENDENCY_HASH[basename.sub(/\Ajquery\./, '').sub(/\.css/, '.js')]
72
71
  if dependencies.nil?
73
- puts "Warning: No matching JavaScript dependencies found for #{basename}"
72
+ puts "Warning: No matching JavaScript dependencies found for #{basename}"
74
73
  else
75
- extra_dependencies << 'jquery.ui.theme' if dependencies.include? 'theme'
74
+ extra_dependencies << 'jquery.ui.theme' if dependencies.include? 'theme'
76
75
  end
77
76
  end
78
77
  extra_dependencies.reverse.each do |dep|
@@ -1,7 +1,7 @@
1
1
  module Jquery
2
2
  module Ui
3
3
  module Rails
4
- VERSION = "0.0.2"
4
+ VERSION = "0.1.0"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-ui-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.1.0
5
5
  prerelease:
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-02-17 00:00:00.000000000 Z
12
+ date: 2012-02-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
16
- requirement: &17710540 !ruby/object:Gem::Requirement
16
+ requirement: &20629080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *17710540
24
+ version_requirements: *20629080
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: jquery-rails
27
- requirement: &17710140 !ruby/object:Gem::Requirement
27
+ requirement: &20628700 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *17710140
35
+ version_requirements: *20628700
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: execjs
38
- requirement: &17709580 !ruby/object:Gem::Requirement
38
+ requirement: &20628160 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,8 +43,8 @@ dependencies:
43
43
  version: '1.0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *17709580
47
- description: jQuery UI JavaScript, CSS, and image files packaged for the Rails 3.1+
46
+ version_requirements: *20628160
47
+ description: jQuery UI's JavaScript, CSS, and image files packaged for the Rails 3.1+
48
48
  asset pipeline
49
49
  email:
50
50
  - joliss42@gmail.com
@@ -53,74 +53,15 @@ extensions: []
53
53
  extra_rdoc_files: []
54
54
  files:
55
55
  - .gitmodules
56
- - GPL-LICENSE.txt
57
56
  - Gemfile
58
- - MIT-LICENSE.txt
57
+ - License.txt
59
58
  - README.md
60
59
  - Rakefile
61
60
  - dependencies.js
62
- - jquery-ui-rails.gemspec
63
61
  - lib/jquery-ui-rails.rb
64
62
  - lib/jquery/ui/rails.rb
65
63
  - lib/jquery/ui/rails/engine.rb
66
64
  - lib/jquery/ui/rails/version.rb
67
- - testapp/Gemfile
68
- - testapp/Gemfile.lock
69
- - testapp/README.rdoc
70
- - testapp/Rakefile
71
- - testapp/app/assets/images/rails.png
72
- - testapp/app/assets/javascripts/application.js
73
- - testapp/app/assets/javascripts/home.js.coffee
74
- - testapp/app/assets/javascripts/jquery_ui_test.js
75
- - testapp/app/assets/stylesheets/application.css
76
- - testapp/app/assets/stylesheets/home.css.scss
77
- - testapp/app/assets/stylesheets/jquery_ui_test.css
78
- - testapp/app/controllers/application_controller.rb
79
- - testapp/app/controllers/home_controller.rb
80
- - testapp/app/helpers/application_helper.rb
81
- - testapp/app/helpers/home_helper.rb
82
- - testapp/app/mailers/.gitkeep
83
- - testapp/app/models/.gitkeep
84
- - testapp/app/views/home/index.html.erb
85
- - testapp/app/views/layouts/application.html.erb
86
- - testapp/config.ru
87
- - testapp/config/application.rb
88
- - testapp/config/boot.rb
89
- - testapp/config/database.yml
90
- - testapp/config/environment.rb
91
- - testapp/config/environments/development.rb
92
- - testapp/config/environments/production.rb
93
- - testapp/config/environments/test.rb
94
- - testapp/config/initializers/backtrace_silencers.rb
95
- - testapp/config/initializers/inflections.rb
96
- - testapp/config/initializers/mime_types.rb
97
- - testapp/config/initializers/secret_token.rb
98
- - testapp/config/initializers/session_store.rb
99
- - testapp/config/initializers/wrap_parameters.rb
100
- - testapp/config/locales/en.yml
101
- - testapp/config/routes.rb
102
- - testapp/db/seeds.rb
103
- - testapp/doc/README_FOR_APP
104
- - testapp/lib/assets/.gitkeep
105
- - testapp/lib/tasks/.gitkeep
106
- - testapp/log/.gitkeep
107
- - testapp/public/404.html
108
- - testapp/public/422.html
109
- - testapp/public/500.html
110
- - testapp/public/favicon.ico
111
- - testapp/public/robots.txt
112
- - testapp/script/rails
113
- - testapp/test/fixtures/.gitkeep
114
- - testapp/test/functional/.gitkeep
115
- - testapp/test/functional/home_controller_test.rb
116
- - testapp/test/integration/.gitkeep
117
- - testapp/test/performance/browsing_test.rb
118
- - testapp/test/test_helper.rb
119
- - testapp/test/unit/.gitkeep
120
- - testapp/test/unit/helpers/home_helper_test.rb
121
- - testapp/vendor/assets/javascripts/.gitkeep
122
- - testapp/vendor/assets/stylesheets/.gitkeep
123
- - testapp/vendor/plugins/.gitkeep
124
65
  - vendor/assets/javascripts/jquery.ui.core.js
125
66
  - vendor/assets/javascripts/jquery.ui.datepicker-et.js
126
67
  - vendor/assets/javascripts/jquery.ui.datepicker-uk.js