Skip to content
This repository was archived by the owner on Mar 23, 2024. It is now read-only.

Commit 0e4243e

Browse files
committed
Merge pull request #54 from jwhitley/requirejs-2.0.2
Support require.js and r.js 2.0.2
2 parents 9998644 + 453089f commit 0e4243e

File tree

11 files changed

+7911
-5200
lines changed

11 files changed

+7911
-5200
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
<!--
22
Marked Style: GitHub
33
-->
4+
# v0.9.0
5+
6+
- **BREAKING CHANGE**: Upgrade RequireJS and r.js to v2.0.0
7+
- order.js was removed. See the new [RequireJS 2.0 shim config](https://github.com/jrburke/requirejs/wiki/Upgrading-to-RequireJS-2.0#wiki-shim).
8+
- Build support for `empty:` is now handled by r.js 2.0 natively.
9+
410
# v0.8.2
511

612
- Fix for `requirejs_include_tag` error when `config/requirejs.yml` has no

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
requirejs-rails (0.8.2)
4+
requirejs-rails (0.9.0)
55
railties (>= 3.1.1, < 3.3)
66

77
GEM

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,11 @@ Usage changes that may break functionality for those upgrading along the 0.x
264264
series are documented here. See [the Changelog](https://github.com/jwhitley/requirejs-rails/blob/master/CHANGELOG.md) for the full
265265
list of feature additions, bugfixes, etc.
266266

267+
### v0.9.0
268+
269+
- The upgrade to RequireJS and r.js 2.0 includes changes that will break some
270+
apps.
271+
267272
### v0.5.1
268273

269274
- `requirejs_include_tag` now generates a data-main attribute if given an argument, ala:
@@ -291,4 +296,4 @@ to see what's upcoming and to file feature requests and bug reports.
291296

292297
----
293298

294-
Copyright 2011 John Whitley. See the file MIT-LICENSE for terms.
299+
Copyright 2011-2012 John Whitley. See the file MIT-LICENSE for terms.

app/helpers/requirejs_helper.rb

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ def _requirejs_data(name, &block)
1111
{}.tap do |data|
1212
if name
1313
name += ".js" unless name =~ /\.js$/
14-
data['main'] = _javascript_path(name)
14+
data['main'] = _javascript_path(name).sub(/\.js$/,'')
1515
end
1616

1717
data.merge!(yield controller) if block_given?
@@ -20,15 +20,6 @@ def _requirejs_data(name, &block)
2020
end.join(" ")
2121
end
2222

23-
def _data_main(name)
24-
if name
25-
name += ".js" unless name =~ /\.js$/
26-
%Q{data-main="#{_javascript_path(name)}"}
27-
else
28-
""
29-
end
30-
end
31-
3223
def requirejs_include_tag(name=nil, &block)
3324
requirejs = Rails.application.config.requirejs
3425

0 commit comments

Comments
 (0)