between_meals 0.0.9 → 0.0.10
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 +3 -0
- data/lib/between_meals/changes/cookbook.rb +13 -0
- data/lib/between_meals/cmd.rb +12 -5
- data/lib/between_meals/repo/hg.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 14a2f47358db13a1a9c1fbf6c038fc6c13f9c45a972a42b72abc6c592e41aa86
|
4
|
+
data.tar.gz: 2be633f930866b32923a3e22a2eb2ccc30aa3e29d748d3ab71b3af49cc650410
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1886e90d8bfaf9488f1dc919e8031aa334b98df14de5a51f7d1a86cad5dd11769cb2460427da2a9cca806537012ff765a43f31394da99e83218c2b2884fa885b
|
7
|
+
data.tar.gz: aa03b1ec64dea20775f6d9554caef8d295b826db5279e1bda6ecb944e9cf32a3e586370ddccc4c06550e94ad60ebd528c710c08c1869a6ce360cd3bcbbaf6527
|
data/README.md
CHANGED
@@ -71,6 +71,19 @@ module BetweenMeals
|
|
71
71
|
files.each do |f|
|
72
72
|
# a symlink will never have trailing '/', add one.
|
73
73
|
f[:path] += '/' if f[:path] == lrp['link']
|
74
|
+
|
75
|
+
# If a metadata file in the path of a symlink target directory has a
|
76
|
+
# deleted status, check if a metadata file exists in the symlink
|
77
|
+
# source directory. If so, mark it as modified to prevent deletion.
|
78
|
+
symlink_source_dir = File.join(@repo_dir, lrp['source'])
|
79
|
+
if (f[:path] == File.join(lrp['link'], 'metadata.rb') ||
|
80
|
+
f[:path] == File.join(lrp['link'], 'metadata.json')) &&
|
81
|
+
f[:status] == :deleted &&
|
82
|
+
(File.file?(File.join(symlink_source_dir, 'metadata.rb')) ||
|
83
|
+
File.file?(File.join(symlink_source_dir, 'metadata.json')))
|
84
|
+
f[:status] = :modified
|
85
|
+
end
|
86
|
+
|
74
87
|
next unless f[:path].start_with?(lrp['source'])
|
75
88
|
|
76
89
|
# This make a deep dup of the file hash
|
data/lib/between_meals/cmd.rb
CHANGED
@@ -33,13 +33,20 @@ module BetweenMeals
|
|
33
33
|
c = Mixlib::ShellOut.new(
|
34
34
|
cmd,
|
35
35
|
:cwd => cwd,
|
36
|
+
:env => {
|
37
|
+
# macOS needs /usr/local/bin as hg cannot be installed in /bin or
|
38
|
+
# /usr/bin
|
39
|
+
'PATH' => '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin',
|
40
|
+
},
|
36
41
|
)
|
37
|
-
# macOS needs /usr/local/bin as hg cannot be installed in /bin or /usr/bin
|
38
|
-
c.environment = {
|
39
|
-
'PATH' => '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin',
|
40
|
-
}
|
41
42
|
c.run_command
|
42
|
-
c.error
|
43
|
+
if c.error?
|
44
|
+
# Let's make sure the error goes to the logs
|
45
|
+
@logger.error("#{@bin} failed: #{c.format_for_exception}")
|
46
|
+
# if our logger is STDOUT, we'll double log when we throw
|
47
|
+
# the exception, but that's OK
|
48
|
+
c.error!
|
49
|
+
end
|
43
50
|
c
|
44
51
|
end
|
45
52
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: between_meals
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phil Dibowitz
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2019-08-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: colorize
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
168
168
|
version: '0'
|
169
169
|
requirements: []
|
170
170
|
rubyforge_project:
|
171
|
-
rubygems_version: 2.7.6
|
171
|
+
rubygems_version: 2.7.6.2
|
172
172
|
signing_key:
|
173
173
|
specification_version: 4
|
174
174
|
summary: Between Meals
|