simple_calendar-timeslot 0.5.0 → 0.5.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 500f5c006fc960a430d0a699af5dc48ddc9eafab0e3b4a9516b57c2cca11b1ba
4
- data.tar.gz: '031169d10721e7fedbf94c1e797c1ef9f820c6b72eeadb343b049c56c0a56a4c'
3
+ metadata.gz: 43966203ce48c4c965bfb74fb242a926ecc9b5cb34aa0b56426d85410b3f08aa
4
+ data.tar.gz: 848c5d0c11a76c476e99c9376f81b8b708619bbf1ba1aafe93ad9dc87ec41267
5
5
  SHA512:
6
- metadata.gz: e590a993ec1a34e0cd9dc1e7984a63f9da1f440862e96c3fad2b0733f9c69287f594e3a41b059f78d39dec94d6c5a056b766a7f394d31f816e8ae7f9aa9fb038
7
- data.tar.gz: 3f29f75df0d8117c8a14a48768fc8eb2af75375e438b7c709ca816ca70a7bcf93dbfb1eef4a62f1a04b7d928a59df330bd52b2658d8357f573a48ab00340453d
6
+ metadata.gz: 849481225d905b3b962d6f90965324c0645db136c7e2bb5e350b26bca496ba9edf8a5f7409c37cfc4d53e3f3e3bf23d1f0d2716a7d0b25c27ceabcd004ba4369
7
+ data.tar.gz: 7ab1c262be43bc58ad0d3d184c76cf1fa927c58d1156d0c9e110098429f37b2c517b4d636d6c40263cecf4f2663119d284dd3bb3c212582e67cd4487906bd8ce
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.5.1] - 2021-11-15
4
+ ### Fixed
5
+ - Fixed reliance of calendar on legacy function to
6
+ calculate event height
7
+
3
8
  ## [0.5.0] - 2021-11-14
4
9
  - Removed images for the README from the gem, sry :(
5
10
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- simple_calendar-timeslot (0.5.0)
4
+ simple_calendar-timeslot (0.5.1)
5
5
  simple_calendar (~> 2.0)
6
6
 
7
7
  GEM
data/README.md CHANGED
@@ -47,12 +47,17 @@ If you use an SCSS file (`application.scss`), add the following line instead:
47
47
 
48
48
  TODO: Write usage instructions here
49
49
 
50
+ Your model must implement a `start_time` and `end_time` function,
51
+ or you can specify alternatives as options to the call below
52
+ as `attribute: :my_start_time` and `end_attribute: :my_end_time`.
53
+
50
54
  ```erb
51
55
  <%= timeslot_calendar(events: @events,
52
56
  number_of_days: 2,
53
57
  px_per_minute: 1.5,
54
58
  orientation: :horizontal,
55
59
  horizontal_height_px: 250,
60
+ # attribute: :my_start_time,
56
61
  # display_grid: false,
57
62
  # display_bucket_title: :event_type,
58
63
  # bucket_title_size: 30,
@@ -63,9 +63,9 @@ module SimpleCalendar
63
63
  elsif event.send(attribute).to_date < event.send(end_attribute).to_date
64
64
  (event.send(end_attribute).midnight - 60 - event.send(attribute))/60
65
65
  else
66
- event.duration
66
+ (event.send(end_attribute) - event.send(attribute))/60
67
67
  end
68
- minutes * px_per_minute
68
+ minutes * px_per_minute
69
69
  end
70
70
 
71
71
  def event_top_distance(event, day)
@@ -2,6 +2,6 @@
2
2
 
3
3
  module SimpleCalendar
4
4
  module Timeslot
5
- VERSION = "0.5.0"
5
+ VERSION = "0.5.1"
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_calendar-timeslot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kim Laplume
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-14 00:00:00.000000000 Z
11
+ date: 2021-11-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simple_calendar