rake_git 0.1.0.pre.4 → 0.1.0.pre.5

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: 9ad0f6659a6a667baeec8cfe23dd4a2cae16327df5ec177c77c320ed79a6ff92
4
- data.tar.gz: 113477fd25481de57348684d313d4ff95d8f2386dd62fe542a7651204a31afce
3
+ metadata.gz: ffd67d64ad5a032bda6aea6fb79b714373275ea1ed9bd4cfa2f3bc76e4ea3396
4
+ data.tar.gz: 6dcd5b5591a3a5ab393196292c737d91d619f7b8d43a5d99744675b8efa73215
5
5
  SHA512:
6
- metadata.gz: 603e86155de47b9081d57b220c2bd765418e86f1b3e9a57a39db4df781a091a4b0af910f604ffac1059a67c8e4db380579a77ecc3c4182464fa467e0b815368f
7
- data.tar.gz: c105d15bff46f70e21c7c40e7974672c62e67490cd9472560e5addca1651ac41e8000a1d88c2c1e78d3216ec4534d4f483205a5fc4e9b06fe7fb6aa9ae59ea58
6
+ metadata.gz: 2ad8b93e4286d9f7b66761165f0b2193aeff8fc718c9ac2d1f0fb80da7536a7826f9ce475697bb23671590584d347411bba4a6e14a03947fea1b030dd9b82d5e
7
+ data.tar.gz: d83e8d28ff6bdadb65ef8fd0b00b6b17f95fa825c7033331c02a0626a67dc284c1c48d765f8c9abbd0483fae7ea9203436637de44a01555321461a19aeed4236
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rake_git (0.1.0.pre.4)
4
+ rake_git (0.1.0.pre.5)
5
5
  colored2 (~> 3.1)
6
6
  git (~> 1.13, >= 1.13.2)
7
7
  rake_factory (= 0.32.0.pre.2)
@@ -18,7 +18,7 @@ GEM
18
18
  public_suffix (>= 2.0.2, < 6.0)
19
19
  ast (2.4.2)
20
20
  colored2 (3.1.2)
21
- concurrent-ruby (1.2.0)
21
+ concurrent-ruby (1.2.2)
22
22
  diff-lcs (1.5.0)
23
23
  docile (1.4.0)
24
24
  excon (0.99.0)
@@ -27,7 +27,7 @@ GEM
27
27
  ruby2_keywords (>= 0.0.4)
28
28
  faraday-net_http (3.0.2)
29
29
  gem-release (2.2.2)
30
- git (1.13.2)
30
+ git (1.17.2)
31
31
  addressable (~> 2.8)
32
32
  rchardet (~> 1.8)
33
33
  hamster (3.0.0)
@@ -40,13 +40,13 @@ GEM
40
40
  hamster (~> 3.0)
41
41
  open4 (~> 1.3)
42
42
  memfs (1.0.0)
43
- minitest (5.17.0)
44
- octokit (6.0.1)
43
+ minitest (5.18.0)
44
+ octokit (6.1.0)
45
45
  faraday (>= 1, < 3)
46
46
  sawyer (~> 0.9)
47
47
  open4 (1.3.4)
48
48
  parallel (1.22.1)
49
- parser (3.2.0.0)
49
+ parser (3.2.1.1)
50
50
  ast (~> 2.4.1)
51
51
  public_suffix (5.0.1)
52
52
  rainbow (3.1.1)
@@ -77,7 +77,7 @@ GEM
77
77
  rake_factory (~> 0.23)
78
78
  sshkey (~> 2.0)
79
79
  rchardet (1.8.0)
80
- regexp_parser (2.6.2)
80
+ regexp_parser (2.7.0)
81
81
  rexml (3.2.5)
82
82
  rspec (3.12.0)
83
83
  rspec-core (~> 3.12.0)
@@ -88,30 +88,30 @@ GEM
88
88
  rspec-expectations (3.12.2)
89
89
  diff-lcs (>= 1.2.0, < 2.0)
90
90
  rspec-support (~> 3.12.0)
91
- rspec-mocks (3.12.3)
91
+ rspec-mocks (3.12.4)
92
92
  diff-lcs (>= 1.2.0, < 2.0)
93
93
  rspec-support (~> 3.12.0)
94
94
  rspec-support (3.12.0)
95
- rubocop (1.44.1)
95
+ rubocop (1.48.0)
96
96
  json (~> 2.3)
97
97
  parallel (~> 1.10)
98
98
  parser (>= 3.2.0.0)
99
99
  rainbow (>= 2.2.2, < 4.0)
100
100
  regexp_parser (>= 1.8, < 3.0)
101
101
  rexml (>= 3.2.5, < 4.0)
102
- rubocop-ast (>= 1.24.1, < 2.0)
102
+ rubocop-ast (>= 1.26.0, < 2.0)
103
103
  ruby-progressbar (~> 1.7)
104
104
  unicode-display_width (>= 2.4.0, < 3.0)
105
- rubocop-ast (1.24.1)
106
- parser (>= 3.1.1.0)
107
- rubocop-capybara (2.17.0)
105
+ rubocop-ast (1.27.0)
106
+ parser (>= 3.2.1.0)
107
+ rubocop-capybara (2.17.1)
108
108
  rubocop (~> 1.41)
109
109
  rubocop-rake (0.6.0)
110
110
  rubocop (~> 1.0)
111
- rubocop-rspec (2.18.1)
111
+ rubocop-rspec (2.19.0)
112
112
  rubocop (~> 1.33)
113
113
  rubocop-capybara (~> 2.17)
114
- ruby-progressbar (1.11.0)
114
+ ruby-progressbar (1.13.0)
115
115
  ruby2_keywords (0.0.5)
116
116
  ruby_git_crypt (0.1.0.pre.2)
117
117
  immutable-struct (~> 2.4)
@@ -157,4 +157,4 @@ DEPENDENCIES
157
157
  simplecov
158
158
 
159
159
  BUNDLED WITH
160
- 2.4.6
160
+ 2.4.8
data/lib/git/lib.rb ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'git'
4
+
5
+ module Git
6
+ class Lib
7
+ def untracked_files
8
+ command_lines('ls-files', %w[--others --exclude-standard])
9
+ end
10
+ end
11
+ end
@@ -22,6 +22,7 @@ module RakeGit
22
22
 
23
23
  maybe_stage_tracked_files(base)
24
24
  maybe_stage_untracked_files(base)
25
+
25
26
  commit(base)
26
27
  end
27
28
 
@@ -30,27 +31,32 @@ module RakeGit
30
31
  def maybe_stage_tracked_files(base)
31
32
  return unless stage_tracked_files
32
33
 
33
- status = base.status
34
- base.add(
35
- [
36
- *status.added.keys,
37
- *status.changed.keys,
38
- *status.deleted.keys
39
- ],
40
- all: true
41
- )
34
+ base.add(tracked_files(base), all: true)
42
35
  end
43
36
 
44
37
  def maybe_stage_untracked_files(base)
45
38
  return unless stage_untracked_files
46
39
 
47
- status = base.status
48
- base.add(status.untracked.keys, all: true)
40
+ base.add(untracked_files(base), all: true)
49
41
  end
50
42
 
51
43
  def commit(base)
52
44
  base.commit(message)
53
45
  end
46
+
47
+ def tracked_files(base)
48
+ status = base.status
49
+
50
+ [
51
+ *status.added.keys,
52
+ *status.changed.keys,
53
+ *status.deleted.keys
54
+ ]
55
+ end
56
+
57
+ def untracked_files(base)
58
+ base.lib.untracked_files
59
+ end
54
60
  end
55
61
  end
56
62
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RakeGit
4
- VERSION = '0.1.0.pre.4'
4
+ VERSION = '0.1.0.pre.5'
5
5
  end
data/lib/rake_git.rb CHANGED
@@ -3,6 +3,8 @@
3
3
  require 'rake_git/tasks'
4
4
  require 'rake_git/version'
5
5
 
6
+ require_relative './git/lib'
7
+
6
8
  module RakeGit
7
9
  def self.define_commit_task(opts = {}, &block)
8
10
  RakeGit::Tasks::Commit.define(opts, &block)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake_git
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.4
4
+ version: 0.1.0.pre.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - InfraBlocks Maintainers
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-02-06 00:00:00.000000000 Z
11
+ date: 2023-03-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colored2
@@ -73,6 +73,7 @@ files:
73
73
  - Rakefile
74
74
  - bin/console
75
75
  - bin/setup
76
+ - lib/git/lib.rb
76
77
  - lib/rake_git.rb
77
78
  - lib/rake_git/mixins/support.rb
78
79
  - lib/rake_git/tasks.rb