Permalink
Browse files

only bump chosen version while rake update-chosen

  • Loading branch information...
1 parent 1e743d4 commit 194a8c0fd6ad07ca542561efd311af80b6f9816f @tsechingho committed Jan 21, 2013
Showing with 12 additions and 6 deletions.
  1. +12 −6 lib/chosen-rails/source_file.rb
@@ -15,12 +15,7 @@ def fetch
get "#{remote}/raw/master/coffee/chosen.jquery.coffee", 'javascripts/chosen.jquery.coffee'
get "#{remote}/raw/master/coffee/chosen.proto.coffee", 'javascripts/chosen.proto.coffee'
get "#{remote}/raw/master/VERSION", 'VERSION'
- inside destination_root do
- version = File.read('VERSION').sub("\n", '')
- gsub_file '../../lib/chosen-rails/version.rb', /VERSION\s=\s'(\d|\.)+'$/ do |match|
- %Q{VERSION = '#{version}'}
- end
- end
+ bump_version
end
desc 'convert css to sass file', 'convert css to sass file by sass-convert'
@@ -40,4 +35,15 @@ def cleanup
remove_file 'stylesheets/chosen.css'
remove_file 'VERSION'
end
+
+ protected
+
+ def bump_version
+ inside destination_root do
+ version = File.read('VERSION').sub("\n", '')
+ gsub_file '../../lib/chosen-rails/version.rb', /CHOSEN_VERSION\s=\s'(\d|\.)+'$/ do |match|
+ %Q{CHOSEN_VERSION = '#{version}'}
+ end
+ end
+ end
end

0 comments on commit 194a8c0

Please sign in to comment.