coaster 1.3.31 → 1.3.32

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: 43abb6513668deddc9df011fbff2c6e5e91b3d719802eea04e5747c861386b70
4
- data.tar.gz: f71da9808d5ede1b3d9b82b730aadbe42e167aac3a5e1a25594e86eb03ec5e79
3
+ metadata.gz: ade22d0084d98fb4169986fce083c991fdf00b2d5e95a4fec2f2fb2a03b0ffbb
4
+ data.tar.gz: 43bedfaf5b382b1817bac45efd7ed1416f75696dc625faecf7be4f680e532985
5
5
  SHA512:
6
- metadata.gz: 0ff272eab32afa8c497cfa819dcc0478f2f89d2023993d19282185e9a0a338093c187333b963bf7e2b62be0059d33b0ae73056a22de57ea48a1090b8f6863cb9
7
- data.tar.gz: 70eac0b6df3309029af7780dbb39544e0c0e72cf98e656734d3f884dc3bb457c988948ac5731a5432958998bc899f5f943123acac378818d4957d88f5bea5703
6
+ metadata.gz: 0bc77179288fb0841bf49646c799f75793f03e941032ee04fca006113a516f14f984cf07222a56e4e93fd49f45b3469726e84428bca177b86341d4cf3dbe1928
7
+ data.tar.gz: 144d370265cfc0ab7618edd71f66239269c039710a3192579d53badefa67c54e49db75646bfa437af91167a73243f0a6bbb25039c46b9be504110797a86a8329
@@ -73,19 +73,19 @@ module Coaster
73
73
  run_cmd(cmd)
74
74
  end
75
75
 
76
- def add!
77
- run_git_cmd('add .')
76
+ def add(*paths, **options)
77
+ run_git_cmd("add #{self.class.hash_option_parser(options)} #{paths.join(' ')}")
78
78
  end
79
79
 
80
- def commit!(message)
80
+ def commit(message)
81
81
  run_git_cmd("commit -m \"#{message}\"")
82
82
  end
83
83
 
84
- def branch!(name)
84
+ def branch(name)
85
85
  run_git_cmd("branch #{name}")
86
86
  end
87
87
 
88
- def checkout!(name)
88
+ def checkout(name)
89
89
  run_git_cmd("checkout #{name}")
90
90
  end
91
91
 
@@ -1,3 +1,3 @@
1
1
  module Coaster
2
- VERSION = '1.3.31'
2
+ VERSION = '1.3.32'
3
3
  end
data/test/test_git.rb CHANGED
@@ -11,12 +11,12 @@ module Coaster
11
11
  FileUtils.mkdir_p(@test_repo_root)
12
12
  @beta = Git::Repository.create(File.join(@test_repo_root, 'beta'))
13
13
  @beta.run_cmd('echo "hello beta" > README.md')
14
- @beta.run_git_cmd('add .')
14
+ @beta.add('.')
15
15
  @beta.run_git_cmd('commit -m "hello"')
16
- @beta.branch!('beta_feature')
17
- @beta.checkout!('beta_feature')
16
+ @beta.branch('beta_feature')
17
+ @beta.checkout('beta_feature')
18
18
  @beta.run_cmd('echo "beta_feature" >> README.md')
19
- @beta.run_git_cmd('add .')
19
+ @beta.add('.')
20
20
  @beta.run_git_cmd('commit -m "beta_feature"')
21
21
  @beta.run_git_cmd('checkout main')
22
22
 
@@ -24,7 +24,7 @@ module Coaster
24
24
  @alpha.submodule_add!('sb/beta', @beta.path, git_options: {'-c' => {'protocol.file.allow' => 'always'}})
25
25
  @alpha.submodule_update!('sb/beta')
26
26
  @alpha.run_cmd('echo "hello alpha" > README.md')
27
- @alpha.run_git_cmd('add .')
27
+ @alpha.add('.')
28
28
  @alpha.run_git_cmd('commit -m "hello"')
29
29
  end
30
30
 
@@ -37,15 +37,15 @@ module Coaster
37
37
  assert_equal "hello alpha\n", @alpha.run_cmd('cat README.md')
38
38
  assert_equal "hello beta\n", @alpha.run_cmd('cat sb/beta/README.md')
39
39
 
40
- @alpha.branch!('alpha_feature')
41
- @alpha.checkout!('alpha_feature')
40
+ @alpha.branch('alpha_feature')
41
+ @alpha.checkout('alpha_feature')
42
42
  @alpha.run_cmd('echo "alpha_feature" >> README.md')
43
43
  @alpha.submodules['sb/beta'].run_git_cmd('checkout beta_feature')
44
- @alpha.run_git_cmd('add .')
44
+ @alpha.add('.')
45
45
  @alpha.run_git_cmd('commit -m "alpha_feature"')
46
46
  assert_equal "README.md\nsb/beta\n", @alpha.run_git_cmd('diff --name-only HEAD~1 HEAD')
47
47
 
48
- @alpha.checkout!('main')
48
+ @alpha.checkout('main')
49
49
  @alpha.submodule_update!
50
50
  assert_equal "hello beta\n", @alpha.run_cmd('cat sb/beta/README.md')
51
51
  @alpha.deep_merge('alpha_feature')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.31
4
+ version: 1.3.32
5
5
  platform: ruby
6
6
  authors:
7
7
  - buzz jung
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-06-29 00:00:00.000000000 Z
11
+ date: 2023-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj