nydp-html 0.0.4 → 0.0.5

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: 498abe88db9496b98de631070661e49620f9bbff
4
- data.tar.gz: b011a38450a0967b474ca4ffea4d1226ef49ecc9
3
+ metadata.gz: 582943cc0cc6d9903b8b0d02c8e73abc15537867
4
+ data.tar.gz: 80f5a959d8673b4cba45780ddfaa8ffd3082173b
5
5
  SHA512:
6
- metadata.gz: ff390f6679e54c5ba3ff4cded41251ea6db143ba928c525e95c2f3bc2cbf71aa79cfd476f40fe894dd10c1a0a7123d35081b9c38b84b0b4ac24ed93a0fa332ee
7
- data.tar.gz: af095fb067e5dc32d28382b4d7339ead1c2ab8d95c1fdfe49a799e2812f6bfc40bb274e97ccfd01294ca9bf2aeba1213652d64c3e5b25555cda360f387f59486
6
+ metadata.gz: 41533c53511e93911b827cecb15a063241d011ac15877711fdb88c2f3692185a1f887a58f7f69e019cb791bf6130fbfe5f7896c5e6bcff2fa26848a5d119c702
7
+ data.tar.gz: b58e56fecc8f5642fe08c9cb2ffce0311f1d76e397bb93ecc98c46c4d3d28edbe6be7e38b430bf076cb210926dcb81f4ce7190ec4ded9713acbe49ce9e233cf1
@@ -2,6 +2,7 @@ require "haml"
2
2
  require "redcloth"
3
3
  require "nydp"
4
4
  require "nydp/literal"
5
+ require "nydp/builtin"
5
6
  require "nydp/html/version"
6
7
 
7
8
  module Nydp
@@ -32,6 +33,7 @@ module Nydp
32
33
  end
33
34
 
34
35
  class HamlToHtml
36
+ include Nydp::Builtin::Base
35
37
  def normalise_indentation txt
36
38
  lines = txt.split(/\n/).select { |line| line.strip != "" }
37
39
  return txt if lines.length == 0
@@ -55,13 +57,14 @@ module Nydp
55
57
  end
56
58
  end
57
59
 
58
- def invoke vm, args
60
+ def builtin_invoke vm, args
59
61
  vm.push_arg Nydp::StringAtom.new convert_from_haml(args.car.to_s)
60
62
  end
61
63
  end
62
64
 
63
65
  class TextileToHtml
64
- def invoke vm, args
66
+ include Nydp::Builtin::Base
67
+ def builtin_invoke vm, args
65
68
  src = args.car.to_s
66
69
  rc = RedCloth.new(src)
67
70
  rc.no_span_caps = true
@@ -1,5 +1,5 @@
1
1
  module Nydp
2
2
  module Html
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -19,13 +19,12 @@ Gem::Specification.new do |spec|
19
19
  spec.require_paths = ["lib"]
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.7"
22
- spec.add_development_dependency "rake", "~> 10.0"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
23
 
24
24
  spec.add_development_dependency 'rspec', '~> 2.9'
25
25
  spec.add_development_dependency 'rspec_numbering_formatter'
26
26
 
27
- spec.add_dependency 'nydp'
28
- spec.add_dependency 'haml'
27
+ spec.add_dependency 'nydp', '~> 0.0.12'
28
+ spec.add_dependency 'haml', '~> 4.0'
29
29
  spec.add_dependency 'RedCloth'
30
-
31
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nydp-html
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Conan Dalton
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-11 00:00:00.000000000 Z
11
+ date: 2015-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -70,30 +70,30 @@ dependencies:
70
70
  name: nydp
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 0.0.12
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 0.0.12
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: haml
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: '4.0'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: '4.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: RedCloth
99
99
  requirement: !ruby/object:Gem::Requirement