git-safe 0.2.0 → 0.3.0

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
  SHA256:
3
- metadata.gz: 8a0b6c1caa45fd00e0efe0b635aa4cbdc50f8668e79c026d670a1f2acde51311
4
- data.tar.gz: f713c7662244c7af08dc51aafef385a2cf1e5a024b86933792a3ffcfa208aa39
3
+ metadata.gz: 72bd31d71bb39c917e7a6682cc54b48bcf444797b1b074af58db1f4b6bc542c9
4
+ data.tar.gz: 22d357ea3b35d4afc145b40ed9fb5c6613ba9408862cf76c6019f97e7bec1cfe
5
5
  SHA512:
6
- metadata.gz: 38e7580cc42dd60935067ea391761b673365d0e841b35b74365c4239b091ddf874c9a5f79630c6e9db81cff2139e27bd93f93b9ba29ff5cbd6110b7c1947cbd1
7
- data.tar.gz: 515f5f954b357bf43ae07acd9eb3bf6c73b317654cb1221bc463a2551316b4e77f2baa9fb4dbf09d4ea1de71c9f5491c7415588ed596122ff883ba4a9d2fcd4d
6
+ metadata.gz: 5032869c1baad5a1d35eeff0c948bbf54d2dbe94fb9eb5f94e9b4323d49d71d91fa3f6ca6090e5461804cdc3440de6f8d3c87d8f70b24d257894a3d9b54526d4
7
+ data.tar.gz: '000584f48d8a75f1067167c785616c0b8befe4c9a39f2ceb8541be6063c36b256c07c6e27a1d6d5fa952786bc3157cdf1f72ad46fe693d08e8612e3f8cf4b270'
@@ -1,3 +1,7 @@
1
+ ## v0.3.0 (2021-01-26)
2
+ * [#1](https://github.com/perryqh/git-safe-ruby/pull/2) add/remove/log
3
+
4
+
1
5
  ## v0.2.0 (2020-11-10)
2
6
  * [#1](https://github.com/perryqh/git-safe-ruby/pull/1) introducing reset_to_remote to fix push -force
3
7
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- git-safe (0.2.0)
4
+ git-safe (0.3.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -22,6 +22,10 @@ module GitSafe
22
22
  execute_git_cmd("git #{git_locale} status")
23
23
  end
24
24
 
25
+ def log
26
+ execute_git_cmd("git #{git_locale} log")
27
+ end
28
+
25
29
  def config_set(name_values = {})
26
30
  name_values.keys.each do |key|
27
31
  execute_git_cmd("git #{git_locale} config #{key} #{name_values[key]}") if name_values[key]
@@ -32,11 +36,23 @@ module GitSafe
32
36
  execute_git_cmd("git #{git_locale} config #{name}")
33
37
  end
34
38
 
35
- def add_and_commit(commit_msg)
36
- execute_git_cmd("git #{git_locale} add .")
39
+ def rm(remove_paths)
40
+ execute_git_cmd("git #{git_locale} rm #{remove_paths}")
41
+ end
42
+
43
+ def add(add_paths)
44
+ execute_git_cmd("git #{git_locale} add #{add_paths}")
45
+ end
46
+
47
+ def commit(commit_msg)
37
48
  execute_git_cmd("git #{git_locale} commit -m '#{commit_msg}'")
38
49
  end
39
50
 
51
+ def add_and_commit(commit_msg)
52
+ add('.')
53
+ commit(commit_msg)
54
+ end
55
+
40
56
  def last_commit_sha
41
57
  execute_git_cmd("git #{git_locale} rev-parse HEAD")
42
58
  end
@@ -1,3 +1,3 @@
1
1
  module GitSafe
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: git-safe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Perry Hertler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-11-10 00:00:00.000000000 Z
11
+ date: 2021-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler