seajs-rails 0.0.6 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  module Seajs
2
2
  module Rails
3
- VERSION = "0.0.6"
3
+ VERSION = "0.0.7"
4
4
  SEAJS_VERSION = "2.0.0"
5
5
  end
6
6
  end
@@ -35,8 +35,8 @@ namespace :seajs do
35
35
 
36
36
  desc 'copy `app/assets/javascripts` to ``/public/assets/``'
37
37
  task :prepare_dir do
38
- cp_r Rails.root.join('app', 'assets', 'javascripts'), File.join(Rails.public_path, 'assets'), :remove_destination => true
39
- cp File.expand_path('../template/Gruntfile.js', __FILE__), File.join(Rails.public_path, 'assets')
38
+ cp_r Rails.root.join('app', 'assets', 'javascripts'), public_assets_path, :remove_destination => true
39
+ cp File.expand_path('../template/Gruntfile.js', __FILE__), public_assets_path
40
40
  end
41
41
 
42
42
  desc 'generate package.json by seajs_config.yml'
@@ -61,10 +61,13 @@ namespace :seajs do
61
61
  end
62
62
 
63
63
  task :clean do
64
- public_assets_path = Pathname.new(File.join(Rails.public_path, Rails.application.config.assets.prefix))
65
- cp_r public_assets_path.join('javascripts', 'sea-modules', '.'), public_assets_path.join('sea-modules')
66
- rm_rf public_assets_path.join('javascripts')
67
- rm_rf public_assets_path.join('Gruntfile.js')
64
+ cp_r public_assets_path('javascripts', 'sea-modules', '.'), public_assets_path('sea-modules')
65
+ rm_rf public_assets_path('javascripts')
66
+ rm_rf public_assets_path('Gruntfile.js')
67
+ end
68
+
69
+ def public_assets_path(*path)
70
+ File.join(Rails.public_path, Rails.application.config.assets.prefix, *path)
68
71
  end
69
72
  end
70
73
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: seajs-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-06-06 00:00:00.000000000 Z
12
+ date: 2013-06-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties