slight-lang 1.2.1.3 → 1.2.3
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/example/default_engine.rb +7 -7
- data/lib/slight.rb +2 -2
- data/lib/slight/template.rb +1 -1
- data/spec/bin_spec.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3bfae7847ff9e178418e5e860a4d08e21201cc5
|
4
|
+
data.tar.gz: d2c1273e44e6dccd525cb1253ca383cae46228b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5ec15d6fd19f9abba0a3ed2ba4d78fc656ac073a12449494a660fbb03db2c148d060d3d255c0a461f85c6fa1ffddce223b15b3c2e8fd7b3814b2b485e62dab4c
|
7
|
+
data.tar.gz: 26264863dca6e2115a9656c0b236d0cd1c753dbc4391fd0d6cf178e81bad25f47ba0025b539c6ecf4e02ba83333b955cdeef4010da7cbcd67abb7ad02dbbd5fb
|
data/example/default_engine.rb
CHANGED
@@ -16,15 +16,15 @@ module Slight
|
|
16
16
|
elsif ARGV[0] == "-v" then
|
17
17
|
io_out.puts VERSION
|
18
18
|
elsif ARGV[0] == "build" then
|
19
|
-
path = File.expand_path(".", __FILE__)
|
20
|
-
Dir.entries(
|
21
|
-
|
19
|
+
path = Dir.pwd#File.expand_path(".", __FILE__)
|
20
|
+
Dir.entries(path).select { |e|
|
21
|
+
e.split(".")[1] == "slight"
|
22
22
|
}.each{ |src_file|
|
23
|
-
buffer << default_engine.render(src_file)
|
23
|
+
buffer << default_engine.render(path + "/" + src_file)
|
24
24
|
if buffer != nil and buffer != "" then
|
25
25
|
fn = ARGV[1] || src_file.split(".")[0] << ".htm"
|
26
|
-
io_out.puts "Source File [#{src_file}] => Dest File [#{fn}]"
|
27
|
-
io_out = File.open("#{fn}", 'w') if ARGV.size == 2
|
26
|
+
io_out.puts "[Slight] Source File [#{src_file}] => Dest File [#{fn}]"
|
27
|
+
io_out = File.open("#{path}/#{fn}", 'w') if ARGV.size == 2
|
28
28
|
io_out.puts buffer
|
29
29
|
buffer.clear
|
30
30
|
end
|
@@ -41,7 +41,7 @@ module Slight
|
|
41
41
|
end
|
42
42
|
rescue Exception => err
|
43
43
|
STDERR.puts "[Slight] " + err.message
|
44
|
-
|
44
|
+
STDERR.puts [err.inspect, err.backtrace.join("\n")].join("\n")
|
45
45
|
exit 1
|
46
46
|
end
|
47
47
|
|
data/lib/slight.rb
CHANGED
@@ -3,10 +3,10 @@ require 'slight/engine'
|
|
3
3
|
module Slight
|
4
4
|
# Slight version string
|
5
5
|
# @api public
|
6
|
-
VERSION = '1.2.
|
6
|
+
VERSION = '1.2.3'
|
7
7
|
# 1.0.0 => Basic Template features | 201703
|
8
8
|
# 1.0.5 => Support Tilt | 201704
|
9
9
|
# 1.1.0 => Doc Update | 201705
|
10
10
|
# 1.2.0 => Add CONST | 20180101
|
11
|
-
# 1.2.
|
11
|
+
# 1.2.3 => Fix CLI | 20180217
|
12
12
|
end
|
data/lib/slight/template.rb
CHANGED
data/spec/bin_spec.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slight-lang
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- oliver.yu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-18 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A light and sweet template language
|
14
14
|
email:
|