timeline_rails_helper 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/README.md +22 -4
- data/lib/timeline_rails_helper/helpers.rb +3 -5
- data/lib/timeline_rails_helper/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bdb301727f63585ed95584e8690e65d89f9978552672262058c1382964c82bbf
|
4
|
+
data.tar.gz: 7d2458a463bcd60661e9fd43eda30db06dcf848f32c333ba1e2a17be08415825
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a26c92ffc180a45e563b93522b33b1cf701bead00a0fc0990c6bd137a5a005eb18c56000a3c9f1aff91fd679fb4e987fb63798575af4ca3ba0c16c792f8ee8c
|
7
|
+
data.tar.gz: 4e4f7abdb768e2d0980d18840afac6d223723bffd220225bc7988ddc7e55117adc501b50866ea58127a0e3c26ec3be5a72e8b35543fa6e1569f04de68589497d
|
data/README.md
CHANGED
@@ -41,6 +41,14 @@ $ gem install timeline_rails_helper
|
|
41
41
|
## Usage
|
42
42
|
|
43
43
|
### QQTW (Quickest Quick-start in The West)
|
44
|
+
```html
|
45
|
+
<div id="time_line_rails_helper">
|
46
|
+
<%= timeline_molecules_tag [{title: (DateTime.now - 3.days).strftime('%Y-%m-%d'),
|
47
|
+
body: 'This is a test'},
|
48
|
+
{title: DateTime.now.strftime('%Y-%m-%d'),
|
49
|
+
body: 'This is a test'}] %>
|
50
|
+
</div>
|
51
|
+
```
|
44
52
|
|
45
53
|
```ruby
|
46
54
|
timeline_molecules_tag [{title: (DateTime.now - 3.days).strftime('%Y-%m-%d'),
|
@@ -48,8 +56,7 @@ timeline_molecules_tag [{title: (DateTime.now - 3.days).strftime('%Y-%m-%d'),
|
|
48
56
|
{title: DateTime.now.strftime('%Y-%m-%d'),
|
49
57
|
body: 'This is a test'}]
|
50
58
|
|
51
|
-
# =>
|
52
|
-
# <div class="entries">
|
59
|
+
# => "<div class="entries">
|
53
60
|
# <div class="entry">
|
54
61
|
# <div class="title ">2022-04-13</div>
|
55
62
|
# <div class="body">This is a test</div>
|
@@ -58,8 +65,7 @@ timeline_molecules_tag [{title: (DateTime.now - 3.days).strftime('%Y-%m-%d'),
|
|
58
65
|
# <div class="title ">2022-04-16</div>
|
59
66
|
# <div class="body">This is a test</div>
|
60
67
|
# </div>
|
61
|
-
# </div>
|
62
|
-
# </div>"
|
68
|
+
# </div>"
|
63
69
|
```
|
64
70
|
|
65
71
|
## Development
|
@@ -87,6 +93,18 @@ The gem is available as open source under the terms of the [MIT License](https:/
|
|
87
93
|
|
88
94
|
Everyone interacting in the timeline_rails_helper project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/smapira/timeline_rails_helper/blob/main/CODE_OF_CONDUCT.md).
|
89
95
|
|
96
|
+
## You may enjoy owning other libraries and my company.
|
97
|
+
|
98
|
+
* [routeflagsinc / jma — Bitbucket](https://bitbucket.org/routeflagsinc/jma/src/main/)
|
99
|
+
- for the Japan Meteorological Agency (気象庁) for searching new information simplifies.
|
100
|
+
* [smapira / punch_time — Bitbucket](https://bitbucket.org/smapira/punch_time/src/master/)
|
101
|
+
- Work time calculations using punch clock.
|
102
|
+
* [smapira / rspec-css — Bitbucket](https://bitbucket.org/smapira/rspec-css/src/master/)
|
103
|
+
- Record your test suite's computed CSS during future test runs for deterministic and accurate tests.
|
104
|
+
* [routeflags/timeline_rails_helper: The TimelineRailsHelper provides a timeline_molecules_tag helper to draw a vertical time line usable with vanilla CSS.](https://github.com/routeflags/timeline_rails_helper)
|
105
|
+
* [smapira/acts_as_tree_diagram: ActsAsTreeDiagram extends ActsAsTree to add simple function for draw tree diagram with html.](https://github.com/smapira/acts_as_tree_diagram)
|
106
|
+
* [株式会社旗指物](https://blog.routeflags.com/)
|
107
|
+
|
90
108
|
## Acknowledgments
|
91
109
|
- [CSS by Zed Dash at Codepen](https://codepen.io/z-/pen/bwPBjY)
|
92
110
|
- [rails-timeago](https://github.com/jgraichen/rails-timeago)
|
@@ -10,8 +10,7 @@ module TimelineRailsHelper
|
|
10
10
|
# body: 'This is a test'},
|
11
11
|
# {title: DateTime.now.strftime('%Y-%m-%d'),
|
12
12
|
# body: 'This is a test'}]
|
13
|
-
# =>
|
14
|
-
# <div class=\"entries\">
|
13
|
+
# => "<div class=\"entries\">
|
15
14
|
# <div class=\"entry\">
|
16
15
|
# <div class=\"title \">2022-04-13</div>
|
17
16
|
# <div class=\"body\">This is a test</div>
|
@@ -20,8 +19,7 @@ module TimelineRailsHelper
|
|
20
19
|
# <div class=\"title \">2022-04-16</div>
|
21
20
|
# <div class=\"body\">This is a test</div>
|
22
21
|
# </div>
|
23
|
-
# </div>
|
24
|
-
# </div>"
|
22
|
+
# </div>"
|
25
23
|
#
|
26
24
|
# Available options:
|
27
25
|
# [:+condition+]
|
@@ -36,7 +34,7 @@ module TimelineRailsHelper
|
|
36
34
|
|
37
35
|
wrap_container = ->(x) { "<div class=\"entry\">\n#{x}\n</div>" }
|
38
36
|
content = records.map(&(wrap_tag(condition) >> wrap_container)).join("\n")
|
39
|
-
"<div
|
37
|
+
"<div class=\"entries\">\n#{content}\n</div>"
|
40
38
|
end
|
41
39
|
|
42
40
|
private
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timeline_rails_helper
|
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
|
- smapira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-04-
|
11
|
+
date: 2022-04-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -208,13 +208,13 @@ files:
|
|
208
208
|
- lib/timeline_rails_helper/helpers.rb
|
209
209
|
- lib/timeline_rails_helper/railtie.rb
|
210
210
|
- lib/timeline_rails_helper/version.rb
|
211
|
-
homepage: https://github.com/
|
211
|
+
homepage: https://github.com/routeflags/timeline_rails_helper
|
212
212
|
licenses:
|
213
213
|
- MIT
|
214
214
|
metadata:
|
215
|
-
homepage_uri: https://github.com/
|
216
|
-
source_code_uri: https://github.com/
|
217
|
-
changelog_uri: https://github.com/
|
215
|
+
homepage_uri: https://github.com/routeflags/timeline_rails_helper
|
216
|
+
source_code_uri: https://github.com/routeflags/timeline_rails_helper
|
217
|
+
changelog_uri: https://github.com/routeflags/timeline_rails_helper/blob/main/CHANGELOG.md
|
218
218
|
post_install_message:
|
219
219
|
rdoc_options: []
|
220
220
|
require_paths:
|