troy 0.0.29 → 0.0.30
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/troy/cli.rb +6 -2
- data/lib/troy/hacks.rb +8 -1
- data/lib/troy/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1ca6c214054dc6d8cb88b4349a206039a1801b8f
|
4
|
+
data.tar.gz: 10e53d220e793bdc7b2d06bb93187b6cec74b412
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7533d4bd9e779e3b7a195b51885adfedfa5a9e787d1827f37ff381a6f51d29bb110c3e9b7fac2f9c64f23f68e93e788ce1f8a7a921ce8742ef931621f72af398
|
7
|
+
data.tar.gz: 34133fdad8c3e40d6b0f0c5e291075b396a3396219f708bea0096ff746351381ac5a453dee1a90eb5816aec105f08f51ccc279644052972b96559cf445ae52a8
|
data/lib/troy/cli.rb
CHANGED
@@ -20,11 +20,15 @@ module Troy
|
|
20
20
|
if options[:assets]
|
21
21
|
site.export_assets
|
22
22
|
site.export_files
|
23
|
-
|
23
|
+
end
|
24
|
+
|
25
|
+
if options[:file]
|
24
26
|
options[:file].each do |file|
|
25
27
|
site.export_pages(file)
|
26
28
|
end
|
27
|
-
|
29
|
+
end
|
30
|
+
|
31
|
+
if !options[:assets] && !options[:file]
|
28
32
|
site.export
|
29
33
|
end
|
30
34
|
end
|
data/lib/troy/hacks.rb
CHANGED
@@ -1,7 +1,14 @@
|
|
1
|
+
require "digest/sha1"
|
2
|
+
|
1
3
|
module HtmlPress
|
4
|
+
CONTENT_CACHE = {}
|
5
|
+
|
2
6
|
def self.js_compressor (text, options = nil)
|
3
7
|
options ||= {}
|
4
8
|
options[:output] ||= {:inline_script => true}
|
5
|
-
|
9
|
+
|
10
|
+
hash = Digest::SHA1.hexdigest(text)
|
11
|
+
CONTENT_CACHE[hash] ||= MultiJs.compile(text, options).gsub(/;$/,'')
|
12
|
+
CONTENT_CACHE[hash]
|
6
13
|
end
|
7
14
|
end
|
data/lib/troy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: troy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.30
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-10-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -259,7 +259,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
259
259
|
version: '0'
|
260
260
|
requirements: []
|
261
261
|
rubyforge_project:
|
262
|
-
rubygems_version: 2.4.5
|
262
|
+
rubygems_version: 2.4.5.1
|
263
263
|
signing_key:
|
264
264
|
specification_version: 4
|
265
265
|
summary: A static site generator
|