samus 3.0.1 → 3.0.2
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/CHANGELOG.md +4 -0
- data/commands/build/chmod-files +24 -0
- data/commands/build/chmod-files.help.md +19 -0
- data/lib/samus/version.rb +1 -1
- data/samus.json +9 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f02a949de04a9a4ce8c6d63f3e80c1b44636e341f1de08b5f036ff5e996967b
|
4
|
+
data.tar.gz: c700b3fe01b015074707f261f70c4627549f57de1a424c391ea58dc4d4dbcd85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 543d72731d76b7585660fb77a7c4d32ddcdfc5e2c99627964f7ee1a5ba518f2dcb95f12e5835c210916dca02e15834e4467b3e1f67a4d6adc2429498bda926dd
|
7
|
+
data.tar.gz: 60f25e20948cd58ead46211f88e3fa74abdf3262481b46a777862e8bf489a3b57e1cd17146a5656f02aec529796b7e925f19be8778333fec4b4234d910ab4bf8
|
data/CHANGELOG.md
CHANGED
@@ -0,0 +1,24 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
dir_mask = ENV['_DIR_MASK'] || "775"
|
4
|
+
entries = {}
|
5
|
+
|
6
|
+
ARGV.each do |arg|
|
7
|
+
wildcard, want_fmode = *arg.split(',')
|
8
|
+
Dir.glob(wildcard).each do |entry|
|
9
|
+
stat = File.stat(entry)
|
10
|
+
real_mode = stat.mode.to_s(8)[-3..-1]
|
11
|
+
want_mode = stat.directory? ? dir_mask : want_fmode
|
12
|
+
|
13
|
+
if real_mode != want_mode
|
14
|
+
entries[entry] = { want: want_mode, real: real_mode }
|
15
|
+
else
|
16
|
+
entries.delete(entry)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
entries.each do |f, mode|
|
22
|
+
File.chmod(mode[:want].to_i(8), f)
|
23
|
+
puts "Fix permissions: #{mode[:real]} -> #{mode[:want]} for #{f}"
|
24
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
Corrects permissions for a set of globs. Pass arguments in files
|
2
|
+
with comma separating glob from permission bits. This command
|
3
|
+
auto-corrects directories to 775. Set dir_mask to override the
|
4
|
+
default mask value.
|
5
|
+
|
6
|
+
Example:
|
7
|
+
|
8
|
+
```json
|
9
|
+
"files": "bin/**/*,755 lib/**/*.rb,644"
|
10
|
+
```
|
11
|
+
|
12
|
+
Files:
|
13
|
+
|
14
|
+
- A list of globs and permissions separated by a comma, ex:
|
15
|
+
`**/*.rb,644 **/*.sh,755`
|
16
|
+
|
17
|
+
Arguments:
|
18
|
+
|
19
|
+
- dir_mask: (optional) the directory umask to set. Defaults to 775.
|
data/lib/samus/version.rb
CHANGED
data/samus.json
CHANGED
@@ -8,6 +8,15 @@
|
|
8
8
|
"replace": "VERSION = '$version'"
|
9
9
|
}
|
10
10
|
},
|
11
|
+
{
|
12
|
+
"action": "chmod-files",
|
13
|
+
"files": [
|
14
|
+
"**/*,644",
|
15
|
+
"bin/*,755",
|
16
|
+
"commands/**/*,755",
|
17
|
+
"commands/**/*.md,644"
|
18
|
+
]
|
19
|
+
},
|
11
20
|
{
|
12
21
|
"action": "git-commit",
|
13
22
|
"files": ["lib/*/version.rb"]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: samus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Loren Segal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email: lsegal@soen.ca
|
@@ -31,6 +31,8 @@ files:
|
|
31
31
|
- commands/build/archive-zip.help.md
|
32
32
|
- commands/build/changelog-parse
|
33
33
|
- commands/build/changelog-parse.help.md
|
34
|
+
- commands/build/chmod-files
|
35
|
+
- commands/build/chmod-files.help.md
|
34
36
|
- commands/build/fs-copy
|
35
37
|
- commands/build/fs-copy.help.md
|
36
38
|
- commands/build/fs-mkdir
|