jekyll-webmention_io 2.5.1 → 2.6.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
  SHA1:
3
- metadata.gz: ad880a1a253e2a3f313cd6dfb24a05cf85069ef8
4
- data.tar.gz: 48d439a154a748181361dcf9f0304d3b421cc7e7
3
+ metadata.gz: 8384ba7ad51bbe18a21f830e90aab4f0c1e4bb33
4
+ data.tar.gz: 95f1cb67e98cac5fdea2e17cd7f33928692d2589
5
5
  SHA512:
6
- metadata.gz: e425bbe97246139db7423446a1851995523eed8892b22b1243745d51d62b8ad0650698ab151f5e097f4945703cb3fa35d8b88ba895443d11d08524fce3aeb9a0
7
- data.tar.gz: 0d2a145d7f148ea68623de9fdf59487f2544aa3284475550ce4df666bcb96a01d829f2271f1283015b222796c04203a448aa3723154d3b740e3dba32df4ede19
6
+ metadata.gz: 5102808f75f46d32984404e669f4074024b0b69606d1902522dab96c58f31dafac6a1342d584e5fc5303062017a71923c78a95ffcbbf49ac7dabc5ba6e2a2988
7
+ data.tar.gz: 78c3a026e344a1ec7f3959309b701cce599ba842ad01f4b9ff92c0cec7ca02bbb2be572e50b14c4e9187c26684caa6a0b5b2a164d1f8ee9aecc3e5cf5405c411
@@ -9,6 +9,12 @@ require 'uglifier'
9
9
 
10
10
  module Jekyll
11
11
  module WebmentionIO
12
+ class JavaScriptFile < StaticFile
13
+ def destination_rel_dir
14
+ Jekyll::WebmentionIO::config['js']['destination'] || '/js/'
15
+ end
16
+ end
17
+
12
18
  using StringInflection
13
19
  class CompileJS < Generator
14
20
 
@@ -57,15 +63,14 @@ module Jekyll
57
63
  javascript = Uglifier.new(uglify_config).compile(javascript)
58
64
  end
59
65
 
60
- # Generate the file in the source folder
61
- source_file_destination = "#{site.config['source']}/#{config['destination']}"
62
- Dir.mkdir( source_file_destination ) unless File.exists?( source_file_destination )
66
+ # Generate the file
63
67
  file_name = 'JekyllWebmentionIO.js'
68
+ source_file_destination = ( config['source'] == false ? Dir.mktmpdir : "#{site.config['source']}/#{config['destination']}" )
69
+ puts source_file_destination
70
+ Dir.mkdir( source_file_destination ) unless File.exists?( source_file_destination )
64
71
  File.open("#{source_file_destination}/#{file_name}", 'w') { |f| f.write( javascript ) }
65
-
66
72
  unless config['deploy'] == false
67
- # Make sure Jekyll picks it up too
68
- js_file = StaticFile.new(site, site.config['source'], config['destination'], file_name)
73
+ js_file = Jekyll::WebmentionIO::JavaScriptFile.new(site, source_file_destination, '', file_name)
69
74
  site.static_files << js_file
70
75
  end
71
76
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module WebmentionIO
3
- VERSION = "2.5.1"
3
+ VERSION = "2.6.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-webmention_io
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.5.1
4
+ version: 2.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Gustafson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-19 00:00:00.000000000 Z
11
+ date: 2017-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll