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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3279041ec9840d79c987db9b2d0f45d15091f8fb
4
- data.tar.gz: cbcc082aba1156e9acbb65130229129d51a8ae43
3
+ metadata.gz: e3bfae7847ff9e178418e5e860a4d08e21201cc5
4
+ data.tar.gz: d2c1273e44e6dccd525cb1253ca383cae46228b1
5
5
  SHA512:
6
- metadata.gz: a3fc5c42ffeebf63e5e7b133ece60a8ab5a76edb1972489846fd0836a55a8d067cf39f87bc35e6695a6fd7f5596f6d22bd88ea12584566422329d2374eee2323
7
- data.tar.gz: aad5b68b976ed3011583601e843ff42db406d169ce05be756c8ce9c735829a2eb821fb3e961bbd241bcfccbc2c8393034fe22f2096f99ebd97be16d6275ac8e4
6
+ metadata.gz: 5ec15d6fd19f9abba0a3ed2ba4d78fc656ac073a12449494a660fbb03db2c148d060d3d255c0a461f85c6fa1ffddce223b15b3c2e8fd7b3814b2b485e62dab4c
7
+ data.tar.gz: 26264863dca6e2115a9656c0b236d0cd1c753dbc4391fd0d6cf178e81bad25f47ba0025b539c6ecf4e02ba83333b955cdeef4010da7cbcd67abb7ad02dbbd5fb
@@ -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(File.dirname(path)).map { |e|
21
- ["slight", "slight.rb"].include? e.split["."][1]
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
- #STDERR.puts [err.inspect, err.backtrace.join("\n")].join("\n")
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.1.3'
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.1.1 => Fix CLI | 20180217
11
+ # 1.2.3 => Fix CLI | 20180217
12
12
  end
@@ -28,7 +28,7 @@ module Slight
28
28
  end
29
29
 
30
30
  begin
31
- @dsl.instance_eval(src_data, src_file, __LINE__ - 20)
31
+ @dsl.instance_eval(src_data, src_file, __LINE__ - 30)
32
32
  rescue => ex
33
33
  raise DSLException.new(ex.message)
34
34
  end
data/spec/bin_spec.rb CHANGED
@@ -0,0 +1,5 @@
1
+ #require_relative "../bin/slight"
2
+
3
+ #RSpec.describe Slight do
4
+ # it ""
5
+ #end
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.1.3
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-17 00:00:00.000000000 Z
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: