utopia 2.17.1 → 2.18.0

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: 271df583d52d5b53718ed38a322b2ed66d73d1e8ecfe460f18961e156ce92d10
4
- data.tar.gz: eaa41f80ca7244853bb1a08acc9ca0b1d76932e1cc3ebff58771fee1686eb4a7
3
+ metadata.gz: a8851f81c898bf14616952ae21c9c5379bff340c112e84c422f652ceeff26a2f
4
+ data.tar.gz: e1abf3e367e371b83edfb2089371367952d6f4d23ffae441074abe3dd3daff66
5
5
  SHA512:
6
- metadata.gz: b9d8cef96cde92e960559a9618d447512ec35905b75cb67a116899607181db2c7bc4de457fe7739a8aea20cd98f9f1e7ee56e33656cc84873aaacc1f4337e22a
7
- data.tar.gz: 4b6df56fabfc179ca95c11db76e31689ec722c1bdd6d1f430e5ce8f0a2d613d390bcee7f22b4399f59311c7ed2dc1843a706da49fc63af03f745319b0e0c322b
6
+ metadata.gz: e191685798e34a85a19c06828987938efc4876b50691add9dd923ab6b53d38c6a5e578cc3b94fa5fc3129dba368106dcf621f02d1a6cf0e8243238d79fac83e9
7
+ data.tar.gz: fc79ea764f46e0352ed1fa000a049d32c7c2c3ea8511ef12fd2e5270d4465873fac12468bb93fe576eeea496297dd23826bff342216493b98b54b2b36f7e0dc5
@@ -52,7 +52,9 @@ module Utopia
52
52
 
53
53
  def href
54
54
  @href ||= @info.fetch(:uri) do
55
- (@path.dirname + @path.basename).to_s if @path
55
+ @info.fetch(:href) do
56
+ (@path.dirname + @path.basename).to_s if @path
57
+ end
56
58
  end
57
59
  end
58
60
 
@@ -234,7 +234,7 @@ module Utopia
234
234
  end
235
235
 
236
236
  def load_index(name, locale, info)
237
- info ||= {}
237
+ info ||= {}
238
238
 
239
239
  if locale and defaults = @metadata[name]
240
240
  info = defaults.merge(info)
@@ -245,17 +245,20 @@ module Utopia
245
245
  yield Link.new(:index, name, locale, path, info, path[-2])
246
246
  end
247
247
 
248
+ DEFAULT_INDEX_INFO = {href: nil}.freeze
249
+
250
+ # The default index for a directory which has no contents.
248
251
  def load_default_index(name = INDEX, info = {})
249
252
  path = @top + name
250
253
 
251
254
  if info
252
- info = {uri: nil}.merge(info)
255
+ info = DEFAULT_INDEX_INFO.merge(info)
253
256
  else
254
- info = {uri: nil}
257
+ info = DEFAULT_INDEX_INFO
255
258
  end
256
259
 
257
260
  # Specify a nil uri if no index could be found for the directory:
258
- yield Link.new(:index, name, nil, @top, info, path[-2])
261
+ yield Link.new(:index, name, nil, @top.to_directory, info, path[-2])
259
262
  end
260
263
 
261
264
  def load_file(name, locale, info)
@@ -21,5 +21,5 @@
21
21
  # THE SOFTWARE.
22
22
 
23
23
  module Utopia
24
- VERSION = "2.17.1"
24
+ VERSION = "2.18.0"
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utopia
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.17.1
4
+ version: 2.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -192,34 +192,6 @@ dependencies:
192
192
  - - ">="
193
193
  - !ruby/object:Gem::Version
194
194
  version: '0'
195
- - !ruby/object:Gem::Dependency
196
- name: bake-bundler
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - ">="
200
- - !ruby/object:Gem::Version
201
- version: '0'
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - ">="
207
- - !ruby/object:Gem::Version
208
- version: '0'
209
- - !ruby/object:Gem::Dependency
210
- name: bake-modernize
211
- requirement: !ruby/object:Gem::Requirement
212
- requirements:
213
- - - ">="
214
- - !ruby/object:Gem::Version
215
- version: '0'
216
- type: :development
217
- prerelease: false
218
- version_requirements: !ruby/object:Gem::Requirement
219
- requirements:
220
- - - ">="
221
- - !ruby/object:Gem::Version
222
- version: '0'
223
195
  - !ruby/object:Gem::Dependency
224
196
  name: bundler
225
197
  requirement: !ruby/object:Gem::Requirement