Module: Versioner

Defined in:
lib/railtie.rb,
lib/versioner.rb,
lib/versioner/versioner_yaml.rb,
lib/generators/versioner/install/install_generator.rb

Defined Under Namespace

Classes: Configuration, InstallGenerator, Railtie, YamlBackend

Class Method Summary collapse

Class Method Details

.apiObject



6
7
8
# File 'lib/versioner.rb', line 6

def api
  @api = YamlBackend.new(storage_path)
end

.configObject



30
31
32
# File 'lib/versioner.rb', line 30

def config
  @config ||= Configuration.new
end

.configure {|config| ... } ⇒ Object

Yields:



34
35
36
# File 'lib/versioner.rb', line 34

def configure
  yield config
end

.force(major, minor, patch) ⇒ Object



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

def force(major, minor, patch)
  api.force major, minor, patch
end

.increment_majorObject



18
19
20
# File 'lib/versioner.rb', line 18

def increment_major
  api.increment_major
end

.increment_minorObject



22
23
24
# File 'lib/versioner.rb', line 22

def increment_minor
  api.increment_minor
end

.increment_patchObject



26
27
28
# File 'lib/versioner.rb', line 26

def increment_patch
  api.increment_patch
end

.versionObject



10
11
12
# File 'lib/versioner.rb', line 10

def version
  api.version
end