css_naked_day_rails 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/css_naked_day_rails.rb +14 -0
- metadata +43 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0da1589c4d629882033f9cc364486267c3d6318d67449a42584fced3e9959a30
|
4
|
+
data.tar.gz: f9a295386a3dfe2bed03bad6ef27623a1458f148020e4faaf2ed3bdb678eb89f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 23cdbbbc2ff63f6c20365e97992463de9bb2d8e0b741042d9b01e443ecb82103526696f0d21ef881cc9c8b6aa49a68da9851a2096fb6ed5289eafb4cb23c3ede
|
7
|
+
data.tar.gz: 239f144d46d7a7d086cc440e2bde48484bd7a5ffd773321ea3bd7303bb173c006b06413e8b4bfeec7b1b3ab4ad0dbf5fae641a3ae9b89a2a2dea1049fdf20fea
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module ApplicationHelper
|
2
|
+
# CSS Naked Day is supposed to last for 48 hours because it's April 9th
|
3
|
+
# somewhere in the world for that period of time. This is the best I've
|
4
|
+
# come up with based on the furthest UTC offsets on April 9th.
|
5
|
+
# https://css-naked-day.github.io
|
6
|
+
# https://en.wikipedia.org/wiki/List_of_UTC_time_offsets
|
7
|
+
def css_naked_day?
|
8
|
+
css_naked_day = Date.parse('April 9').to_time
|
9
|
+
css_naked_day_earliest = css_naked_day.beginning_of_day.utc - 11.hours
|
10
|
+
css_naked_day_latest = css_naked_day.end_of_day.utc + 13.hours
|
11
|
+
|
12
|
+
Time.zone.now.between?(css_naked_day_earliest, css_naked_day_latest)
|
13
|
+
end
|
14
|
+
end
|
metadata
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: css_naked_day_rails
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Daniel Sellergren
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-04-07 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Provides a Rails helper for CSS Naked Day.
|
14
|
+
email: dss@hey.com
|
15
|
+
executables: []
|
16
|
+
extensions: []
|
17
|
+
extra_rdoc_files: []
|
18
|
+
files:
|
19
|
+
- lib/css_naked_day_rails.rb
|
20
|
+
homepage: https://github.com/danielsellergren/css_naked_day_rails
|
21
|
+
licenses:
|
22
|
+
- MIT
|
23
|
+
metadata: {}
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - ">="
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
requirements: []
|
39
|
+
rubygems_version: 3.1.2
|
40
|
+
signing_key:
|
41
|
+
specification_version: 4
|
42
|
+
summary: CSS Naked Day!
|
43
|
+
test_files: []
|