haml-transpiler-server 1.2.0 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a5ea39049fb0826b19849d9adbb8b9a8811d4e95
4
- data.tar.gz: 98134e8dbf3f646ca607948c8f901cfe55ea4aea
3
+ metadata.gz: daa020a547232d1702122d7751ace194a2171ebc
4
+ data.tar.gz: 0caf319110b5113275d0c9221b8d7e7af57353a7
5
5
  SHA512:
6
- metadata.gz: 2b23be9608ee1b37ad537b0e464ee5701175b6f6e72a73c3f9b48c1f5f3ca1cc5b1e56a757c4c5bce05856212e47503577d0a7246999953e7fd086e84aad910b
7
- data.tar.gz: ff3d1b1e57f4065a532c427b7d52679a98dd0b0d71e99625e06303277538cab7d083d983158a912608ee20be7e19c3bf39b4d888d8c0b218e98ae14113426c0f
6
+ metadata.gz: 870d4de746451532634458b006bd08941d06683f33caf3b74dacc970ea4e47657e5953006aaeb02b5a83326f3b2d30a55f3b0cfd2f8c21e3b379ae7c02826717
7
+ data.tar.gz: 9d92a7683a4cde237a8a55c73a5e493d528b6a223135861f163981b9c98b66e5a6e5fab38c99c2773c3c0c9142f4e63f996e6a6c62d5491deef1c14b0b689a31
data/README.md CHANGED
@@ -32,7 +32,11 @@ Usage is simple:
32
32
  It will start an HTTP server on port 5487.
33
33
 
34
34
  Performing an HTTP POST request to `/content` with `content` param set to a
35
- valid HAML string will return the HTML version of it in the body.
35
+ valid HAML string will return the HTML version of it in the body. For example:
36
+
37
+ curl -X POST -F 'content=%div hello world' 'http://127.0.0.1:5487/content'
38
+
39
+ Will output `<div>hello world</div>`.
36
40
 
37
41
  Performing an HTTP POST request to `/path` with `path` param set to a _full_
38
42
  file path with where the server is hosted will return the HTML version of the
@@ -41,6 +45,11 @@ content of the file, if it's valid HAML.
41
45
  If any error is raised, a generic `500` code is reported, with error message
42
46
  and backtrace as body.
43
47
 
48
+ You can also test if the server is running by checking if the `/test` endpoint
49
+ is reachable:
50
+
51
+ curl 'http://127.0.0.1:5487/test'
52
+
44
53
  ## Configuration
45
54
 
46
55
  The gem starts in development/production/test based on `RACK_ENV` environment
@@ -16,6 +16,10 @@ module HamlTranspilerServer
16
16
  set :server_settings, {}.merge(pidfile)
17
17
  end
18
18
 
19
+ get "/test" do
20
+ 204
21
+ end
22
+
19
23
  post "/path" do
20
24
  render_path(params[:path])
21
25
  end
@@ -1,3 +1,3 @@
1
1
  module HamlTranspilerServer
2
- VERSION = "1.2.0".freeze
2
+ VERSION = "1.3.0".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haml-transpiler-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fire-Dragon-DoL
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-12 00:00:00.000000000 Z
11
+ date: 2016-08-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler