Skip to content
Browse files

Fix jim plugin

  • Loading branch information...
1 parent 3ffcb5b commit 336b750004a681c73b354cd07333cb45fa4885bb @quirkey committed Oct 2, 2011
Showing with 8,552 additions and 4 deletions.
  1. +3 −3 Gemfile
  2. +2 −0 lib/soca/plugins/jim.rb
  3. +3 −1 lib/soca/pusher.rb
  4. +8,544 −0 test/testapp/js/default.js
View
6 Gemfile
@@ -11,9 +11,9 @@ gem 'mustache', '~>0.99'
gem 'coffee-script', '~>2.2'
group :development do
- gem 'rake'
- gem 'jeweler'
+ gem 'rake'
+ gem 'jeweler'
end
group :test do
- gem "shoulda", ">= 0"
+ gem "shoulda", ">= 0"
end
View
2 lib/soca/plugins/jim.rb
@@ -11,6 +11,8 @@ def before_build
::Jim.logger = logger
logger.debug "bundling js"
bundler = ::Jim::Bundler.new(File.read(jimfile), ::Jim::Index.new(app_dir))
+ # set the base dir relative to the app
+ bundler.bundle_dir = app_dir + bundler.bundle_dir
bundler.bundle!
end
View
4 lib/soca/pusher.rb
@@ -137,7 +137,9 @@ def plugins
@plugins = config['plugins'].map do |plugin_config|
plugin_name, plugin_options = [plugin_config].flatten
require "soca/plugins/#{plugin_name}"
- [plugin_name, Soca::Plugin.plugins[plugin_name].new(self, plugin_options || {})]
+ plugin_options ||= {}
+ plugin_options.each {|k, v| plugin_options[k.to_sym] = v }
+ [plugin_name, Soca::Plugin.plugins[plugin_name].new(self, plugin_options)]
end
else
@plugins = []
View
8,544 test/testapp/js/default.js
8,544 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.

0 comments on commit 336b750

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