Skip to content
Browse files

Move source files to root dir

  • Loading branch information...
1 parent e6c88bd commit 8048209df358e76dc4730721583e7ac9e3ca4a34 @josh committed
View
2 Rakefile
@@ -1,7 +1,7 @@
require 'coffee-script'
task :build do
- Dir['lib/**/*.coffee'].each do |src|
+ Dir['./*.coffee'].each do |src|
dest = src.sub(/\.coffee/, '.js')
data = CoffeeScript.compile(File.read(src))
File.open(dest, 'w') { |f| f.write(data) }
View
0 lib/rails/accept.coffee → accept.coffee
File renamed without changes.
View
0 lib/rails/accept.js → accept.js
File renamed without changes.
View
0 lib/rails/beforesend.coffee → beforesend.coffee
File renamed without changes.
View
0 lib/rails/beforesend.js → beforesend.js
File renamed without changes.
View
0 lib/rails/confirm.coffee → confirm.coffee
File renamed without changes.
View
0 lib/rails/confirm.js → confirm.js
File renamed without changes.
View
0 lib/rails/csrf.coffee → csrf.coffee
File renamed without changes.
View
0 lib/rails/csrf.js → csrf.js
File renamed without changes.
View
0 lib/rails/disable.coffee → disable.coffee
File renamed without changes.
View
0 lib/rails/disable.js → disable.js
File renamed without changes.
View
0 lib/rails/ie_utf8.coffee → ie_utf8.coffee
File renamed without changes.
View
0 lib/rails/ie_utf8.js → ie_utf8.js
File renamed without changes.
View
1 index.js
View
18 index.js
@@ -0,0 +1,18 @@
+/**
+ * Rails Behaviors v0.4.1
+ * https://github.com/josh/rails-behaviors
+ *
+ * Copyright 2012, Joshua Peek
+ * Released under the MIT License
+ */
+
+//= require ./beforesend
+//= require ./prepare
+//= require ./accept
+//= require ./confirm
+//= require ./csrf
+//= require ./ie_utf8
+//= require ./disable
+//= require ./method
+//= require ./remote
+//= require ./remote_submit
View
18 lib/rails.js
@@ -1,18 +0,0 @@
-/**
- * Rails Behaviors v0.4.1
- * https://github.com/josh/rails-behaviors
- *
- * Copyright 2012, Joshua Peek
- * Released under the MIT License
- */
-
-//= require rails/beforesend
-//= require rails/prepare
-//= require rails/accept
-//= require rails/confirm
-//= require rails/csrf
-//= require rails/ie_utf8
-//= require rails/disable
-//= require rails/method
-//= require rails/remote
-//= require rails/remote_submit
View
0 lib/rails/method.coffee → method.coffee
File renamed without changes.
View
0 lib/rails/method.js → method.js
File renamed without changes.
View
0 lib/rails/prepare.coffee → prepare.coffee
File renamed without changes.
View
0 lib/rails/prepare.js → prepare.js
File renamed without changes.
View
0 lib/rails/remote.coffee → remote.coffee
File renamed without changes.
View
0 lib/rails/remote.js → remote.js
File renamed without changes.
View
0 lib/rails/remote_submit.coffee → remote_submit.coffee
File renamed without changes.
View
0 lib/rails/remote_submit.js → remote_submit.js
File renamed without changes.
View
8 test/config.ru
@@ -5,8 +5,8 @@ require 'json'
Root = File.expand_path("../..", __FILE__)
Assets = Sprockets::Environment.new(Root) do |env|
+ env.append_path "."
env.append_path "test"
- env.append_path "lib"
env.append_path "vendor"
end
@@ -22,7 +22,7 @@ map "/jquery-1.7.2.html" do
run lambda { |env|
html = <<-HTML
<script type="text/javascript" src="/js/jquery-1.7.2.js"></script>
- <script type="text/javascript" src="/js/rails.js"></script>
+ <script type="text/javascript" src="/js/index.js"></script>
HTML
[200, {'Content-Type' => 'text/html'}, [html]]
}
@@ -32,7 +32,7 @@ map "/zepto-0.8.html" do
run lambda { |env|
html = <<-HTML
<script type="text/javascript" src="/js/zepto-0.8.js"></script>
- <script type="text/javascript" src="/js/rails.js"></script>
+ <script type="text/javascript" src="/js/index.js"></script>
<script type="text/javascript">
$(document).on('ajaxSuccess', function(event, xhr) {
if (xhr.getResponseHeader('Content-Type') === 'application/javascript') {
@@ -49,7 +49,7 @@ map "/zepto-1.0rc1.html" do
run lambda { |env|
html = <<-HTML
<script type="text/javascript" src="/js/zepto-1.0rc1.js"></script>
- <script type="text/javascript" src="/js/rails.js"></script>
+ <script type="text/javascript" src="/js/index.js"></script>
HTML
[200, {'Content-Type' => 'text/html'}, [html]]
}

0 comments on commit 8048209

Please sign in to comment.
Something went wrong with that request. Please try again.