spina-conferences-primer_theme 0.2.4 → 0.3.0

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: 22d47fcfce152343cb9baa7ec78661b6c65d4e3704cbd706c61b176c8eaa645f
4
- data.tar.gz: 6278037a4f3ebc25de33fc412b5fa42702f3a5839447472b7bec85a149f22520
3
+ metadata.gz: 3f9332dab27a0db7ba980280a95c67f5277362a85b5786bd552a4ff9337b5a6f
4
+ data.tar.gz: 6cb511d37aecdd415ffc56576562d92a65c4d4c848e4e60dfba8eb94449dd2c9
5
5
  SHA512:
6
- metadata.gz: d4a6d4b275de914475fd02a4a6a91e26c5ef5a3aa87cc2d030d472dfd1e51b9763e54071bdb787319f0efc656cd12c822f416dec2ec940d643e57acc38043db9
7
- data.tar.gz: '099156869d9fbe3e677eb5a4e8f48e8dc75be819f1c65c6bd39256d2563f9c29f36e54350875a574374cc7ce8579d9d213a83c6d8276239833b30d6bab7b47ae'
6
+ metadata.gz: e3fa1e8800cf378145d9a136919fa22c780231717f9af981eb73e7c741176158cab2e0975b719f94535a70fff986bf80aa83f71c37f64c0ca828528e0dbb6983
7
+ data.tar.gz: 1ed5d9d97805e85b5a9580b7b26ebdf65c7406ba3756bbf59b9631810f5e5ceac5091c5b601a5e486ba0f6629a530a706a53fd352746113fea758700dcfa0812
@@ -10,12 +10,18 @@ module Spina
10
10
 
11
11
  def index
12
12
  @conferences = Admin::Conferences::Conference.sorted.includes(institutions: [:logo])
13
- respond_to :html, :ics
13
+ respond_to do |format|
14
+ format.html
15
+ format.ics { render body: @conferences.to_ics }
16
+ end
14
17
  end
15
18
 
16
19
  def show
17
20
  add_breadcrumb @conference.name
18
- respond_to :html, :ics
21
+ respond_to do |format|
22
+ format.html
23
+ format.ics { render body: @conference.to_ics }
24
+ end
19
25
  end
20
26
 
21
27
  private
@@ -23,11 +23,12 @@ module Spina
23
23
  end
24
24
  end
25
25
 
26
- def calendar(name:, &block)
27
- # noinspection SpellCheckingInspection
28
- block ||= proc { '' }
29
- Icalendar::Calendar.new.tap { |calendar| calendar.x_wr_calname = name }
30
- .then(&:to_ical).then { |calendar| calendar.insert(calendar.index('END:VCALENDAR'), capture(&block)) }
26
+ def calendar(name:)
27
+ Icalendar::Calendar.new
28
+ .tap { |calendar| calendar.x_wr_calname = name }
29
+ .tap { |calendar| yield(calendar) }
30
+ .tap(&:publish)
31
+ .then(&:to_ical)
31
32
  end
32
33
  end
33
34
  end
@@ -2,5 +2,5 @@
2
2
  = render_breadcrumbs(builder: Spina::Conferences::PrimerTheme::Breadcrumbs::Builder)
3
3
 
4
4
  = render template: 'layouts/spina/conferences/primer_theme/application',
5
- locals: { author: current_account.name, description: strip_tags(@presentation.abstract), title: @presentation.name,
5
+ locals: { author: current_account.name, description: @presentation.abstract.to_plain_text, title: @presentation.name,
6
6
  seo_title: @presentation.name }
@@ -8,4 +8,5 @@
8
8
  = render(Primer::BaseComponent.new(tag: :address, display: :inline)) { event.location }
9
9
  = render Primer::FlexItemComponent.new(flex_auto: true, col: [nil, nil, 8, nil]) do
10
10
  = render(Primer::HeadingComponent.new(tag: :h3, mb: 1)) { event.name }
11
- = render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) { event.description.try(:html_safe) }
11
+ = render(Primer::TextComponent.new(tag: :div, color: :text_secondary)) do
12
+ = event.description
@@ -1 +1,2 @@
1
- = render(Primer::MarkdownComponent.new(my: 4)) { abstract.html_safe }
1
+ = render(Primer::MarkdownComponent.new(my: 4)) do
2
+ = abstract
@@ -3,7 +3,7 @@
3
3
  module Spina
4
4
  module Conferences
5
5
  module PrimerTheme
6
- VERSION = '0.2.4'
6
+ VERSION = '0.3.0'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spina-conferences-primer_theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Malčić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-04-16 00:00:00.000000000 Z
11
+ date: 2021-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: babel-transpiler
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 2.0.0
103
+ version: 2.1.0
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 2.0.0
110
+ version: 2.1.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: capybara
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -321,22 +321,17 @@ files:
321
321
  - app/views/spina/application/_navigation_item.html.haml
322
322
  - app/views/spina/application/_text.html.haml
323
323
  - app/views/spina/conferences/primer_theme/conferences/_conference.html.haml
324
- - app/views/spina/conferences/primer_theme/conferences/_conference.ics.erb
325
324
  - app/views/spina/conferences/primer_theme/conferences/_event.html.haml
326
- - app/views/spina/conferences/primer_theme/conferences/_event.ics.erb
327
325
  - app/views/spina/conferences/primer_theme/conferences/_events.html.haml
328
326
  - app/views/spina/conferences/primer_theme/conferences/_header.html.haml
329
327
  - app/views/spina/conferences/primer_theme/conferences/_institution.html.haml
330
328
  - app/views/spina/conferences/primer_theme/conferences/_institution_logo.html.haml
331
329
  - app/views/spina/conferences/primer_theme/conferences/_presentation.html.haml
332
- - app/views/spina/conferences/primer_theme/conferences/_presentation.ics.erb
333
330
  - app/views/spina/conferences/primer_theme/conferences/_presentation_type.html.haml
334
331
  - app/views/spina/conferences/primer_theme/conferences/_presentations.html.haml
335
332
  - app/views/spina/conferences/primer_theme/conferences/_submission_flash.html.haml
336
333
  - app/views/spina/conferences/primer_theme/conferences/index.html.haml
337
- - app/views/spina/conferences/primer_theme/conferences/index.ics.erb
338
334
  - app/views/spina/conferences/primer_theme/conferences/show.html.haml
339
- - app/views/spina/conferences/primer_theme/conferences/show.ics.erb
340
335
  - app/views/spina/conferences/primer_theme/kaminari/_gap.html.haml
341
336
  - app/views/spina/conferences/primer_theme/kaminari/_next_page.html.haml
342
337
  - app/views/spina/conferences/primer_theme/kaminari/_page.html.haml
@@ -1 +0,0 @@
1
- <%= conference.to_event.to_ical -%>
@@ -1 +0,0 @@
1
- <%= event.to_event.to_ical -%>
@@ -1 +0,0 @@
1
- <%= presentation.to_event.to_ical -%>
@@ -1,3 +0,0 @@
1
- <%= calendar name: current_account.name do -%>
2
- <%= render partial: 'conference', collection: @conferences, cached: true -%>
3
- <% end %>
@@ -1,5 +0,0 @@
1
- <%= calendar name: @conference.name do -%>
2
- <%= render partial: 'conference', object: @conference, cached: true -%>
3
- <%= render partial: 'presentation', collection: @conference.presentations, cached: true -%>
4
- <%= render partial: 'event', collection: @conference.events, cached: true -%>
5
- <% end %>