Skip to content

Commit b36a80e

Browse files
committed
Merge pull request tors#15 from donapieppo/master
compatible with jquery-fileupload-rails 0.4.1 and rails 3.2.13
2 parents b0b9934 + 292135f commit b36a80e

File tree

6 files changed

+95
-84
lines changed

6 files changed

+95
-84
lines changed

Gemfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
source 'https://rubygems.org'
22

3-
gem 'rails', '3.2.6'
3+
gem 'rails', '3.2.13'
44

55
# Bundle edge Rails instead:
66
# gem 'rails', :git => 'git://github.com/rails/rails.git'
@@ -11,10 +11,11 @@ gem 'sqlite3'
1111
# in production environments by default.
1212
group :assets do
1313
gem 'sass-rails', '~> 3.2.3'
14+
gem 'less-rails'
1415
gem 'coffee-rails', '~> 3.2.1'
1516

1617
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
17-
# gem 'therubyracer', :platforms => :ruby
18+
gem 'therubyracer', :platforms => :ruby
1819

1920
gem 'uglifier', '>= 1.0.3'
2021
end

Gemfile.lock

Lines changed: 76 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,127 +1,132 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actionmailer (3.2.6)
5-
actionpack (= 3.2.6)
6-
mail (~> 2.4.4)
7-
actionpack (3.2.6)
8-
activemodel (= 3.2.6)
9-
activesupport (= 3.2.6)
4+
actionmailer (3.2.13)
5+
actionpack (= 3.2.13)
6+
mail (~> 2.5.3)
7+
actionpack (3.2.13)
8+
activemodel (= 3.2.13)
9+
activesupport (= 3.2.13)
1010
builder (~> 3.0.0)
1111
erubis (~> 2.7.0)
12-
journey (~> 1.0.1)
13-
rack (~> 1.4.0)
12+
journey (~> 1.0.4)
13+
rack (~> 1.4.5)
1414
rack-cache (~> 1.2)
1515
rack-test (~> 0.6.1)
16-
sprockets (~> 2.1.3)
17-
activemodel (3.2.6)
18-
activesupport (= 3.2.6)
16+
sprockets (~> 2.2.1)
17+
activemodel (3.2.13)
18+
activesupport (= 3.2.13)
1919
builder (~> 3.0.0)
20-
activerecord (3.2.6)
21-
activemodel (= 3.2.6)
22-
activesupport (= 3.2.6)
20+
activerecord (3.2.13)
21+
activemodel (= 3.2.13)
22+
activesupport (= 3.2.13)
2323
arel (~> 3.0.2)
2424
tzinfo (~> 0.3.29)
25-
activeresource (3.2.6)
26-
activemodel (= 3.2.6)
27-
activesupport (= 3.2.6)
28-
activesupport (3.2.6)
29-
i18n (~> 0.6)
25+
activeresource (3.2.13)
26+
activemodel (= 3.2.13)
27+
activesupport (= 3.2.13)
28+
activesupport (3.2.13)
29+
i18n (= 0.6.1)
3030
multi_json (~> 1.0)
3131
arel (3.0.2)
32-
builder (3.0.0)
33-
cocaine (0.2.1)
32+
builder (3.0.4)
33+
climate_control (0.0.3)
34+
activesupport (>= 3.0)
35+
cocaine (0.5.1)
36+
climate_control (>= 0.0.3, < 1.0)
3437
coffee-rails (3.2.2)
3538
coffee-script (>= 2.2.0)
3639
railties (~> 3.2.0)
3740
coffee-script (2.2.0)
3841
coffee-script-source
3942
execjs
40-
coffee-script-source (1.3.3)
43+
coffee-script-source (1.6.2)
4144
commonjs (0.2.6)
4245
erubis (2.7.0)
4346
execjs (1.4.0)
4447
multi_json (~> 1.0)
45-
hike (1.2.1)
46-
i18n (0.6.0)
48+
hike (1.2.2)
49+
i18n (0.6.1)
4750
journey (1.0.4)
48-
jquery-fileupload-rails (0.3.0)
51+
jquery-fileupload-rails (0.4.1)
4952
actionpack (>= 3.1)
5053
railties (>= 3.1)
51-
jquery-rails (2.0.2)
52-
railties (>= 3.2.0, < 5.0)
53-
thor (~> 0.14)
54-
json (1.7.4)
55-
less (2.2.1)
54+
jquery-rails (2.2.1)
55+
railties (>= 3.0, < 5.0)
56+
thor (>= 0.14, < 2.0)
57+
json (1.7.7)
58+
less (2.3.2)
5659
commonjs (~> 0.2.6)
57-
less-rails (2.2.3)
60+
less-rails (2.3.3)
5861
actionpack (>= 3.1)
59-
less (~> 2.2.0)
60-
libv8 (3.3.10.4)
61-
mail (2.4.4)
62+
less (~> 2.3.1)
63+
libv8 (3.11.8.17)
64+
mail (2.5.3)
6265
i18n (>= 0.4.0)
6366
mime-types (~> 1.16)
6467
treetop (~> 1.4.8)
65-
mime-types (1.19)
66-
multi_json (1.3.6)
67-
paperclip (3.1.4)
68+
mime-types (1.22)
69+
multi_json (1.7.2)
70+
paperclip (3.4.1)
6871
activemodel (>= 3.0.0)
6972
activerecord (>= 3.0.0)
7073
activesupport (>= 3.0.0)
71-
cocaine (>= 0.0.2)
74+
cocaine (~> 0.5.0)
7275
mime-types
7376
polyglot (0.3.3)
74-
rack (1.4.1)
77+
rack (1.4.5)
7578
rack-cache (1.2)
7679
rack (>= 0.4)
77-
rack-ssl (1.3.2)
80+
rack-ssl (1.3.3)
7881
rack
79-
rack-test (0.6.1)
82+
rack-test (0.6.2)
8083
rack (>= 1.0)
81-
rails (3.2.6)
82-
actionmailer (= 3.2.6)
83-
actionpack (= 3.2.6)
84-
activerecord (= 3.2.6)
85-
activeresource (= 3.2.6)
86-
activesupport (= 3.2.6)
84+
rails (3.2.13)
85+
actionmailer (= 3.2.13)
86+
actionpack (= 3.2.13)
87+
activerecord (= 3.2.13)
88+
activeresource (= 3.2.13)
89+
activesupport (= 3.2.13)
8790
bundler (~> 1.0)
88-
railties (= 3.2.6)
89-
railties (3.2.6)
90-
actionpack (= 3.2.6)
91-
activesupport (= 3.2.6)
91+
railties (= 3.2.13)
92+
railties (3.2.13)
93+
actionpack (= 3.2.13)
94+
activesupport (= 3.2.13)
9295
rack-ssl (~> 1.3.2)
9396
rake (>= 0.8.7)
9497
rdoc (~> 3.4)
9598
thor (>= 0.14.6, < 2.0)
96-
rake (0.9.2.2)
97-
rdoc (3.12)
99+
rake (10.0.4)
100+
rdoc (3.12.2)
98101
json (~> 1.4)
99-
sass (3.1.20)
100-
sass-rails (3.2.5)
102+
ref (1.0.4)
103+
sass (3.2.7)
104+
sass-rails (3.2.6)
101105
railties (~> 3.2.0)
102106
sass (>= 3.1.10)
103107
tilt (~> 1.3)
104-
sprockets (2.1.3)
108+
sprockets (2.2.2)
105109
hike (~> 1.2)
110+
multi_json (~> 1.0)
106111
rack (~> 1.0)
107112
tilt (~> 1.1, != 1.3.0)
108-
sqlite3 (1.3.6)
109-
therubyracer (0.10.1)
110-
libv8 (~> 3.3.10)
111-
thor (0.15.4)
112-
tilt (1.3.3)
113-
treetop (1.4.10)
113+
sqlite3 (1.3.7)
114+
therubyracer (0.11.4)
115+
libv8 (~> 3.11.8.12)
116+
ref
117+
thor (0.18.1)
118+
tilt (1.3.7)
119+
treetop (1.4.12)
114120
polyglot
115121
polyglot (>= 0.3.1)
116-
twitter-bootstrap-rails (2.1.1)
122+
twitter-bootstrap-rails (2.2.6)
117123
actionpack (>= 3.1)
118-
less-rails (~> 2.2.2)
124+
execjs
119125
railties (>= 3.1)
120-
therubyracer (= 0.10.1)
121-
tzinfo (0.3.33)
122-
uglifier (1.2.6)
126+
tzinfo (0.3.37)
127+
uglifier (2.0.1)
123128
execjs (>= 0.3.0)
124-
multi_json (~> 1.3)
129+
multi_json (~> 1.0, >= 1.0.2)
125130

126131
PLATFORMS
127132
ruby
@@ -130,9 +135,11 @@ DEPENDENCIES
130135
coffee-rails (~> 3.2.1)
131136
jquery-fileupload-rails
132137
jquery-rails
138+
less-rails
133139
paperclip
134-
rails (= 3.2.6)
140+
rails (= 3.2.13)
135141
sass-rails (~> 3.2.3)
136142
sqlite3
143+
therubyracer
137144
twitter-bootstrap-rails
138145
uglifier (>= 1.0.3)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This is an example app that uses the following gems to upload files for your Rai
77

88
This app also uses [twitter-bootstrap-rails](https://github.com/seyhunak/twitter-bootstrap-rails) but is not required.
99

10-
This app uses Rails 3.2.6.
10+
This app uses Rails 3.2.13.
1111

1212
## Running the app
1313

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,35 @@
11
@import "twitter/bootstrap/bootstrap";
2-
body {
3-
padding-top: 60px;
2+
body {
3+
padding-top: 60px;
44
}
55

66
@import "twitter/bootstrap/responsive";
77

88
// Set the correct sprite paths
9-
@iconSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings.png');
10-
@iconWhiteSpritePath: asset-path('twitter/bootstrap/glyphicons-halflings-white.png');
9+
@iconSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings.png");
10+
@iconWhiteSpritePath: asset-path("twitter/bootstrap/glyphicons-halflings-white.png");
1111

1212
// Set the Font Awesome (Font Awesome is default. You can disable by commenting below lines)
13-
// Note: If you use asset_path() here, your compiled boostrap_and_overrides.css will not
13+
// Note: If you use asset_path() here, your compiled bootstrap_and_overrides.css will not
1414
// have the proper paths. So for now we use the absolute path.
15-
@fontAwesomeEotPath: '/assets/fontawesome-webfont.eot';
16-
@fontAwesomeWoffPath: '/assets/fontawesome-webfont.woff';
17-
@fontAwesomeTtfPath: '/assets/fontawesome-webfont.ttf';
18-
@fontAwesomeSvgPath: '/assets/fontawesome-webfont.svg';
15+
@fontAwesomeEotPath: asset-path("fontawesome-webfont.eot?v=3.0.2");
16+
@fontAwesomeEotPath_iefix: asset-path("fontawesome-webfont.eot?#iefix&v=3.0.2");
17+
@fontAwesomeWoffPath: asset-path("fontawesome-webfont.woff?v=3.0.2");
18+
@fontAwesomeTtfPath: asset-path("fontawesome-webfont.ttf?v=3.0.2");
1919

2020
// Font Awesome
2121
@import "fontawesome";
2222

23+
// Glyphicons
24+
//@import "twitter/bootstrap/sprites.less";
25+
2326
// Your custom LESS stylesheets goes here
2427
//
2528
// Since bootstrap was imported above you have access to its mixins which
2629
// you may use and inherit here
2730
//
2831
// If you'd like to override bootstrap's own variables, you can do so here as well
29-
// See http://twitter.github.com/bootstrap/less.html for their names and documentation
32+
// See http://twitter.github.com/bootstrap/customize.html#variables for their names and documentation
3033
//
3134
// Example:
3235
// @linkColor: #ff0000;

app/controllers/uploads_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def create
4949
:content_type => 'text/html',
5050
:layout => false
5151
}
52-
format.json { render json: [@upload.to_jq_upload].to_json, status: :created, location: @upload }
52+
format.json { render json: {files: [@upload.to_jq_upload]}, status: :created, location: @upload }
5353
else
5454
format.html { render action: "new" }
5555
format.json { render json: @upload.errors, status: :unprocessable_entity }

app/views/uploads/index.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
//
120120
// Load existing files:
121121
$.getJSON($('#fileupload').prop('action'), function (files) {
122-
var fu = $('#fileupload').data('fileupload'),
122+
var fu = $('#fileupload').data('blueimpFileupload'),
123123
template;
124124
fu._adjustMaxNumberOfFiles(-files.length);
125125
console.log(files);

0 commit comments

Comments
 (0)