coaster 1.3.31 → 1.3.32
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/lib/coaster/git/repository.rb +5 -5
- data/lib/coaster/version.rb +1 -1
- data/test/test_git.rb +9 -9
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ade22d0084d98fb4169986fce083c991fdf00b2d5e95a4fec2f2fb2a03b0ffbb
|
|
4
|
+
data.tar.gz: 43bedfaf5b382b1817bac45efd7ed1416f75696dc625faecf7be4f680e532985
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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(
|
|
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
|
|
80
|
+
def commit(message)
|
|
81
81
|
run_git_cmd("commit -m \"#{message}\"")
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
-
def branch
|
|
84
|
+
def branch(name)
|
|
85
85
|
run_git_cmd("branch #{name}")
|
|
86
86
|
end
|
|
87
87
|
|
|
88
|
-
def checkout
|
|
88
|
+
def checkout(name)
|
|
89
89
|
run_git_cmd("checkout #{name}")
|
|
90
90
|
end
|
|
91
91
|
|
data/lib/coaster/version.rb
CHANGED
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.
|
|
14
|
+
@beta.add('.')
|
|
15
15
|
@beta.run_git_cmd('commit -m "hello"')
|
|
16
|
-
@beta.branch
|
|
17
|
-
@beta.checkout
|
|
16
|
+
@beta.branch('beta_feature')
|
|
17
|
+
@beta.checkout('beta_feature')
|
|
18
18
|
@beta.run_cmd('echo "beta_feature" >> README.md')
|
|
19
|
-
@beta.
|
|
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.
|
|
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
|
|
41
|
-
@alpha.checkout
|
|
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.
|
|
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
|
|
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.
|
|
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-
|
|
11
|
+
date: 2023-06-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: oj
|