voog-kit 0.5.5 → 0.5.9

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
- SHA1:
3
- metadata.gz: b33a8a8e30fa5c4ea83cf4f54ad6a647c9997bcb
4
- data.tar.gz: 647d2d45ea4bd05f3c2fab602859c78b71540531
2
+ SHA256:
3
+ metadata.gz: 618acbfe55808ed71c5f71a5b8482b41c51bfc178a87689bd0d5736b5482594f
4
+ data.tar.gz: ee3d0879f105a0b8e3602979fb8566ebf48df97e43d329740c0a77d2beb8046a
5
5
  SHA512:
6
- metadata.gz: b8d4f867d818965656ee81b1ae3856b5789d310eb1321e9c06dc5ad4e5cdf5efbb6b2488febb3efa4e39ea849ae4da28cbc58c221135a5d9e5483ed5f277ff3f
7
- data.tar.gz: e3b0ce2956e70fdebcac3a0baef4223a20bac14708a47ca1be0cd521261441c6511d20a46a3ac1df4b306fe00c2a0b3fd9cd72cbd67a557ed9f76ee79224426d
6
+ metadata.gz: dcb51f26bb93bef797da6da4c105a39426281bfe415fa7c629b7b48e76d99d4f6549bf580642bb41df65181d25a33b208a9d29f4829409da250b511a4805d014
7
+ data.tar.gz: 49c675bbb059d73c6e9d9f08a5b7ecd49b07f887f99d24dcb0850da014da21cdf0852a48d78a8e83bf54d50ee7163b6f1078b3a03423bcc6f51dcf4d0959053b
@@ -34,6 +34,11 @@ module Voog::Dtk
34
34
  end
35
35
 
36
36
  def write_manifest(manifest)
37
+ %w(assets layouts).each do |k|
38
+ if manifest[k].is_a?(Array)
39
+ manifest[k].sort! { |a, b| a['file'] <=> b['file'] || 0 }
40
+ end
41
+ end
37
42
  File.open('manifest.json', 'w+', encoding: 'UTF-8') do |file|
38
43
  file << JSON.pretty_generate(manifest)
39
44
  end
@@ -334,7 +339,7 @@ module Voog::Dtk
334
339
  'preview_medium' => "",
335
340
  'preview_small' => "",
336
341
  'author' => "",
337
- 'layouts' => sort_layouts_by_content_type(layouts + components),
342
+ 'layouts' => (layouts + components),
338
343
  'assets' => assets
339
344
  }
340
345
  if @old_manifest
@@ -353,15 +358,6 @@ module Voog::Dtk
353
358
  generate_manifest get_layouts, get_layout_assets
354
359
  end
355
360
 
356
- def sort_layouts_by_content_type(layouts)
357
- # make sure that 'blog' is before 'blog_article' and 'elements' is before 'element'
358
- preferred_order = %w(page blog blog_article elements element error_401 error_404 photoset component)
359
-
360
- layouts.sort do |a, b|
361
- preferred_order.index(a.fetch('content_type')) <=> preferred_order.index(b.fetch('content_type'))
362
- end
363
- end
364
-
365
361
  def generate_manifest(layouts = nil, layout_assets = nil)
366
362
  layouts ||= get_layouts
367
363
  layout_assets ||= get_layout_assets
@@ -400,8 +396,6 @@ module Voog::Dtk
400
396
  }
401
397
  end
402
398
 
403
- manifest[:layouts] = sort_layouts_by_content_type(manifest[:layouts])
404
-
405
399
  manifest[:assets] = layout_assets.inject(Array.new) do |memo, a|
406
400
 
407
401
  # kind is same as asset_type for kinds that are represented in the asset_folders hash, defaults to 'asset'
@@ -478,7 +472,7 @@ module Voog::Dtk
478
472
  open(asset.filename, 'wb') { |file| file.write(asset.data) }
479
473
  else
480
474
  url = URI(asset.public_url)
481
- Net::HTTP.start(url.hostname) do |http|
475
+ Net::HTTP.start(url.hostname, url.port, use_ssl: (url.scheme == 'https')) do |http|
482
476
  resp = http.get(url.path)
483
477
  open(asset.filename, 'wb') { |file| file.write(resp.body) }
484
478
  end
@@ -1,5 +1,5 @@
1
1
  module Voog
2
2
  module Dtk
3
- VERSION = '0.5.5'
3
+ VERSION = '0.5.9'
4
4
  end
5
5
  end
data/voog-kit.gemspec CHANGED
@@ -25,8 +25,9 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency 'rake'
26
26
  spec.add_development_dependency 'rspec'
27
27
  spec.add_development_dependency 'guard-rspec'
28
- spec.add_runtime_dependency 'gli', '2.10.0'
29
28
 
29
+ spec.add_runtime_dependency 'rb-fsevent', '0.9.8'
30
+ spec.add_runtime_dependency 'gli', '2.10.0'
30
31
  spec.add_runtime_dependency 'pry'
31
32
  spec.add_runtime_dependency 'listen', '~> 3.0'
32
33
  spec.add_runtime_dependency 'git'
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: voog-kit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.5
4
+ version: 0.5.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikk Pristavka
8
8
  - Priit Haamer
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-10-31 00:00:00.000000000 Z
12
+ date: 2021-12-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -67,6 +67,20 @@ dependencies:
67
67
  - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: rb-fsevent
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - '='
75
+ - !ruby/object:Gem::Version
76
+ version: 0.9.8
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - '='
82
+ - !ruby/object:Gem::Version
83
+ version: 0.9.8
70
84
  - !ruby/object:Gem::Dependency
71
85
  name: gli
72
86
  requirement: !ruby/object:Gem::Requirement
@@ -244,7 +258,7 @@ homepage: http://voog.com/developers/kit
244
258
  licenses:
245
259
  - MIT
246
260
  metadata: {}
247
- post_install_message:
261
+ post_install_message:
248
262
  rdoc_options: []
249
263
  require_paths:
250
264
  - lib
@@ -259,9 +273,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
259
273
  - !ruby/object:Gem::Version
260
274
  version: '0'
261
275
  requirements: []
262
- rubyforge_project:
263
- rubygems_version: 2.5.1
264
- signing_key:
276
+ rubygems_version: 3.0.8
277
+ signing_key:
265
278
  specification_version: 4
266
279
  summary: Voog Developer Toolkit
267
280
  test_files: