middleman-hashicorp 0.3.5 → 0.3.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/middleman-hashicorp/extension.rb +6 -3
- data/lib/middleman-hashicorp/version.rb +1 -1
- data/spec/unit/helper_spec.rb +29 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62a445931a3c68d0d109dca5946a6b365496f92e
|
4
|
+
data.tar.gz: 905242445fec5480307ea74634824b41cc602e04
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ecb46c5959ea456940bdf6513d98429ed78f639b0626b75ad4b6159f4518d63e3e725ca02d049c08bd0ef11b7efa77fa92a76b31565caf3d79a724aa1472b0a
|
7
|
+
data.tar.gz: f7041640cebf1c9765e99f5ed7ee17b3783f5b31b00b4de27648906c498a11067a80f5c4b41637330d35e727a1131303a6d3fbe76f5fcdd9f10290bb521bfab8
|
@@ -124,12 +124,15 @@ class Middleman::HashiCorpExtension < ::Middleman::Extension
|
|
124
124
|
#
|
125
125
|
def pretty_arch(arch)
|
126
126
|
case arch
|
127
|
-
when
|
127
|
+
when "all"
|
128
128
|
"Universal (32 and 64-bit)"
|
129
|
-
when
|
129
|
+
when "i686", "i386", "686", "386"
|
130
130
|
"32-bit"
|
131
|
-
when
|
131
|
+
when "x86_64", "86_64", "amd64"
|
132
132
|
"64-bit"
|
133
|
+
when /\-/
|
134
|
+
parts = arch.split("-", 2)
|
135
|
+
"#{pretty_arch(parts[0])} (#{parts[1]})"
|
133
136
|
else
|
134
137
|
parts = arch.split("_")
|
135
138
|
|
data/spec/unit/helper_spec.rb
CHANGED
@@ -5,8 +5,7 @@ class Middleman::HashiCorpExtension
|
|
5
5
|
describe "#github_url" do
|
6
6
|
before(:all) do
|
7
7
|
app = middleman_app
|
8
|
-
@instance = Middleman::HashiCorpExtension.new(
|
9
|
-
app,
|
8
|
+
@instance = Middleman::HashiCorpExtension.new(app,
|
10
9
|
releases_enabled: false,
|
11
10
|
name: "consul",
|
12
11
|
version: "0.1.0",
|
@@ -35,8 +34,7 @@ class Middleman::HashiCorpExtension
|
|
35
34
|
describe "#path_in_repository" do
|
36
35
|
before(:each) do
|
37
36
|
app = middleman_app
|
38
|
-
@instance = Middleman::HashiCorpExtension.new(
|
39
|
-
app,
|
37
|
+
@instance = Middleman::HashiCorpExtension.new(app,
|
40
38
|
releases_enabled: false,
|
41
39
|
name: "consul",
|
42
40
|
version: "0.1.0",
|
@@ -68,4 +66,31 @@ class Middleman::HashiCorpExtension
|
|
68
66
|
end
|
69
67
|
end
|
70
68
|
end
|
69
|
+
|
70
|
+
describe "#pretty_arch" do
|
71
|
+
before(:each) do
|
72
|
+
app = middleman_app
|
73
|
+
@instance = Middleman::HashiCorpExtension.new(app,
|
74
|
+
releases_enabled: false,
|
75
|
+
)
|
76
|
+
@instance.app = app
|
77
|
+
end
|
78
|
+
|
79
|
+
[
|
80
|
+
["all", "Universal (32 and 64-bit)"],
|
81
|
+
["i686", "32-bit"],
|
82
|
+
["686", "32-bit"],
|
83
|
+
["386", "32-bit"],
|
84
|
+
["i386", "32-bit"],
|
85
|
+
["86_64", "64-bit"],
|
86
|
+
["x86_64", "64-bit"],
|
87
|
+
["amd64", "64-bit"],
|
88
|
+
["amd64-lxc", "64-bit (lxc)"],
|
89
|
+
["foo_bar", "Bar"],
|
90
|
+
].each do |i,e|
|
91
|
+
it "converts #{i} to #{e}" do
|
92
|
+
expect(@instance.app.pretty_arch(i)).to eq(e)
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
71
96
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-hashicorp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seth Vargo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman
|