hamlit 2.8.3 → 2.8.4

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: 2cee8b3d62bf9479cc9787e47bba7c4cdc7e51df
4
- data.tar.gz: 9845f57cf95715759f6e9ff5e51f7aba5d2ccfd0
3
+ metadata.gz: cd3f09d4c281dad806365ba6f07754fb4fc54726
4
+ data.tar.gz: 07f9f38c16759a75fae17526c27aa1c6adf1e9d6
5
5
  SHA512:
6
- metadata.gz: 71ca2927c45f44b7ec808d514f99ca522251813afd026962d4ebee7cb4944bd6b2157a334a6c7d3ca48273324ba7b8728bc24575fee2772aa9583b88647549b6
7
- data.tar.gz: 7f6788475f225077b149d34b01884e6689cd862ded4dc7e40024a8949061990d987bb6da6f33c362fc4c7b5022a384d19c0d60c38aef78164c8f1298c7eb03eb
6
+ metadata.gz: e6c31b6e27e6a020f621305bac57b0a1a1098f529d510958f8aeaf794ba4bb7189c890dd94466b1300efbd63d1bdcafc483e23296f0e4123c987d4093a4c68cf
7
+ data.tar.gz: 513ac74aee322a79078187a47f959694784c188845d4f372f5ccc01f6b0765f8b892a648e4523faa86e25758026567270ea4bbfc440174c39f6ea5dd37a69d02
data/CHANGELOG.md CHANGED
@@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. This
4
4
  project adheres to [Semantic Versioning](http://semver.org/). This change log is based upon
5
5
  [keep-a-changelog](https://github.com/olivierlacan/keep-a-changelog).
6
6
 
7
+ ## [2.8.4](https://github.com/k0kubun/hamlit/compare/v2.8.3...v2.8.4) - 2017-06-23
8
+
9
+ ### Added
10
+
11
+ - Allow filename `-` to read input from STDIN for `hamlit [parse|temple|compile|render]`
12
+ [#113](https://github.com/k0kubun/hamlit/issues/113). *Thanks to @gfx*
13
+
7
14
  ## [2.8.3](https://github.com/k0kubun/hamlit/compare/v2.8.2...v2.8.3) - 2017-06-19
8
15
 
9
16
  ### Added
data/lib/hamlit/cli.rb CHANGED
@@ -55,8 +55,16 @@ module Hamlit
55
55
  end
56
56
  end
57
57
 
58
+ def read_file(file)
59
+ if file == '-'
60
+ STDIN.read
61
+ else
62
+ File.read(file)
63
+ end
64
+ end
65
+
58
66
  def generate_code(file)
59
- template = File.read(file)
67
+ template = read_file(file)
60
68
  if options[:actionview]
61
69
  require 'action_view'
62
70
  require 'action_view/base'
@@ -77,7 +85,7 @@ module Hamlit
77
85
  end
78
86
 
79
87
  def generate_ast(file)
80
- template = File.read(file)
88
+ template = read_file(file)
81
89
  Hamlit::Parser.new(engine_options).call(template)
82
90
  end
83
91
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module Hamlit
3
- VERSION = '2.8.3'
3
+ VERSION = '2.8.4'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hamlit
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.8.3
4
+ version: 2.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Takashi Kokubun
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-06-19 00:00:00.000000000 Z
11
+ date: 2017-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: temple
@@ -368,7 +368,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
368
368
  version: '0'
369
369
  requirements: []
370
370
  rubyforge_project:
371
- rubygems_version: 2.6.11
371
+ rubygems_version: 2.5.2
372
372
  signing_key:
373
373
  specification_version: 4
374
374
  summary: High Performance Haml Implementation