gitfog 0.0.3 → 0.0.4
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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/bin/gitfog +22 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f5f16ab573fe000f10d03267e23a020181b8458f
|
4
|
+
data.tar.gz: 0d1da50f3fd98cbd176ec910becbd4cf7dcd70d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7010a894e5af775a4fd96c5ced6e1975593e805115b5724fbeccd67df9ce70f28ed022dd150325bc0434c486fded9e418e013342c2c7115f0a7a07c47932ba9
|
7
|
+
data.tar.gz: 3ce052c86851994a0ae2d315595b6c95a59b9f2c9672c9ad7b9147dfc3243a997740bd67f2d1f9f2961769677d8c8bfcd6262326d6be15fd3389146a659df744
|
data/README.md
CHANGED
data/bin/gitfog
CHANGED
@@ -7,7 +7,7 @@ require 'highline/import'
|
|
7
7
|
require 'fileutils'
|
8
8
|
require 'git'
|
9
9
|
|
10
|
-
program :version, '0.0.
|
10
|
+
program :version, '0.0.4'
|
11
11
|
program :description, 'Camouflage git commit and push'
|
12
12
|
|
13
13
|
def verify_gitfog
|
@@ -120,6 +120,19 @@ command :init do |c|
|
|
120
120
|
cfile.puts config
|
121
121
|
end
|
122
122
|
|
123
|
+
# ask whether to GPG sign commits
|
124
|
+
puts "Use your PGP key to sign commits?"
|
125
|
+
use_pgp = ask "Enter Y or Yes to add signature: "
|
126
|
+
if use_pgp.strip.downcase == "y" || use_pgp.strip.downcase == "yes"
|
127
|
+
File.open('.gitfog/use_pgp', 'w') do |pgp_file|
|
128
|
+
pgp_file.puts "yes"
|
129
|
+
end
|
130
|
+
puts "Enabled PGP signature on commits"
|
131
|
+
elsif File.exist?('.gitfog/use_pgp')
|
132
|
+
File.delete('.gitfog/use_pgp')
|
133
|
+
puts "Disabled PGP signature on commits"
|
134
|
+
end
|
135
|
+
|
123
136
|
# remove old .git directory
|
124
137
|
FileUtils.rm_rf('.git')
|
125
138
|
puts "When you want to restore regular git commands, run 'gitfog off'."
|
@@ -207,6 +220,10 @@ command :commit do |c|
|
|
207
220
|
# verify .gitfog exists
|
208
221
|
verify_gitfog
|
209
222
|
|
223
|
+
# check whether to PGP sign commits
|
224
|
+
use_pgp = ""
|
225
|
+
use_pgp = " -S" if File.exist?('.gitfog/use_pgp')
|
226
|
+
|
210
227
|
# copy .gitfog directory to .git
|
211
228
|
restore_git
|
212
229
|
|
@@ -252,9 +269,9 @@ command :commit do |c|
|
|
252
269
|
|
253
270
|
# make a timed commit
|
254
271
|
if options.m
|
255
|
-
system "GIT_AUTHOR_DATE='" + commit_time + "' GIT_COMMITTER_DATE='" + commit_time + "' git commit -m \"" + options.m + "\""
|
272
|
+
system "GIT_AUTHOR_DATE='" + commit_time + "' GIT_COMMITTER_DATE='" + commit_time + "' git commit -m \"" + options.m + "\"" + use_pgp
|
256
273
|
else
|
257
|
-
system "GIT_AUTHOR_DATE='" + commit_time + "' GIT_COMMITTER_DATE='" + commit_time + "' git commit"
|
274
|
+
system "GIT_AUTHOR_DATE='" + commit_time + "' GIT_COMMITTER_DATE='" + commit_time + "' git commit" + use_pgp
|
258
275
|
end
|
259
276
|
else
|
260
277
|
puts "Try again after more time has passed."
|
@@ -263,9 +280,9 @@ command :commit do |c|
|
|
263
280
|
puts "Making the commit with local system time"
|
264
281
|
# make a commit without changing time
|
265
282
|
if options.m
|
266
|
-
system 'git commit -m "' + options.m + '"'
|
283
|
+
system 'git commit -m "' + options.m + '"' + use_pgp
|
267
284
|
else
|
268
|
-
system 'git commit'
|
285
|
+
system 'git commit' + use_pgp
|
269
286
|
end
|
270
287
|
end
|
271
288
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitfog
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Msjoinder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01-
|
11
|
+
date: 2014-01-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commander
|