public
Description: Rails plugin for managing your site's version number.
Homepage: http://fiatdev.com/2007/03/31/new-rails-plugin-app-version
Clone URL: git://github.com/toland/app_version.git
app_version / install.rb
100644 14 lines (10 sloc) 0.68 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# copy the version.yml.erb to some user editable location for example, in lib
 
targetTemplateDir = File.join(RAILS_ROOT, 'lib/templates')
sourceTemplateFile = File.join(File.dirname(__FILE__), 'lib/templates/version.yml.erb')
 
sourceSampleFile = File.join(File.dirname(__FILE__), 'lib/templates/version.yml')
targetSampleDir = File.join(RAILS_ROOT, '/config')
 
FileUtils.mkdir( targetTemplateDir, :verbose => true) unless File.exists?(targetTemplateDir)
FileUtils.cp( sourceTemplateFile, targetTemplateDir,:verbose => true)
FileUtils.cp( sourceSampleFile, targetSampleDir, :verbose => true )
 
# Show the README text file
# puts IO.read(File.join(File.dirname(__FILE__), 'README'))