Sha256: 3be18aa226ad520ce173b8180c007e38a8ba771f5f331a77d6c8ab5d53f76933

Contents?: true

Size: 565 Bytes

Versions: 37

Compression:

Stored size: 565 Bytes

Contents

module OhlohScm::Adapters
	class BzrAdapter < AbstractAdapter
		def self.url_regex
			/^((((http|https|bzr|bzr\+ssh|file):\/\/((\w+@)?[A-Za-z0-9_\-\.]+(:\d+)?\/)?)|(lp:[A-Za-z0-9_\-\.\~])))?[A-Za-z0-9_@\-\.\/\~\+]*$/
		end

		def self.public_url_regex
			/^(((http|https|bzr):\/\/(\w+@)?[A-Za-z0-9_\-\.]+(:\d+)?\/)|(lp:[A-Za-z0-9_\-\.\~]))[A-Za-z0-9_\-\.\/\~\+]*$/
		end

		def validate_server_connection
			return unless valid?
			@errors << [:failed, "The server did not respond to the 'bzr revno' command. Is the URL correct?"] unless self.exist?
		end
	end
end

Version data entries

37 entries across 37 versions & 1 rubygems

Version Path
ohloh_scm-2.2.13 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.12 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.11 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.10 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.9 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.8 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.7 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.6 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.5 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.4 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.3 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.2 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.1 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.2.0 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.1.0 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.0.1 lib/ohloh_scm/adapters/bzr/validation.rb
ohloh_scm-2.0.0 lib/ohloh_scm/adapters/bzr/validation.rb