miyano 0.3.2 → 0.3.3

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: f4c8716a655275f663f46943dfdda0948a225dbecf213dc62daa7d75b572e331
4
- data.tar.gz: 12ee7daa04863ac11b23bb920067e16ee2dc7c1454ad0c42e8f4ef80f03b5198
3
+ metadata.gz: b912321841ef36bb834164300fa381ffa943c93f773e766ed49482c4f0ea1d19
4
+ data.tar.gz: 1b3e414cb745265ab329f7b77614183030520a173132849d391c449827a3ccbf
5
5
  SHA512:
6
- metadata.gz: ce82a1a1026710b080eeee0e422aab0d6b1855cf469904bf02a26f2774b86c17f66fc02aef89fdf3bc760b8b4b8523e8ee692d846437a1fd1229267ba5b6df37
7
- data.tar.gz: 8e42d9496e9dbe82cb1e2aa096269e802b4d33b2490203393a743d741ff2c44c76a20b5acf5e0dfe306cf73ccdc7f894620470942183cd125a29a724c9bcfb58
6
+ metadata.gz: 83f8b7e6c2239a0b2d446e902a257caade068610bbfb7ed41a2fd37264570099a4d96c6c711351c5c8b7a6fa93a2351ddcd5872189995076fac780914dfbf77f
7
+ data.tar.gz: 26e423c77047d9935c7e0bd1b5b198b488dfda80c34f799645c930d2d60bb6fde80706eb0695c291f91ed6f9615733d5149183ecf066185ddde4c7eb2a62a941
@@ -14,8 +14,9 @@ module Miyano
14
14
 
15
15
  # the name of the zip file maybe different from the name of zip dir
16
16
  # i.e. first zip as `foo.zip`, the zip dir is `foo`, then rename to `bar.zip`, the zip dir still remains `foo`
17
- zipdir = File.dirname bearnote.entries[0].name
17
+ #zipdir = File.dirname bearnote.entries[0].name
18
18
  #zipdir = zipdir.force_encoding "UTF-8"
19
+ zipdir = getZipDir bearnote.entries[0].name
19
20
  assets = bearnote.glob("#{zipdir}/assets/*")
20
21
  assets.each do |asset|
21
22
  dir = "_site/#{name}/assets"
@@ -49,5 +50,12 @@ module Miyano
49
50
  template = Tilt.new "layout/post.html.erb"
50
51
  template.render post
51
52
  end
53
+
54
+ def getZipDir(str)
55
+ while(str.include? "/")
56
+ str = File.dirname str
57
+ end
58
+ return str
59
+ end
52
60
  end
53
61
  end
@@ -1,3 +1,3 @@
1
1
  module Miyano
2
- VERSION = "0.3.2"
2
+ VERSION = "0.3.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miyano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - wuusn
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-03-31 00:00:00.000000000 Z
11
+ date: 2018-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler