class SourceFile
Public Instance Methods
cleanup()
click to toggle source
# File lib/autotab-rails/source_file.rb, line 19 def cleanup self.destination_root = 'vendor/assets' remove_file 'bower.json' end
fetch(remote, branch)
click to toggle source
# File lib/autotab-rails/source_file.rb, line 10 def fetch(remote, branch) self.destination_root = 'vendor/assets' get "#{remote}/raw/#{branch}/js/jquery.autotab.js", 'javascripts/autotab-jquery.js' get "#{remote}/raw/#{branch}/js/jquery.autotab.min.js", 'javascripts/autotab-jquery.min.js' get "#{remote}/raw/#{branch}/bower.json", 'bower.json' bump_version end
Protected Instance Methods
bump_version()
click to toggle source
# File lib/autotab-rails/source_file.rb, line 26 def bump_version inside destination_root do component_json = JSON.load(File.open('bower.json')) version = component_json['version'] gsub_file '../../lib/autotab-rails/version.rb', /AUTO_TAB_VERSION\s=\s'(\d|\.)+'$/ do |match| %Q{AUTO_TAB_VERSION = '#{version}'} end end end