version_info 0.6.2 → 0.6.3
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/README.md +16 -2
- data/lib/version_info/version_info.yml +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
## VersionInfo
|
2
|
+
|
1
3
|
### Overview
|
2
4
|
|
3
5
|
VersionIinfo is a powerful and very lightweight gem to manage version data in your Ruby projects or other gems.
|
@@ -19,7 +21,9 @@ Include VersionInfo in your main project module (or class):
|
|
19
21
|
|
20
22
|
end
|
21
23
|
|
22
|
-
|
24
|
+
From here, is better to use the builtin rake tasks (see it fordward). Here is how VersionInfo works and their user options:
|
25
|
+
|
26
|
+
VersionInfo use yaml file to store version data:
|
23
27
|
|
24
28
|
---
|
25
29
|
major: 0
|
@@ -27,6 +31,13 @@ Create a file to store your version data. By default the file is named version_i
|
|
27
31
|
patch: 0
|
28
32
|
author: jcangas
|
29
33
|
|
34
|
+
By default the file is named version_info.yml and stored near the main file with the include VersionIinfo thing.
|
35
|
+
|
36
|
+
Anyway, you can change this:
|
37
|
+
module MyProject
|
38
|
+
include VersionInfo
|
39
|
+
VERISION.file_name = '/path/to/my_file.yaml'
|
40
|
+
end
|
30
41
|
|
31
42
|
Note you can put any custom data. In order to get the version tag, VersionInfo reserve some special keys
|
32
43
|
for use as the "segments" of the version tag:
|
@@ -62,17 +73,20 @@ Put in your rake file:
|
|
62
73
|
|
63
74
|
VersionInfo::Tasks.install(MyProject) # pass here the thing where you included VersionInfo
|
64
75
|
|
65
|
-
And you get a few tasks
|
76
|
+
And you get a few tasks with a namespace vinfo:
|
66
77
|
|
67
78
|
rake -T
|
68
79
|
=>
|
69
80
|
rake vinfo:build # Bumps version segment BUILD
|
81
|
+
rake vinfo:inspect # Inspect all current version keys
|
70
82
|
rake vinfo:major # Bumps version segment MAJOR
|
71
83
|
rake vinfo:minor # Bumps version segment MINOR
|
72
84
|
rake vinfo:patch # Bumps version segment PATCH
|
73
85
|
rake vinfo:pre # Bumps version segment PRE
|
74
86
|
rake vinfo:show # Show current version tag and create version_info.yml if missing
|
75
87
|
|
88
|
+
Note vinfo:inspect allows you check your custom keys also.
|
89
|
+
|
76
90
|
### Install
|
77
91
|
|
78
92
|
gem install version_info
|