kamiflex 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +15 -9
- data/lib/kamiflex/basic_elements.rb +6 -0
- data/lib/kamiflex/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e7fe613294e762518f6e238a008e743a92d963e2ff5c2c94303a57a0fa7b397
|
4
|
+
data.tar.gz: e26144f0e5b2afce3deb2d72390cad843d3cd405e42fbed33d99aca58b71b4fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3959e66bbc7ed8c128f380c451ff9783ab2a56b4b8bf71065ee0dde73f924e7dd60836ec63c85e1ddf59ab1b1920e780cc9c2ff644c7b62f9912b2f210c06b60
|
7
|
+
data.tar.gz: 293534b2bccf13af06a856e395790ba4697f4296012e63c8d35604372eff1d5d8705694cc9b035c4ae4020ac7ffcb3824db12d9e0c8594ffd00c3ef27f18eb2a
|
data/README.md
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# Kamiflex
|
2
|
-
provide a pretty DSL to build your flex message like this:
|
2
|
+
Kamiflex provide a pretty DSL to build your [flex message of line messaging api](https://developers.line.biz/en/docs/messaging-api/using-flex-messages/) like this:
|
3
3
|
|
4
|
-
#### in ruby
|
4
|
+
#### in pure ruby
|
5
5
|
``` ruby
|
6
|
-
#
|
6
|
+
# example/todos_index.rb
|
7
7
|
require 'kamiflex'
|
8
8
|
|
9
9
|
@todos = [
|
@@ -21,7 +21,7 @@ require 'kamiflex'
|
|
21
21
|
}
|
22
22
|
]
|
23
23
|
|
24
|
-
|
24
|
+
json = Kamiflex.build(self) do
|
25
25
|
bubble do
|
26
26
|
body do
|
27
27
|
horizontal_box do
|
@@ -43,8 +43,14 @@ puts Kamiflex.build(self) do
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
end
|
46
|
+
|
47
|
+
puts json
|
46
48
|
```
|
47
49
|
|
50
|
+
The render result looks like this:
|
51
|
+
|
52
|
+
![](image/todos_index.png)
|
53
|
+
|
48
54
|
#### in rails
|
49
55
|
``` ruby
|
50
56
|
# todos/index.line.erb
|
@@ -72,12 +78,9 @@ end
|
|
72
78
|
end )%>
|
73
79
|
```
|
74
80
|
|
75
|
-
|
76
|
-
|
81
|
+
I will make a template name `flex` for rails in the future.
|
77
82
|
|
78
|
-
|
79
|
-
|
80
|
-
I will add a template name `flex` for rails in the future.
|
83
|
+
With this template, it's more clear then `erb`.
|
81
84
|
|
82
85
|
``` ruby
|
83
86
|
# todos/index.line.flex
|
@@ -110,5 +113,8 @@ Add this line to your application's Gemfile:
|
|
110
113
|
gem 'kamiflex'
|
111
114
|
```
|
112
115
|
|
116
|
+
## Author
|
117
|
+
Create by [etrex](https://etrex.tw)
|
118
|
+
|
113
119
|
## License
|
114
120
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/lib/kamiflex/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kamiflex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- etrex kuo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|