troy 0.0.18 → 0.0.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +15 -16
- data/lib/troy/cli.rb +17 -10
- data/lib/troy/site.rb +6 -2
- 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: 594779990ed0c25724af5e88b9aa589d8158bca8
|
4
|
+
data.tar.gz: 0600b6ba996af55e7b16d1599cc518c063ec41aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e936857fb5ba38884b882b02a303dc4f10f968e7d047b190f357f539a8a60b71acae3bda5427665616faaa01c7bce91afc5c2c11585fb5b01ed7e034eebda72
|
7
|
+
data.tar.gz: d1b4ca100191510a1bfe04de68e0bd2b288942b49d2ca733666df613d28f0cf40571b8ceeb81db22ecfadd6500a147a7886621b9b029818975a9fef7c7716686
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
troy (0.0.
|
4
|
+
troy (0.0.19)
|
5
5
|
builder
|
6
6
|
html_press
|
7
7
|
i18n
|
@@ -15,29 +15,28 @@ PATH
|
|
15
15
|
GEM
|
16
16
|
remote: https://rubygems.org/
|
17
17
|
specs:
|
18
|
-
builder (3.2.
|
18
|
+
builder (3.2.2)
|
19
19
|
css_press (0.3.2)
|
20
20
|
csspool-st (= 3.1.2)
|
21
21
|
json
|
22
22
|
csspool-st (3.1.2)
|
23
23
|
diff-lcs (1.2.4)
|
24
|
-
execjs (
|
25
|
-
|
26
|
-
|
27
|
-
html_press (0.8.1)
|
24
|
+
execjs (2.0.1)
|
25
|
+
hike (1.2.3)
|
26
|
+
html_press (0.8.2)
|
28
27
|
htmlentities
|
29
28
|
multi_css (>= 0.1.0)
|
30
|
-
multi_js
|
29
|
+
multi_js (>= 0.1.0)
|
31
30
|
htmlentities (4.3.1)
|
32
|
-
i18n (0.6.
|
33
|
-
json (1.
|
31
|
+
i18n (0.6.5)
|
32
|
+
json (1.8.0)
|
34
33
|
multi_css (0.1.0)
|
35
34
|
css_press
|
36
|
-
multi_js (0.0
|
37
|
-
uglifier
|
38
|
-
multi_json (1.
|
35
|
+
multi_js (0.1.0)
|
36
|
+
uglifier (~> 2)
|
37
|
+
multi_json (1.8.0)
|
39
38
|
rack (1.5.2)
|
40
|
-
redcarpet (
|
39
|
+
redcarpet (3.0.0)
|
41
40
|
rspec (2.13.0)
|
42
41
|
rspec-core (~> 2.13.0)
|
43
42
|
rspec-expectations (~> 2.13.0)
|
@@ -46,15 +45,15 @@ GEM
|
|
46
45
|
rspec-expectations (2.13.0)
|
47
46
|
diff-lcs (>= 1.1.3, < 2.0)
|
48
47
|
rspec-mocks (2.13.1)
|
49
|
-
sass (3.2.
|
50
|
-
sprockets (2.
|
48
|
+
sass (3.2.10)
|
49
|
+
sprockets (2.10.0)
|
51
50
|
hike (~> 1.2)
|
52
51
|
multi_json (~> 1.0)
|
53
52
|
rack (~> 1.0)
|
54
53
|
tilt (~> 1.1, != 1.3.0)
|
55
54
|
thor (0.18.1)
|
56
55
|
tilt (1.4.1)
|
57
|
-
uglifier (2.1
|
56
|
+
uglifier (2.2.1)
|
58
57
|
execjs (>= 0.3.0)
|
59
58
|
multi_json (~> 1.0, >= 1.0.2)
|
60
59
|
|
data/lib/troy/cli.rb
CHANGED
@@ -14,6 +14,18 @@ module Troy
|
|
14
14
|
super
|
15
15
|
end
|
16
16
|
|
17
|
+
options assets: :boolean, file: :string
|
18
|
+
desc "export", "Export files"
|
19
|
+
def export
|
20
|
+
if options[:assets]
|
21
|
+
site.export_assets
|
22
|
+
elsif options[:file]
|
23
|
+
site.export_pages(options[:file])
|
24
|
+
else
|
25
|
+
site.export
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
17
29
|
desc "new SITE", "Generate a new site structure"
|
18
30
|
def new(path)
|
19
31
|
generator = Generator.new
|
@@ -21,16 +33,6 @@ module Troy
|
|
21
33
|
generator.invoke_all
|
22
34
|
end
|
23
35
|
|
24
|
-
desc "export", "Generate static files"
|
25
|
-
def export
|
26
|
-
Troy::Site.new(Dir.pwd).export
|
27
|
-
end
|
28
|
-
|
29
|
-
desc "watch", "Watch and auto export site"
|
30
|
-
def watch
|
31
|
-
Troy::Site.new(Dir.pwd).export
|
32
|
-
end
|
33
|
-
|
34
36
|
desc "version", "Display Troy version"
|
35
37
|
map %w(-v --version) => :version
|
36
38
|
def version
|
@@ -43,5 +45,10 @@ module Troy
|
|
43
45
|
handler = Rack::Handler::Thin rescue Rack::Handler::WEBrick
|
44
46
|
handler.run Troy::Server.new(File.join(Dir.pwd, "public")), :Port => options[:port]
|
45
47
|
end
|
48
|
+
|
49
|
+
private
|
50
|
+
def site
|
51
|
+
@site ||= Troy::Site.new(Dir.pwd)
|
52
|
+
end
|
46
53
|
end
|
47
54
|
end
|
data/lib/troy/site.rb
CHANGED
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.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
version: '0'
|
215
215
|
requirements: []
|
216
216
|
rubyforge_project:
|
217
|
-
rubygems_version: 2.0
|
217
|
+
rubygems_version: 2.1.0
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
220
|
summary: A static site generator
|