version_info 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- version_info (0.6.4)
4
+ version_info (0.7.1)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
data/README.md CHANGED
@@ -3,24 +3,27 @@
3
3
  ### Overview
4
4
 
5
5
  VersionIinfo is a powerful and very lightweight gem to manage version data in your Ruby projects or other gems.
6
+
6
7
  VersionIinfo can manage a serie of predefined segments to build your version tag with the tipical structure X.X.X.X.
7
- The values are stored in a yaml file, and supports custom values. Also, rake & thor tasks are avaiable to simplify yaml file creation and update.
8
+ Their values are stored in a yaml file, and supports custom values.
9
+
10
+ Also rake & thor tasks are avaiable to simplify yaml file creation and update.
8
11
 
9
12
  Feel free to contact me about bugs/features
10
13
 
11
14
  ### Usage
12
15
 
13
-
14
16
  Include VersionInfo in your main project module (or class):
15
17
 
16
18
  require 'version_info'
17
19
 
18
20
  module MyProject
19
21
  include VersionInfo
20
-
21
22
  end
22
23
 
23
- From here, is better to use the builtin rake tasks (see it fordward). Here is how VersionInfo works and their user options:
24
+ From here, is better to use the builtin rake/thor tasks (see it fordward). Here is how VersionInfo works and their user options:
25
+
26
+ After you included VersionIinfo, a new class MyProject::Version is defined (it inherit from VersionIinfo::Data). Also a new constant MyProject::VERSION is created holding an object of class MyProject::VersionIinfo.
24
27
 
25
28
  VersionInfo use yaml file to store version data:
26
29
 
@@ -38,8 +41,7 @@ Anyway, you can change this:
38
41
  VERISION.file_name = '/path/to/my_file.yaml'
39
42
  end
40
43
 
41
- Note you can put any custom data. In order to get the version tag, VersionInfo reserve some special keys
42
- for use as the "segments" of the version tag:
44
+ Note you can put any custom data. In order to get the version tag, VersionInfo reserve some special keys for use as the "segments" of the version tag. Here the source code:
43
45
 
44
46
  module VersionInfo
45
47
 
@@ -52,7 +54,7 @@ for use as the "segments" of the version tag:
52
54
 
53
55
  Usingh the previous version_info.yml:
54
56
 
55
- puts MyProject::VERSION
57
+ puts MyProject::VERSION.tag
56
58
 
57
59
  => 0.1.0
58
60
 
@@ -63,31 +65,39 @@ Also you can bump any segment. With the same sample:
63
65
 
64
66
  => 1.0.0
65
67
 
66
- Note the other (lower) segments are reset to 0 after bump.
68
+ Note the other (lower weight) segments are reset to 0 after bump.
67
69
 
68
-
69
- ### Rake tasks
70
+ ### Rake / Thor tasks
70
71
 
71
72
  Put in your rake file:
72
73
 
73
- VersionInfo::Tasks.install(:class => MyProject) # pass here the thing where you included VersionInfo
74
+ VersionInfo::RakeTasks.install(:class => MyProject) # use the thing where you included VersionInfo
74
75
 
75
76
  And you get a few tasks with a namespace vinfo:
76
77
 
77
78
  rake -T
78
79
  =>
79
80
  rake vinfo:build # Bumps version segment BUILD
80
- rake vinfo:inspect # Inspect all current version keys
81
+ rake vinfo:inspect # Show complete version info
81
82
  rake vinfo:major # Bumps version segment MAJOR
82
83
  rake vinfo:minor # Bumps version segment MINOR
83
84
  rake vinfo:patch # Bumps version segment PATCH
84
- rake vinfo:pre # Bumps version segment PRE
85
85
  rake vinfo:show # Show current version tag and create version_info.yml if missing
86
86
 
87
- Note vinfo:inspect allows you check your custom keys also.
87
+ Or, if you prefer Thor:
88
+
89
+ VersionInfo::ThorTasks.install(:class => MyProject) # use the thing where you included VersionInfo
90
+
91
+ thor list
92
+ =>
93
+
94
+ vinfo
95
+ -----
96
+ thor vinfo:bump SEGMENT=patch # bumps segment: [major, minor, patch, build]...
97
+ thor vinfo:inspect # Show complete version info
98
+ thor vinfo:show # Show version tag and create version_info.yml...
88
99
 
89
100
  ### Install
90
101
 
91
102
  gem install version_info
92
103
 
93
-
@@ -1,4 +1,4 @@
1
1
  ---
2
2
  major: 0
3
3
  minor: 7
4
- patch: 0
4
+ patch: 1
@@ -1,7 +1,6 @@
1
1
  require 'version_info'
2
2
 
3
3
  module TestFile
4
- include VersionInfo
5
4
 
6
5
  end
7
6
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 7
8
- - 0
9
- version: 0.7.0
8
+ - 1
9
+ version: 0.7.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jorge L. Cangas