blot 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 +4 -4
- data/.travis.yml +9 -0
- data/README.md +47 -0
- data/Rakefile +5 -0
- data/lib/blot/helpers.rb +2 -0
- data/lib/blot/helpers/components.rb +17 -0
- data/lib/blot/version.rb +1 -1
- data/spec/blot/helpers/components_spec.rb +38 -0
- data/spec/blot/helpers_spec.rb +2 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 40ec9dd8103e98137ebae43306be4c20ba59c8b0
|
4
|
+
data.tar.gz: 974631a2ae530c6cebbd169e874ef2b790759a7c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bedd5e530b24bc0d7e8953422d6623b924b401318dfb80a44cc68d9ec0ca491badf2dd9c8a30923e0512bd9320da4cd72c8f536724454a9241e65e2c0b9dfca9
|
7
|
+
data.tar.gz: 5fee898c9c60485a32ab54ae0fd9370bb0ebd46a61f87b236432a908d06ca4d5d29e317c9a64dfeca54f7a65fc3330160ae37594b5230f4f232074772a5343d5
|
data/.travis.yml
ADDED
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Blot
|
2
2
|
|
3
|
+
[![Build Status](https://travis-ci.org/BenMorganIO/blot.svg?branch=travis)](https://travis-ci.org/BenMorganIO/blot)
|
4
|
+
|
3
5
|
Tired of all those tables in those emails?
|
4
6
|
Blot is a DSL that lets you create them with ease and optimize with the Ink email framework.
|
5
7
|
|
@@ -763,6 +765,51 @@ button 'Button Label', '#', size: :button, radius: :round
|
|
763
765
|
</table>
|
764
766
|
```
|
765
767
|
|
768
|
+
### Components
|
769
|
+
|
770
|
+
Components are used to create portions of the ink framework fast.
|
771
|
+
|
772
|
+
#### Section
|
773
|
+
|
774
|
+
```ruby
|
775
|
+
section
|
776
|
+
```
|
777
|
+
|
778
|
+
```html
|
779
|
+
<table class="row">
|
780
|
+
<tr>
|
781
|
+
<td class="wrapper last"></td>
|
782
|
+
</tr>
|
783
|
+
</table>
|
784
|
+
```
|
785
|
+
|
786
|
+
#### Panel Section
|
787
|
+
|
788
|
+
```ruby
|
789
|
+
panel_section
|
790
|
+
```
|
791
|
+
|
792
|
+
```html
|
793
|
+
<table class="row">
|
794
|
+
<tr>
|
795
|
+
<td class="wrapper last">
|
796
|
+
|
797
|
+
<table class="twelve columns">
|
798
|
+
<tr>
|
799
|
+
<td class="panel center">
|
800
|
+
|
801
|
+
<center></center>
|
802
|
+
|
803
|
+
</td>
|
804
|
+
<td class="expander"></td>
|
805
|
+
</tr>
|
806
|
+
</table>
|
807
|
+
|
808
|
+
</td>
|
809
|
+
</tr>
|
810
|
+
</table>
|
811
|
+
```
|
812
|
+
|
766
813
|
## Contributing
|
767
814
|
|
768
815
|
1. Fork it ( https://github.com/[my-github-username]/blot/fork )
|
data/Rakefile
CHANGED
data/lib/blot/helpers.rb
CHANGED
@@ -2,6 +2,7 @@ require 'blot/helpers/layout'
|
|
2
2
|
require 'blot/helpers/grid'
|
3
3
|
require 'blot/helpers/visibility'
|
4
4
|
require 'blot/helpers/button'
|
5
|
+
require 'blot/helpers/components'
|
5
6
|
|
6
7
|
module Blot
|
7
8
|
module Helpers
|
@@ -9,5 +10,6 @@ module Blot
|
|
9
10
|
include Grid
|
10
11
|
include Visibility
|
11
12
|
include Button
|
13
|
+
include Components
|
12
14
|
end
|
13
15
|
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module Blot
|
2
|
+
module Helpers
|
3
|
+
module Components
|
4
|
+
def section
|
5
|
+
row do
|
6
|
+
wrapper(class: 'last') { yield if block_given? }
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def panel_section
|
11
|
+
section do
|
12
|
+
columns(:twelve, class: 'panel center') { yield if block_given? }
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/blot/version.rb
CHANGED
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Blot::Helpers::Components do
|
4
|
+
let(:view) { ActionView::Base.new.extend subject }
|
5
|
+
|
6
|
+
it '#section' do
|
7
|
+
expect(view.section).to eql <<-HTML.compress
|
8
|
+
<table class="row">
|
9
|
+
<tr>
|
10
|
+
<td class="wrapper last"></td>
|
11
|
+
</tr>
|
12
|
+
</table>
|
13
|
+
HTML
|
14
|
+
end
|
15
|
+
|
16
|
+
it '#panel_section' do
|
17
|
+
expect(view.panel_section).to eql <<-HTML.compress
|
18
|
+
<table class="row">
|
19
|
+
<tr>
|
20
|
+
<td class="wrapper last">
|
21
|
+
|
22
|
+
<table class="twelve columns">
|
23
|
+
<tr>
|
24
|
+
<td class="panel center">
|
25
|
+
|
26
|
+
<center></center>
|
27
|
+
|
28
|
+
</td>
|
29
|
+
<td class="expander"></td>
|
30
|
+
</tr>
|
31
|
+
</table>
|
32
|
+
|
33
|
+
</td>
|
34
|
+
</tr>
|
35
|
+
</table>
|
36
|
+
HTML
|
37
|
+
end
|
38
|
+
end
|
data/spec/blot/helpers_spec.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
3
|
describe Blot::Helpers do
|
4
|
-
subject { Class.new.include Blot::Helpers }
|
4
|
+
subject { Class.new.send :include, Blot::Helpers }
|
5
5
|
|
6
6
|
it { should include Blot::Helpers::Layout }
|
7
7
|
it { should include Blot::Helpers::Grid }
|
8
8
|
it { should include Blot::Helpers::Visibility }
|
9
9
|
it { should include Blot::Helpers::Button }
|
10
|
+
it { should include Blot::Helpers::Components }
|
10
11
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben A Morgan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -119,6 +119,7 @@ extra_rdoc_files: []
|
|
119
119
|
files:
|
120
120
|
- ".gitignore"
|
121
121
|
- ".rspec"
|
122
|
+
- ".travis.yml"
|
122
123
|
- CHANGELOG.md
|
123
124
|
- Gemfile
|
124
125
|
- LICENSE.txt
|
@@ -128,12 +129,14 @@ files:
|
|
128
129
|
- lib/blot.rb
|
129
130
|
- lib/blot/helpers.rb
|
130
131
|
- lib/blot/helpers/button.rb
|
132
|
+
- lib/blot/helpers/components.rb
|
131
133
|
- lib/blot/helpers/grid.rb
|
132
134
|
- lib/blot/helpers/layout.rb
|
133
135
|
- lib/blot/helpers/visibility.rb
|
134
136
|
- lib/blot/railtie.rb
|
135
137
|
- lib/blot/version.rb
|
136
138
|
- spec/blot/helpers/button_spec.rb
|
139
|
+
- spec/blot/helpers/components_spec.rb
|
137
140
|
- spec/blot/helpers/grid_spec.rb
|
138
141
|
- spec/blot/helpers/layout_spec.rb
|
139
142
|
- spec/blot/helpers/visibility_spec.rb
|
@@ -162,12 +165,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
162
165
|
version: '0'
|
163
166
|
requirements: []
|
164
167
|
rubyforge_project:
|
165
|
-
rubygems_version: 2.
|
168
|
+
rubygems_version: 2.4.6
|
166
169
|
signing_key:
|
167
170
|
specification_version: 4
|
168
171
|
summary: Blot, a DSL for Ink emails.
|
169
172
|
test_files:
|
170
173
|
- spec/blot/helpers/button_spec.rb
|
174
|
+
- spec/blot/helpers/components_spec.rb
|
171
175
|
- spec/blot/helpers/grid_spec.rb
|
172
176
|
- spec/blot/helpers/layout_spec.rb
|
173
177
|
- spec/blot/helpers/visibility_spec.rb
|