gitvers 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 23309eb9439a17a42b43b1b552c40013770f3500
4
- data.tar.gz: 94b2cb218e293676530d6feced147ce3ce51a325
3
+ metadata.gz: bd72ca7edb2a9c19ada445c531e6af9f49d099f3
4
+ data.tar.gz: 2aca99435ef188110ac22e61233dd70bae61d8c8
5
5
  SHA512:
6
- metadata.gz: b01f6f726166c8aaeb52363edc8a666e9ade9205d666a94d2eca0af87bf98e0905f27426d9506cc643c3f09645b310b35a2ec1b090d11ac5faafccbf7e882cf1
7
- data.tar.gz: 871632516605baa8151f9b9275ef2a82da282584e13c3107a47ee7962711c7719fc0e1ff4427f07416677a90be20070028858ffee840d49cad33bf759c2c6960
6
+ metadata.gz: f9e4ce682d5f4b07e795cc0e89c4b87c50cc5c2e5ab7b1b58836a474e20d37b50c2d1d212df7ed1a9c34b6a650cbb94f28c8662032a316371407c40bed7a2143
7
+ data.tar.gz: 983d7b6fa38cb2056a035c6aa70b65b937cf376909cc1a6d19f5c66854802f4d4066c296b8fc3ccd0f8a72b953e8ecf52e93b780a422c5330b1f8bae4155eb63
data/README.md CHANGED
@@ -18,7 +18,23 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- $ gitvers
21
+ $ gitvers help
22
+
23
+ ### API
24
+
25
+ rep = Gitvers::Repository.new(repository_path)
26
+
27
+ puts rep.summary # 1.6.2-34-09938ba (3425)
28
+ puts rep.full_version # 1.6.2-34-09938ba
29
+ puts rep.short_version # 1.6.2
30
+ puts rep.revision_number # 3425
31
+
32
+ ## Known issues
33
+
34
+ At present gitvers is limited to an exclusive use of git tags, which means it will
35
+ behave erratically if you have non version git tags.
36
+
37
+ The command line tool `gitvers` can only work on the master branch.
22
38
 
23
39
  ## Contributing
24
40
 
data/bin/gitvers CHANGED
@@ -2,4 +2,4 @@
2
2
 
3
3
  require "gitvers"
4
4
 
5
- Gitvers::Console.start
5
+ Gitvers::CLI.new
data/gitvers.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["kuon@goyman.com"]
11
11
  spec.description = %q{Utility to manage version with git tags}
12
12
  spec.summary = %q{Utility to manage version with git tags}
13
- spec.homepage = ""
13
+ spec.homepage = "http://bitbucket.org/kuon/gitvers"
14
14
  spec.license = "MIT"
15
15
 
16
16
  spec.files = `git ls-files`.split($/)
@@ -1,8 +1,8 @@
1
1
  require 'highline/import'
2
2
 
3
3
  module Gitvers
4
- class Console
5
- def self.start
4
+ class CLI
5
+ def initialize
6
6
  command = ARGV.shift.to_sym rescue nil
7
7
 
8
8
  rep = Repository.new(Dir.pwd)
@@ -32,7 +32,7 @@ module Gitvers
32
32
  end
33
33
  end
34
34
 
35
- def self.usage
35
+ def usage
36
36
  puts %|usage: gitvers <command> [<args>]
37
37
 
38
38
  Commands:
@@ -1,3 +1,3 @@
1
1
  module Gitvers
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/lib/gitvers.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require "gitvers/version"
2
- require "gitvers/console"
3
2
  require "gitvers/repository"
3
+ require "gitvers/cli"
4
4
 
5
5
  module Gitvers
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitvers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Goy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-18 00:00:00.000000000 Z
11
+ date: 2013-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -68,10 +68,10 @@ files:
68
68
  - bin/gitvers
69
69
  - gitvers.gemspec
70
70
  - lib/gitvers.rb
71
- - lib/gitvers/console.rb
71
+ - lib/gitvers/cli.rb
72
72
  - lib/gitvers/repository.rb
73
73
  - lib/gitvers/version.rb
74
- homepage: ''
74
+ homepage: http://bitbucket.org/kuon/gitvers
75
75
  licenses:
76
76
  - MIT
77
77
  metadata: {}