1
0
Fork 0
mirror of https://github.com/kbparagua/paloma synced 2023-03-27 23:21:17 -04:00

Fix A Major Bug that copies the _local.js template instead of _callbacks.js

This commit is contained in:
kbparagua 2013-01-02 22:46:13 +08:00
parent dc3ecf6dde
commit 9c51c5a0b7
4 changed files with 11 additions and 2 deletions

View file

@ -1,6 +1,10 @@
Changelog
=
Version 0.0.7
-
* Fix A Major Bug that copies the _local.js template instead of _callbacks.js
Version 0.0.6
-
* `SetupGenerator` moved from `paloma_generator.rb` to `paloma/generators/setup_generator.rb`

View file

@ -62,7 +62,7 @@ module Paloma
def generate_from_template destination_filename
filename = destination_filename.split('/').last
content = File.read("#{Paloma.templates}/_local.js").gsub(/controller/, @controller_name)
content = File.read("#{Paloma.templates}/#{filename}").gsub(/controller/, @controller_name)
File.open(destination_filename, 'w'){ |f| f.write(content) }
end
end

View file

@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = 'paloma'
s.version = '0.0.6'
s.version = '0.0.7'
s.summary = "a sexy way to organize javascript files using Rails` asset pipeline"
s.description = "a sexy way to organize javascript files using Rails` asset pipeline"
s.authors = ["Karl Paragua", "Bia Esmero"]

View file

@ -80,6 +80,11 @@ feature Paloma::AddGenerator, 'creating action with existing controller folder'
file 'new_action.js' do
contains "Paloma.callbacks['existing_controller_folder/new_action']"
end
file '_callbacks.js' do
contains "//= require ./existing_controller_folder/_local"
contains "//= require_tree ."
end
end
end
}