Class: Publish

Inherits:
Array show all
Defined in:
lib/dev_commands.rb

Overview

require_relative(‘internet.rb’)

Instance Method Summary collapse

Methods inherited from Array

#add, #execute, #to_html

Instance Method Details

#updateObject



792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
# File 'lib/dev_commands.rb', line 792

def update
	if(Internet.available?)
		if(File.exists?('.git'))
			if(`git branch`.include?('* master'))
				Dir.glob('*.gemspec').each{|gemspec_file|
					add "gem push #{Gemspec.gemfile(gemspec_file)}" if !Gemspec.published? gemspec_file
				}
			end
		end
		if(File.exists?('.svn'))
			if(`svn info`.include?('/trunk'))
				Dir.glob('*.gemspec').each{|gemspec_file|
					add "gem push #{Gemspec.gemfile(gemspec_file)}" if !Gemspec.published? gemspec_file
				}
			end
		end
	end
end