biruda 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -8
- data/README.md +5 -0
- data/biruda.gemspec +2 -2
- data/lib/biruda.rb +2 -2
- data/lib/biruda/html.rb +9 -6
- data/lib/biruda/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d0c22492c685d5a973a67903e9648e556614e59d
|
4
|
+
data.tar.gz: d55412717c6b6ced1800abcc22dfd34d2432a33c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 104cbdae7899397f70fcb0fdc5d1b22e3c51daefcf45763b599c3414913a457d4bf9a0936ad5a6e721e3e1faf2a95600f66bc2550f0a7a1ccf214a0a2ff2b30e
|
7
|
+
data.tar.gz: 986ab549c317f27c6bcec9d9ff6d505548c5602d97bb084d5a611302bd682c4dec65c1e640c5572409f678388793e45ea7cb11305c7cb693fdec9cdb904900de
|
data/.travis.yml
CHANGED
@@ -1,13 +1,11 @@
|
|
1
1
|
sudo: false
|
2
2
|
language: ruby
|
3
3
|
rvm:
|
4
|
-
- 2.1
|
5
|
-
- 2.2
|
6
4
|
- 2.2.4
|
7
5
|
- 2.3.3
|
8
6
|
|
9
7
|
install:
|
10
|
-
- gem install bundler -v 1.
|
8
|
+
- gem install bundler -v 1.16.0
|
11
9
|
- bundle install --retry=3
|
12
10
|
|
13
11
|
script:
|
@@ -16,8 +14,4 @@ script:
|
|
16
14
|
|
17
15
|
addons:
|
18
16
|
code_climate:
|
19
|
-
repo_token:
|
20
|
-
|
21
|
-
os:
|
22
|
-
- linux
|
23
|
-
- osx
|
17
|
+
repo_token: 5d3255ea9afc89e8f488f92dae45bc9d2fbe29fc27ade6fbcac348e24d51998c
|
data/README.md
CHANGED
@@ -1,4 +1,9 @@
|
|
1
1
|
# Biruda
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/biruda.svg)](https://badge.fury.io/rb/biruda)
|
3
|
+
[![Dependency Status](https://gemnasium.com/badges/github.com/alebian/biruda.svg)](https://gemnasium.com/github.com/alebian/biruda)
|
4
|
+
[![Build Status](https://travis-ci.org/alebian/biruda.svg)](https://travis-ci.org/alebian/biruda)
|
5
|
+
[![Maintainability](https://api.codeclimate.com/v1/badges/f023978999d78fdefb1e/maintainability.svg)](https://codeclimate.com/github/alebian/biruda)
|
6
|
+
[![Test Coverage](https://api.codeclimate.com/v1/badges/f023978999d78fdefb1e/test_coverage.svg)](https://codeclimate.com/github/alebian/biruda)
|
2
7
|
|
3
8
|
Biruda is a simple DSL to build HTML documents.
|
4
9
|
|
data/biruda.gemspec
CHANGED
@@ -19,8 +19,8 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
spec.license = 'MIT'
|
21
21
|
|
22
|
-
spec.add_development_dependency 'bundler', '~> 1.
|
23
|
-
spec.add_development_dependency 'rake', '~>
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
23
|
+
spec.add_development_dependency 'rake', '~> 12.3'
|
24
24
|
spec.add_development_dependency 'rspec', '~> 3.7'
|
25
25
|
spec.add_development_dependency 'byebug', '~> 9.1'
|
26
26
|
spec.add_development_dependency 'rubocop', '~> 0.51'
|
data/lib/biruda.rb
CHANGED
data/lib/biruda/html.rb
CHANGED
@@ -6,31 +6,34 @@ module Biruda
|
|
6
6
|
head title body a abbr acronym address applet area article aside audio b base basefont bdi
|
7
7
|
bdo big blockquote br button canvas caption center cite code col colgroup datalist dd del
|
8
8
|
details dfn dialog dir div dl dt em embed fieldset figcaption figure font footer form frame
|
9
|
-
frameset
|
9
|
+
frameset header hr html i iframe img input ins kbd label legend li link main map mark menu
|
10
10
|
menuitem meta meter nav noframes noscript object ol optgroup option output p param pre
|
11
11
|
progress q rp rt ruby s samp script section select small source span strike strong style sub
|
12
12
|
summary sup table tbody td textarea tfoot th thead time tr track tt u ul var video wbr p
|
13
|
+
h1 h2 h3 h4 h5 h6
|
13
14
|
].freeze
|
14
15
|
|
15
16
|
def initialize
|
16
17
|
@page = '<!DOCTYPE html>'
|
17
18
|
end
|
18
19
|
|
19
|
-
def self.create(&block)
|
20
|
-
new.build(&block)
|
20
|
+
def self.create(options = {}, &block)
|
21
|
+
new.build(options, &block)
|
21
22
|
end
|
22
23
|
|
23
24
|
def to_s
|
24
25
|
@page
|
25
26
|
end
|
26
27
|
|
27
|
-
def build(&block)
|
28
|
+
def build(options = {}, &block)
|
29
|
+
@context = options[:context]
|
28
30
|
html(&block)
|
29
31
|
self
|
30
32
|
end
|
31
33
|
|
32
|
-
def build_tag
|
33
|
-
|
34
|
+
def build_tag(options = {}, &block)
|
35
|
+
@context = options[:context]
|
36
|
+
instance_eval(&block)
|
34
37
|
self
|
35
38
|
end
|
36
39
|
|
data/lib/biruda/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: biruda
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro Bezdjian
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-12-
|
11
|
+
date: 2017-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.16'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.16'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '12.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '12.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|