Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

only bump chosen version while rake update-chosen

  • Loading branch information...
commit 194a8c0fd6ad07ca542561efd311af80b6f9816f 1 parent 1e743d4
@tsechingho authored
Showing with 12 additions and 6 deletions.
  1. +12 −6 lib/chosen-rails/source_file.rb
View
18 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
Please sign in to comment.
Something went wrong with that request. Please try again.