namo 0.32.0 → 0.32.1
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 +11 -0
- data/README.md +6 -0
- data/bin/namo +0 -3
- data/lib/Namo/VERSION.rb +1 -1
- data/test/namo_command_test.rb +26 -6
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 21fc95b808cd34c61c9cfce1ff932cb4ec2933e13ded454dfd1b9c8f77e9f953
|
|
4
|
+
data.tar.gz: 6c5975a3e1a021ea47683de8541210b43dbfb0f64722f7df82dce461bfa84edf
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f8e91dcc73b3ee92c6caae40d5cc58a103fee6bcdec011e82ffff8b1f1b6516228727fe7143ba43b83c2b88db2700b135888cb796e2a373ea52691016d0bdfec
|
|
7
|
+
data.tar.gz: 62f1077b654bb518fd42e69c2b4bff112367602e741feb9ccb752010415a34f8ca3e9ef55c618bcd6a18580f28e387f07ffe113bfd28fcc39a90b3ef51d66078
|
data/CHANGELOG
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
2
|
|
|
3
|
+
## 20260828
|
|
4
|
+
|
|
5
|
+
0.32.1: ~ install.sh: it runs the same piped from curl as from a clone, and forces no package manager; ~ README.md: + the one-line install.
|
|
6
|
+
|
|
7
|
+
1. ~ install.sh: the handover is to `namo setup` on the PATH rather than to bin/namo beside the script. It had found bin/namo by its own path, so piped from curl it looked in the working directory and failed there. It now finds nothing by its path and so runs from anywhere. The check is for the namo command rather than for the gem, that being what the next step needs: an older namo installs no executable.
|
|
8
|
+
2. ~ install.sh: + agreed, + parse_arguments, + usage, and install_homebrew is reached only where Ruby is missing and neither Homebrew nor MacPorts is present — a package manager already installed being used before one is installed, so a MacPorts machine is never asked about Homebrew. Homebrew is used where it is already installed, and installed only on a yes — -y answers in advance, and a script piped into a shell, having nobody able to refuse, is taken to have refused. Where Ruby is missing and Homebrew is declined, + ruby_routes names the ways to get Ruby — Homebrew as the command it is, MacPorts and ruby-install as pages, and a distribution's own package manager on Linux — rather than reporting only that no package manager was found.
|
|
9
|
+
3. ~ install.sh: + report_path. gem puts the command in its own directory, which is on the PATH on some machines and not on others; where it is not, the directory is named rather than somebody's shell configuration being written to.
|
|
10
|
+
4. ~ README.md: + the one-line install, for a machine with neither Ruby nor the gem.
|
|
11
|
+
5. ~ Namo::VERSION: /0.32.0/0.32.1/
|
|
12
|
+
|
|
13
|
+
|
|
3
14
|
## 20260828
|
|
4
15
|
|
|
5
16
|
0.32.0: + bin/namo, the gem's first executable, and the gems it installs.
|
data/README.md
CHANGED
|
@@ -18,6 +18,12 @@ Or in your Gemfile:
|
|
|
18
18
|
gem 'namo'
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
Or from nothing at all — Ruby, the gem, and the gems its scripts want, each step skipped where it is already there. Where Ruby is missing, Homebrew or MacPorts supplies it if either is already installed; where neither is, you are asked before Homebrew is installed; `-y` answers yes in advance, and a machine with nobody at the keyboard is taken to have said no:
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
sh -c "$(curl -fsSL https://raw.githubusercontent.com/thoran/namo/master/install.sh)"
|
|
25
|
+
```
|
|
26
|
+
|
|
21
27
|
## Usage
|
|
22
28
|
|
|
23
29
|
Create a Namo instance from an array of hashes:
|
data/bin/namo
CHANGED
data/lib/Namo/VERSION.rb
CHANGED
data/test/namo_command_test.rb
CHANGED
|
@@ -29,17 +29,37 @@ describe 'bin/namo' do
|
|
|
29
29
|
_(output).must_match(/measurand is already installed!/)
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
# install.sh is the
|
|
33
|
-
#
|
|
34
|
-
# a test which executed it on a
|
|
35
|
-
|
|
32
|
+
# install.sh is the part a Ruby script cannot do — the Ruby the script would be
|
|
33
|
+
# running on, and the gem which carries the command it hands over to. Its
|
|
34
|
+
# syntax is asserted and its body is not run: a test which executed it on a
|
|
35
|
+
# machine without Ruby would install Ruby.
|
|
36
|
+
#
|
|
37
|
+
# It hands over by name rather than by path, which is what lets it run piped
|
|
38
|
+
# from curl — an assertion that it finds nothing by SCRIPT_DIR.
|
|
39
|
+
#
|
|
40
|
+
# It installs Homebrew only through `agreed`, which answers no unless -y was
|
|
41
|
+
# given or somebody is there to say yes. What is asserted is that the curl of
|
|
42
|
+
# Homebrew's installer sits behind that gate: an unguarded call is the failure
|
|
43
|
+
# this is written against.
|
|
44
|
+
it "has a shell bootstrap which parses, hands over by name, and gates the one install it forces" do
|
|
36
45
|
root = File.expand_path('..', __dir__)
|
|
37
46
|
system("sh -n #{File.join(root, 'install.sh')}")
|
|
38
47
|
_($?.success?).must_equal true
|
|
39
48
|
body = File.read(File.join(root, 'install.sh'))
|
|
40
|
-
_(body).must_match(/install_homebrew/)
|
|
41
49
|
_(body).must_match(/install_ruby/)
|
|
42
|
-
_(body).must_match(
|
|
50
|
+
_(body).must_match(/install_namo/)
|
|
51
|
+
_(body).must_match(/command -v port/)
|
|
52
|
+
_(body).must_match(/ruby_routes/)
|
|
53
|
+
_(body).must_match(/namo setup/)
|
|
54
|
+
_(body).wont_match(/SCRIPT_DIR/)
|
|
55
|
+
_(body).must_match(/elif agreed .*Install Homebrew\?.*; then\n\s+\/bin\/bash -c/)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
it "declines to install anything where nothing can answer" do
|
|
59
|
+
root = File.expand_path('..', __dir__)
|
|
60
|
+
output = IO.popen([File.join(root, 'install.sh'), '--help'], chdir: root, err: [:child, :out]){|io| io.read}
|
|
61
|
+
_($?.success?).must_equal true
|
|
62
|
+
_(output).must_match(/-y, --yes/)
|
|
43
63
|
end
|
|
44
64
|
|
|
45
65
|
it "refuses a subcommand it does not have" do
|