Dahistory 0.4.0 → 0.4.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/README.md +5 -17
- data/lib/Dahistory/version.rb +1 -1
- metadata +1 -1
data/README.md
CHANGED
@@ -15,7 +15,7 @@ Installation
|
|
15
15
|
|
16
16
|
gem 'Dahistory'
|
17
17
|
|
18
|
-
|
18
|
+
Usage
|
19
19
|
------
|
20
20
|
|
21
21
|
# In your Chef-Solo recipe or your Ruby code...
|
@@ -51,7 +51,7 @@ Both **def Dahistory** and **class Dahistory** are defined.
|
|
51
51
|
All the code is in one file and less than 150 lines:
|
52
52
|
[lib/Dahistory.rb](https://github.com/da99/Dahistory/blob/master/lib/Dahistory.rb)
|
53
53
|
|
54
|
-
|
54
|
+
Usage: Dahistory + Git
|
55
55
|
-----------------------
|
56
56
|
|
57
57
|
Dahistory has some methods that can be used as shortcuts when using git.
|
@@ -62,7 +62,7 @@ Dahistory has some methods that can be used as shortcuts when using git.
|
|
62
62
|
|
63
63
|
o.git_add_commit
|
64
64
|
|
65
|
-
# ...
|
65
|
+
# ...is a shortcut for:
|
66
66
|
o.on_raise_pending {
|
67
67
|
`git add #{o.backup_file}`
|
68
68
|
`git commit -m "Backup: #{o.backup_file}"`
|
@@ -70,26 +70,14 @@ Dahistory has some methods that can be used as shortcuts when using git.
|
|
70
70
|
|
71
71
|
}
|
72
72
|
|
73
|
-
`
|
73
|
+
`git_add_commit_push` does the same above,
|
74
|
+
but runs "git push" after the commit:
|
74
75
|
|
75
76
|
o.git_add_commit_push
|
76
77
|
|
77
78
|
# or...
|
78
79
|
o.git_add_commit_push 'my_remote my_branch'
|
79
80
|
|
80
|
-
You can specify the git repo:
|
81
|
-
|
82
|
-
Dahistory { |o|
|
83
|
-
|
84
|
-
o.file "some/file.txt"
|
85
|
-
|
86
|
-
Dir.chdir("/path/to/project") {
|
87
|
-
o.git_add_commit
|
88
|
-
# or...
|
89
|
-
o.git_add_commit_push
|
90
|
-
}
|
91
|
-
}
|
92
|
-
|
93
81
|
Run Tests
|
94
82
|
---------
|
95
83
|
|
data/lib/Dahistory/version.rb
CHANGED