middleman-hashicorp 0.3.34 → 0.3.35

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5fd0300face3e7267c71e4cb517f4002acbcd75c9a5becf1e235b5dd3baae467
4
- data.tar.gz: a526dd525f71c5336aa05f094af64c74d8d596970946174fcfdd11e36e85c5b5
3
+ metadata.gz: d2c7a885e60c254c12acb316b53cabc7717496ba1f983da5d58ba6b945c069ac
4
+ data.tar.gz: 7f9a6224170edaed847f424251ea2655a73dac302b48d43ee3ecd622df623821
5
5
  SHA512:
6
- metadata.gz: 984ebb61bd3dd9fa57df2cd733edc58b7f80274c78c81780824dcf83a6ee88113c1a59a46633106c77a7eb31600bc03e5148401026f7326a0fb085ea388adcda
7
- data.tar.gz: 44c225a09193770c978a29c6bcda93c332a532431035ac1564e7fe1c5c6efbd38a41e34d0d5d1316954196161ff0914db99e49c5c866d1b475e37cee37a01ac9
6
+ metadata.gz: 8534412acabb03191b17a3468273b661d9fdcecc615b0c233a523a0d3658819879ed0ca6fcb4d0ddb50f4bddae4588862f8221403718e88603471d77ca611148
7
+ data.tar.gz: e3bccac8d724eb0c7fd5caef1cae6eb7f8c1b26c873ccd21dcedf1f74aa66ba934d5661e08358f64fe28ce7c77257e616393fcf4e086b65230b001509ce0f636
@@ -153,17 +153,19 @@ class Middleman::HashiCorpExtension < ::Middleman::Extension
153
153
  #
154
154
  def pretty_os(os)
155
155
  case os
156
- when /darwin/
157
- "Mac OS X"
158
- when /freebsd/
156
+ when "darwin"
157
+ "macOS"
158
+ when "freebsd"
159
159
  "FreeBSD"
160
- when /openbsd/
160
+ when "openbsd"
161
161
  "OpenBSD"
162
- when /netbsd/
162
+ when "netbsd"
163
163
  "NetBSD"
164
- when /linux/
164
+ when "archlinux"
165
+ "Arch Linux"
166
+ when "linux"
165
167
  "Linux"
166
- when /windows/
168
+ when "windows"
167
169
  "Windows"
168
170
  else
169
171
  os.capitalize
@@ -1,5 +1,5 @@
1
1
  module Middleman
2
2
  module HashiCorp
3
- VERSION = "0.3.34"
3
+ VERSION = "0.3.35"
4
4
  end
5
5
  end
@@ -93,4 +93,32 @@ class Middleman::HashiCorpExtension
93
93
  end
94
94
  end
95
95
  end
96
+
97
+ describe "#pretty_os" do
98
+ before(:each) do
99
+ app = middleman_app
100
+ @instance = Middleman::HashiCorpExtension.new(app,
101
+ releases_enabled: false,
102
+ )
103
+ @instance.app = app
104
+ end
105
+
106
+ [
107
+ ["darwin", "macOS"],
108
+ ["freebsd", "FreeBSD"],
109
+ ["openbsd", "OpenBSD"],
110
+ ["netbsd", "NetBSD"],
111
+ ["archlinux", "Arch Linux"],
112
+ ["linux", "Linux"],
113
+ ["windows", "Windows"],
114
+ ].each do |given, expected|
115
+ it "converts #{given} to #{expected}" do
116
+ expect(@instance.app.pretty_os(given)).to eq(expected)
117
+ end
118
+ end
119
+
120
+ it "should capitalize unknown OS" do
121
+ expect(@instance.app.pretty_os("hashicorplinux")).to eq("Hashicorplinux")
122
+ end
123
+ end
96
124
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-hashicorp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.34
4
+ version: 0.3.35
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seth Vargo