Class: Versioneer::Bypass

Inherits:
Repo
  • Object
show all
Defined in:
lib/versioneer/bypass.rb

Constant Summary collapse

H =
Helpers

Instance Attribute Summary collapse

Attributes inherited from Repo

#bump_segment, #environment, #prereleases, #release_pattern, #starting_release

Instance Method Summary collapse

Methods inherited from Repo

bump, segment_to_i, #to_s, #version

Constructor Details

#initialize(file_within_repo, options = nil) ⇒ Bypass

Returns a new instance of Bypass.

Raises:



7
8
9
10
11
12
# File 'lib/versioneer/bypass.rb', line 7

def initialize(file_within_repo, options=nil)
  raise InvalidRepoError if options[:invalid]
  super
  @commits_since_release = 0
  @filesystem_dirty = false
end

Instance Attribute Details

#commits_since_releaseObject

Returns the value of attribute commits_since_release.



23
24
25
# File 'lib/versioneer/bypass.rb', line 23

def commits_since_release
  @commits_since_release
end

Instance Method Details

#filesystem_dirty=(v) ⇒ Object



29
30
31
# File 'lib/versioneer/bypass.rb', line 29

def filesystem_dirty=(v)
  @filesystem_dirty = v
end

#filesystem_dirty?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/versioneer/bypass.rb', line 25

def filesystem_dirty?
  @filesystem_dirty
end

#releaseObject



14
15
16
# File 'lib/versioneer/bypass.rb', line 14

def release
  @release || super
end

#release=(v) ⇒ Object



18
19
20
21
# File 'lib/versioneer/bypass.rb', line 18

def release=(v)
  v = ::Gem::Version.new(v) if v.is_a? String
  @release = v
end