candl 0.1.4 → 0.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +41 -4
  3. data/Rakefile +1 -1
  4. data/app/assets/config/candle_manifest.js +2 -2
  5. data/app/assets/javascripts/{candle → candl}/application.js +0 -0
  6. data/app/assets/javascripts/{candle → candl}/calendar.coffee +0 -0
  7. data/app/assets/stylesheets/{candle → candl}/application.scss +0 -0
  8. data/app/assets/stylesheets/{candle → candl}/calendar.scss +0 -0
  9. data/app/controllers/{candle → candl}/application_controller.rb +1 -1
  10. data/app/controllers/{candle → candl}/calendar_controller.rb +2 -2
  11. data/app/helpers/{candle → candl}/application_helper.rb +1 -1
  12. data/app/helpers/{candle → candl}/calendar_helper.rb +1 -1
  13. data/app/jobs/{candle → candl}/application_job.rb +1 -1
  14. data/app/mailers/{candle → candl}/application_mailer.rb +1 -1
  15. data/app/models/{candle → candl}/application_record.rb +1 -1
  16. data/app/views/candle/calendar/_agenda.slim +2 -2
  17. data/app/views/candle/calendar/_frame.slim +6 -7
  18. data/app/views/candle/calendar/_month.slim +7 -7
  19. data/app/views/candle/calendar/show.slim +1 -1
  20. data/app/views/layouts/candl/application.html.erb +16 -0
  21. data/config/routes.rb +1 -1
  22. data/lib/{candle → candl}/agenda_model.rb +1 -1
  23. data/lib/{candle → candl}/engine.rb +3 -3
  24. data/lib/{candle → candl}/event_loader_model.rb +7 -2
  25. data/lib/{candle → candl}/month_model.rb +1 -1
  26. data/lib/candl/version.rb +3 -0
  27. data/lib/candl.rb +9 -0
  28. data/lib/tasks/{candle_tasks.rake → candl_tasks.rake} +1 -1
  29. data/spec/{candle_spec.rb → candl_spec.rb} +41 -41
  30. data/spec/dummy/app/assets/config/manifest.js +1 -1
  31. data/spec/dummy/app/assets/javascripts/application.js +1 -1
  32. data/spec/dummy/app/assets/stylesheets/application.css +1 -1
  33. data/spec/dummy/app/views/sample/index-old.html.erb +1 -1
  34. data/spec/dummy/app/views/sample/show.slim +1 -1
  35. data/spec/dummy/config/application.rb +1 -1
  36. data/spec/dummy/config/environments/production.rb +94 -94
  37. data/spec/dummy/config/routes.rb +1 -1
  38. metadata +28 -27
  39. data/app/views/layouts/candle/application.html.erb +0 -16
  40. data/lib/candle/version.rb +0 -3
  41. data/lib/candle.rb +0 -9
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 23b22b8e041b3528a994dd2471a21583ea7b9c7c6e2bac72b62c8a22bfccdfff
4
- data.tar.gz: 7fc03d75fcc96ee0fdcdfb14b6d2adc47d8f205ce8ffbf85dad1a74afd989cad
3
+ metadata.gz: 6cfbd460e92519f419a3991ea2d262511351e8f1dde3881660326a579820f88b
4
+ data.tar.gz: 51af14b7e89684f5877e41a00d1899e3ca3f8deadde218cf486504f68110f6a4
5
5
  SHA512:
6
- metadata.gz: 111ce4bb0f4c532e09963134bcbe5585d80f9e7e0ee299833f7e98417a601104bef9c294731187225f3e20bcd3401f564237fc155164a1288964796cd5180615
7
- data.tar.gz: 5483a9e5505ce0792060b084c462d1b22262620e3217004622f62ee13d17c80ae18a56dbad4ea5888dfa0001bf7042861fd7d51f3750a25bba8e1970748964fe
6
+ metadata.gz: '038bdea768c5a4f83ecf3f9c5d17f10dff50adde8ba147c01e78b0e53961fb829ee43219c3b1882296b3248606bddb5061558e68dbe0c8b59479c08ab58a90df'
7
+ data.tar.gz: 066fdb81b06cc826be4cfb58d9b3595306543318ca4a379737a243e5171f62788a047370af72f69259353a06b71baa88d1dee4ac624b3cb3a983eb8919645b20
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Candle
1
+ # Candl
2
2
 
3
3
  This gem helps load and display a calendar from google calendar in an agenda or month style view.
4
4
 
@@ -6,7 +6,7 @@ This gem helps load and display a calendar from google calendar in an agenda or
6
6
 
7
7
  The gem consists of mainly three models. One - the event loader model - is focusing on loading the events from the google server via a restfull api and an api key. The other two are the agenda and month model wich offer functionality to organize the data for an agenda or month view. Next to the models are the views wich come with a "_frame.slim" view. This view can be included in a host view as a partial. This way one can display a calendar inside of another page. The "_frame.slim" is the entry point that prepares the model and view for the respective view type (month/agenda). (It does not come with a seperate week view.)
8
8
 
9
- Find an example inclusion of the _frame.slim partial in the show.slim file in candle/spec/dummy/app/views/sample/show.slim.
9
+ Find an example inclusion of the _frame.slim partial in the show.slim file in candl/spec/dummy/app/views/sample/show.slim.
10
10
 
11
11
  The main steps to use this gem are:
12
12
  - Initialize an agenda or month model object with a config that specifies these values:
@@ -45,7 +45,7 @@ Then once configured you can load the events inside of the current timeframe and
45
45
  Add this line to your application's Gemfile:
46
46
 
47
47
  ```ruby
48
- gem 'candle'
48
+ gem 'candl'
49
49
  ```
50
50
 
51
51
  And then execute:
@@ -55,7 +55,44 @@ $ bundle
55
55
 
56
56
  Or install it yourself as:
57
57
  ```bash
58
- $ gem install candle
58
+ $ gem install candl
59
+ ```
60
+
61
+ Additionally:
62
+ Require the library in the ./config/application.rb of your ruby on rails application.
63
+ ```ruby
64
+ # ./config/application.rb
65
+ require 'candl'
66
+ ```
67
+
68
+ In the view you want the calendar to appear initialize a configuration hash like so:
69
+ ```slim
70
+ - config = { \
71
+ calendar: { \
72
+ google_calendar_api_host_base_path: "https://www.googleapis.com/calendar/v3/calendars/", \
73
+ calendar_id: "grhnk1uaotql6gv2dkf9ldmqjc@group.calendar.google.com", \
74
+ api_key: "AIzaSyD1UIlX0n4-DnY3hSoTkeTZFbbsNO2g67E" \
75
+ }, \
76
+ agenda: { \
77
+ display_day_count: 14, \
78
+ days_shift_coefficient: 7 \
79
+ }, \
80
+ month: { \
81
+ summary_teaser_length_in_characters: 42, \
82
+ delta_start_of_weekday_from_sunday: 1 \
83
+ }, \
84
+ general: { \
85
+ maps_query_host: "https://www.google.de/maps", \
86
+ maps_query_parameter: "q", \
87
+ cache_update_interval_in_s: 7200 \
88
+ } \
89
+ }
90
+ ```
91
+ In this example done in a view that uses .slim instead of .erb but in the end config is just a ruby hash that needs to have the right key's and sensible values for them.
92
+
93
+ Then at the position in your view where the calendar is supposed to show itself:
94
+ ```slim
95
+ = render partial: "candl/calendar/frame", locals: { config: config }
59
96
  ```
60
97
 
61
98
  ## Contributing
data/Rakefile CHANGED
@@ -8,7 +8,7 @@ require 'rdoc/task'
8
8
 
9
9
  RDoc::Task.new(:rdoc) do |rdoc|
10
10
  rdoc.rdoc_dir = 'rdoc'
11
- rdoc.title = 'Candle'
11
+ rdoc.title = 'Candl'
12
12
  rdoc.options << '--line-numbers'
13
13
  rdoc.rdoc_files.include('README.md')
14
14
  rdoc.rdoc_files.include('lib/**/*.rb')
@@ -1,2 +1,2 @@
1
- //= link_directory ../javascripts/candle .js
2
- //= link_directory ../stylesheets/candle .css
1
+ //= link_directory ../javascripts/candl .js
2
+ //= link_directory ../stylesheets/candl .css
@@ -1,4 +1,4 @@
1
- module Candle
1
+ module Candl
2
2
  class ApplicationController < ActionController::Base
3
3
  protect_from_forgery with: :exception
4
4
  end
@@ -1,6 +1,6 @@
1
- require_dependency "candle/application_controller"
1
+ require_dependency "candl/application_controller"
2
2
 
3
- module Candle
3
+ module Candl
4
4
  class CalendarController < ApplicationController
5
5
  def show
6
6
  end
@@ -1,4 +1,4 @@
1
- module Candle
1
+ module Candl
2
2
  module ApplicationHelper
3
3
  end
4
4
  end
@@ -1,4 +1,4 @@
1
- module Candle
1
+ module Candl
2
2
  module CalendarHelper
3
3
  end
4
4
  end
@@ -1,4 +1,4 @@
1
- module Candle
1
+ module Candl
2
2
  class ApplicationJob < ActiveJob::Base
3
3
  end
4
4
  end
@@ -1,4 +1,4 @@
1
- module Candle
1
+ module Candl
2
2
  class ApplicationMailer < ActionMailer::Base
3
3
  default from: 'from@example.com'
4
4
  layout 'mailer'
@@ -1,4 +1,4 @@
1
- module Candle
1
+ module Candl
2
2
  class ApplicationRecord < ActiveRecord::Base
3
3
  self.abstract_class = true
4
4
  end
@@ -2,7 +2,7 @@
2
2
  - unless calendar_agenda.agenda_grouped_events.empty?
3
3
  .agenda
4
4
  - calendar_agenda.agenda_grouped_events.keys.sort.each do |date|
5
- .row_head class=Candle::AgendaModel.emphasize_date(date, Date.today, 'today', 'not_today') = l(date, format: '%A, %e. %B %Y')
5
+ .row_head class=Candl::AgendaModel.emphasize_date(date, Date.today, 'today', 'not_today') = l(date, format: '%A, %e. %B %Y')
6
6
  - calendar_agenda.agenda_grouped_events[date].each do |event|
7
7
 
8
8
  .event_shell
@@ -12,7 +12,7 @@
12
12
  span.time = event.dtstart.localtime.strftime('%k:%M')
13
13
  - else
14
14
  span.time &#9654;
15
- span.flex_wrap_it.breakable.summary{ title = Candle::AgendaModel.summary_title(event) } == event.summary.to_s.force_encoding("UTF-8")
15
+ span.flex_wrap_it.breakable.summary{ title = Candl::AgendaModel.summary_title(event) } == event.summary.to_s.force_encoding("UTF-8")
16
16
  i class="material-icons auto_margin_left" arrow_drop_down
17
17
 
18
18
  .details style="display: none;"
@@ -1,4 +1,3 @@
1
-
2
1
  - events_error_free = true
3
2
  - is_month = params[:v] != 'a'
4
3
  - current_shift_factor = params[:s] || 0
@@ -8,19 +7,19 @@
8
7
  - if is_month
9
8
  - begin
10
9
  - month = Rails.cache.fetch("#month/#{current_shift_factor}/#{date_today}", expires_in: update_interval) do
11
- - Candle::MonthModel.new(config, current_shift_factor, date_today)
10
+ - Candl::MonthModel.new(config, current_shift_factor, date_today)
12
11
  - rescue => exception
13
12
  - events_error_free = false
14
- - puts "ERROR - GOT EXCEPTION:"
13
+ - puts "\033[31mERROR - GOT EXCEPTION:\033[0m"
15
14
  - puts exception
16
15
  / Maybe there is a beter way to signal the exception?
17
16
  - else
18
17
  - begin
19
18
  - agenda = Rails.cache.fetch("#agenda/#{current_shift_factor}/#{date_today}", expires_in: update_interval) do
20
- - Candle::AgendaModel.new(config, current_shift_factor, date_today)
19
+ - Candl::AgendaModel.new(config, current_shift_factor, date_today)
21
20
  - rescue => exception
22
21
  - events_error_free = false
23
- - puts "ERROR - GOT EXCEPTION:"
22
+ - puts "\033[31mERROR - GOT EXCEPTION:\033[0m"
24
23
  - puts exception
25
24
  / Maybe there is a beter way to signal the exception?
26
25
 
@@ -51,9 +50,9 @@
51
50
 
52
51
  .calendar
53
52
  - if is_month
54
- = render partial: "candle/calendar/month", locals: { calendar_month: model }
53
+ = render partial: "candl/calendar/month", locals: { calendar_month: model }
55
54
  - else
56
- = render partial: "candle/calendar/agenda", locals: { calendar_agenda: model }
55
+ = render partial: "candl/calendar/agenda", locals: { calendar_agenda: model }
57
56
 
58
57
  - else
59
58
  .error_message Der Kalender kann wegen einer kurzzeitigen technischen Störung gerade nicht angezeigt werden. Bitte versuchen Sie es in einer Weile noch einmal.
@@ -9,11 +9,11 @@
9
9
  th.weekday_name_header scope="col" = l(date, format: '%A')
10
10
 
11
11
  tbody
12
- - Candle::MonthModel.weeks_in_months_view_dates(calendar_month.view_dates).times do |row|
12
+ - Candl::MonthModel.weeks_in_months_view_dates(calendar_month.view_dates).times do |row|
13
13
  tr.day_row
14
14
  - 7.times do |collumn|
15
15
  - current_day = calendar_month.view_dates[7 * row + collumn]
16
- td class=Candle::MonthModel.emphasize_date(current_day, Date.today, 'bg-info', 'bg-default')
16
+ td class=Candl::MonthModel.emphasize_date(current_day, Date.today, 'bg-info', 'bg-default')
17
17
  - if current_day.day == 1
18
18
  .day_head = current_day.day.to_s + '. ' + l(current_day, format: '%b.')
19
19
  - else
@@ -26,7 +26,7 @@
26
26
  - collumn = 0
27
27
  - while collumn < 7 do
28
28
  - current_day = calendar_month.view_dates[7 * row + collumn]
29
- - current_event = Candle::MonthModel.find_best_fit_for_day(calendar_month.view_dates[7 * row], current_day, weekly_multiday_event_heap)
29
+ - current_event = Candl::MonthModel.find_best_fit_for_day(calendar_month.view_dates[7 * row], current_day, weekly_multiday_event_heap)
30
30
  - if current_event
31
31
  - weekly_multiday_event_heap.delete_if{ |event| event.uid == current_event.uid }
32
32
 
@@ -36,12 +36,12 @@
36
36
 
37
37
  - if current_event_length_within_current_week > 0
38
38
  td.small_padding colspan=current_event_length_within_current_week
39
- .multiday_event.onclick_open_backdrop class=Candle::MonthModel.multiday_event_cutoff(current_event.dtstart < current_day, current_event.dtend > (calendar_month.view_dates[7 * row + 6] + 1.day), 'multiday_event_leftcut', 'multiday_event_bothcut', 'multiday_event_rightcut')
39
+ .multiday_event.onclick_open_backdrop class=Candl::MonthModel.multiday_event_cutoff(current_event.dtstart < current_day, current_event.dtend > (calendar_month.view_dates[7 * row + 6] + 1.day), 'multiday_event_leftcut', 'multiday_event_bothcut', 'multiday_event_rightcut')
40
40
 
41
41
  .snowflake_popover[data-placement="bottom" data-toggle="popover" data-container="body" type="button" data-html="true" href="#"]
42
42
 
43
43
  div
44
- span.summary.breakable{ title = Candle::MonthModel.summary_title(current_event) } == current_event.summary.to_s.force_encoding("UTF-8").truncate(calendar_month.summary_teaser_length().to_i, seperator: ' ')
44
+ span.summary.breakable{ title = Candl::MonthModel.summary_title(current_event) } == current_event.summary.to_s.force_encoding("UTF-8").truncate(calendar_month.summary_teaser_length().to_i, seperator: ' ')
45
45
 
46
46
  .popover_content.hide
47
47
  .close_span
@@ -81,7 +81,7 @@
81
81
  tr.events_row
82
82
  - 7.times do |collumn|
83
83
  - current_day = calendar_month.view_dates[7 * row + collumn]
84
- td class=Candle::MonthModel.emphasize_date(current_day, Date.today, 'bg-info', 'bg-default')
84
+ td class=Candl::MonthModel.emphasize_date(current_day, Date.today, 'bg-info', 'bg-default')
85
85
 
86
86
  - if calendar_month.grouped_events[current_day]
87
87
  - calendar_month.grouped_events[current_day].sort_by{ |event| event.dtstart.localtime }.each do |event|
@@ -91,7 +91,7 @@
91
91
 
92
92
  div
93
93
  span.time = event.dtstart.localtime.strftime('%k:%M')
94
- span.summary.breakable{ title = Candle::MonthModel.summary_title(event) } == event.summary.to_s.force_encoding("UTF-8").truncate(calendar_month.summary_teaser_length.to_i, seperator: ' ')
94
+ span.summary.breakable{ title = Candl::MonthModel.summary_title(event) } == event.summary.to_s.force_encoding("UTF-8").truncate(calendar_month.summary_teaser_length.to_i, seperator: ' ')
95
95
 
96
96
  .popover_content.hide
97
97
  .close_span
@@ -1,3 +1,3 @@
1
- div Hello, this is the index/show view of the "candle" rails engine gem.
1
+ div Hello, this is the index/show view of the "candl" rails engine gem.
2
2
 
3
3
  div You should not see this page. The calendar is supposed to be integrated via a partial (_frame.slim) wich will then render the calendar view inside of the host-apps page.
@@ -0,0 +1,16 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>Candl</title>
5
+ <%= csrf_meta_tags %>
6
+ <%= csp_meta_tag %>
7
+
8
+ <%= stylesheet_link_tag "candl/application", media: "all" %>
9
+ <%= javascript_include_tag "candl/application" %>
10
+ </head>
11
+ <body>
12
+
13
+ <%= yield %>
14
+
15
+ </body>
16
+ </html>
data/config/routes.rb CHANGED
@@ -1,3 +1,3 @@
1
- Candle::Engine.routes.draw do
1
+ Candl::Engine.routes.draw do
2
2
  root "calendar#show"
3
3
  end
@@ -1,4 +1,4 @@
1
- module Candle
1
+ module Candl
2
2
  class AgendaModel
3
3
  # Attributes one needs to access from the "outside"
4
4
  attr_reader :display_day_count
@@ -5,10 +5,10 @@ require "material_icons"
5
5
  require "bootstrap-sass"
6
6
  require "rails_autolink"
7
7
 
8
- module Candle
8
+ module Candl
9
9
  class Engine < ::Rails::Engine
10
- isolate_namespace Candle
11
- initializer 'candle.assets' do |app|
10
+ isolate_namespace Candl
11
+ initializer 'candl.assets' do |app|
12
12
  %w(stylesheets javascripts).each do |sub|
13
13
  app.config.assets.paths << root.join('app', 'assets', sub).to_s
14
14
  end
@@ -1,7 +1,7 @@
1
1
  require 'net/http'
2
2
  require 'uri'
3
3
 
4
- module Candle
4
+ module Candl
5
5
  class EventLoaderModel
6
6
  Event ||= Struct.new(:dtstart, :dtend, :summary, :description, :location, :uid)
7
7
  def self.Event(dtstart, dtend, summary, description, location, uid)
@@ -41,7 +41,12 @@ module Candle
41
41
 
42
42
  requested_events = JSON.parse(Net::HTTP.get(URI.parse(google_test_path)))
43
43
 
44
- restructured_events = requested_events["items"].map{ |e| e["start"]["dateTime"] != nil ? Event.new(DateTime.parse(e["start"]["dateTime"]), DateTime.parse(e["end"]["dateTime"]), e["summary"], e["description"], e["location"], e["id"]) : Event.new(Date.parse(e["start"]["date"]), Date.parse(e["end"]["date"]), e["summary"], e["description"], e["location"], e["id"]) }
44
+ if requested_events["items"] != nil
45
+ restructured_events = requested_events["items"].map{ |e| e["start"]["dateTime"] != nil ? Event.new(DateTime.parse(e["start"]["dateTime"]), DateTime.parse(e["end"]["dateTime"]), e["summary"], e["description"], e["location"], e["id"]) : Event.new(Date.parse(e["start"]["date"]), Date.parse(e["end"]["date"]), e["summary"], e["description"], e["location"], e["id"]) }
46
+ else
47
+ # raise Exception.new("Calendar event request failed and responded with:\n #{requested_events}")
48
+ raise "Calendar event request failed and responded with:\n #{requested_events}"
49
+ end
45
50
 
46
51
  restructured_events.to_a
47
52
  end
@@ -1,4 +1,4 @@
1
- module Candle
1
+ module Candl
2
2
  class MonthModel
3
3
  # Attributes one needs to access from the "outside"
4
4
  attr_reader :delta_start_of_weekday_from_sunday
@@ -0,0 +1,3 @@
1
+ module Candl
2
+ VERSION = '0.1.5'
3
+ end
data/lib/candl.rb ADDED
@@ -0,0 +1,9 @@
1
+ require "candl/engine"
2
+
3
+ require "candl/event_loader_model"
4
+ require "candl/agenda_model"
5
+ require "candl/month_model"
6
+
7
+ module Candl
8
+ # Code is all found in the models and views.
9
+ end
@@ -1,4 +1,4 @@
1
1
  # desc "Explaining what the task does"
2
- # task :candle do
2
+ # task :candl do
3
3
  # # Task goes here
4
4
  # end
@@ -23,16 +23,16 @@ google_base_path = test_config[:calendar][:google_calendar_api_host_base_path]
23
23
  calendar_id = test_config[:calendar][:calendar_id]
24
24
  api_key = test_config[:calendar][:api_key]
25
25
 
26
- describe Candle do
26
+ describe Candl do
27
27
  it "has a version number" do
28
- expect(Candle::VERSION).not_to be nil
28
+ expect(Candl::VERSION).not_to be nil
29
29
  end
30
30
 
31
31
  context "Json parsing" do
32
32
  let(:current_shift_factor) { 0 }
33
33
  let(:fake_today) { Date.parse("2019-01-07") }
34
34
 
35
- let(:agenda) { Candle::AgendaModel.new(test_config, current_shift_factor, fake_today) }
35
+ let(:agenda) { Candl::AgendaModel.new(test_config, current_shift_factor, fake_today) }
36
36
 
37
37
  it "Test agenda config" do
38
38
  expect(agenda.display_day_count).to eq(14)
@@ -42,24 +42,24 @@ describe Candle do
42
42
  end
43
43
 
44
44
 
45
- RSpec.describe Candle::EventLoaderModel do
45
+ RSpec.describe Candl::EventLoaderModel do
46
46
  context "Get AGNEDA events" do
47
47
  let(:current_shift_factor) { 0 }
48
48
  let(:fake_today) { Date.parse("2019-01-07") }
49
- let(:agenda) { Candle::AgendaModel.new(test_config, current_shift_factor, fake_today) }
49
+ let(:agenda) { Candl::AgendaModel.new(test_config, current_shift_factor, fake_today) }
50
50
  let(:current_start_date) { agenda.current_start_date(current_shift_factor, fake_today) }
51
51
  let(:current_end_date) { agenda.current_end_date(current_shift_factor, fake_today) }
52
52
 
53
- let(:unspread_event_1) { Candle::EventLoaderModel::Event.new(DateTime.parse("2019-01-08T17:00:00"), DateTime.parse("2019-01-08T19:30:00"), "summary_1", "description_1", "location_1", "uid_1") }
54
- let(:unspread_event_2) { Candle::EventLoaderModel::Event.new(Date.parse("2019-01-08"), Date.parse("2019-01-11"), "summary_2", "description_2", "location_2", "uid_2") }
55
- let(:unspread_event_3) { Candle::EventLoaderModel::Event.new(Date.parse("2019-01-09"), Date.parse("2019-01-11"), "summary_2", "description_2", "location_2", "uid_2") }
56
- let(:unspread_event_4) { Candle::EventLoaderModel::Event.new(Date.parse("2019-01-10"), Date.parse("2019-01-11"), "summary_2", "description_2", "location_2", "uid_2") }
53
+ let(:unspread_event_1) { Candl::EventLoaderModel::Event.new(DateTime.parse("2019-01-08T17:00:00"), DateTime.parse("2019-01-08T19:30:00"), "summary_1", "description_1", "location_1", "uid_1") }
54
+ let(:unspread_event_2) { Candl::EventLoaderModel::Event.new(Date.parse("2019-01-08"), Date.parse("2019-01-11"), "summary_2", "description_2", "location_2", "uid_2") }
55
+ let(:unspread_event_3) { Candl::EventLoaderModel::Event.new(Date.parse("2019-01-09"), Date.parse("2019-01-11"), "summary_2", "description_2", "location_2", "uid_2") }
56
+ let(:unspread_event_4) { Candl::EventLoaderModel::Event.new(Date.parse("2019-01-10"), Date.parse("2019-01-11"), "summary_2", "description_2", "location_2", "uid_2") }
57
57
 
58
58
  let(:unspread_events) { [unspread_event_1, unspread_event_2] }
59
59
  let(:spread_events) { [unspread_event_3, unspread_event_4] }
60
60
 
61
61
  it "Spread multiday events" do
62
- expect(Candle::EventLoaderModel.spread_multiday_events(unspread_events, current_start_date, current_end_date)).to eq(spread_events)
62
+ expect(Candl::EventLoaderModel.spread_multiday_events(unspread_events, current_start_date, current_end_date)).to eq(spread_events)
63
63
  end
64
64
  end
65
65
 
@@ -67,16 +67,16 @@ RSpec.describe Candle::EventLoaderModel do
67
67
  let(:from) { Date.parse("2019-01-01") }
68
68
  let(:to) { Date.parse("2019-01-31") }
69
69
  it "Build google request path" do
70
- expect(Candle::EventLoaderModel.build_google_request_path(google_base_path, calendar_id, api_key, from, to)).to eq("#{google_base_path}#{calendar_id}/events?key=#{api_key}&singleEvents=true&orderBy=startTime&timeMin=#{from}&timeMax=#{to}")
70
+ expect(Candl::EventLoaderModel.build_google_request_path(google_base_path, calendar_id, api_key, from, to)).to eq("#{google_base_path}#{calendar_id}/events?key=#{api_key}&singleEvents=true&orderBy=startTime&timeMin=#{from}&timeMax=#{to}")
71
71
  end
72
72
  end
73
73
  end
74
74
 
75
75
 
76
- RSpec.describe Candle::AgendaModel do
76
+ RSpec.describe Candl::AgendaModel do
77
77
  let(:current_shift_factor) { 0 }
78
78
  let(:fake_today) { Date.parse("2019-01-07") }
79
- let(:agenda) { Candle::AgendaModel.new(test_config, current_shift_factor, fake_today) }
79
+ let(:agenda) { Candl::AgendaModel.new(test_config, current_shift_factor, fake_today) }
80
80
  let(:page_path) { "page.host" }
81
81
 
82
82
  context "Helper functionality" do
@@ -102,10 +102,10 @@ RSpec.describe Candle::AgendaModel do
102
102
  expect(agenda.current_shift_for_month(4, Date.parse("2019-01-08"))).to eq(1)
103
103
  end
104
104
  it "emphasized date" do
105
- expect(Candle::AgendaModel.emphasize_date(Date.parse("2019-01-08"), Date.parse("2019-01-08"), "emphasized", "regular")).to eq("emphasized")
105
+ expect(Candl::AgendaModel.emphasize_date(Date.parse("2019-01-08"), Date.parse("2019-01-08"), "emphasized", "regular")).to eq("emphasized")
106
106
  end
107
107
  it "regular date" do
108
- expect(Candle::AgendaModel.emphasize_date(Date.parse("2019-01-08"), Date.parse("2019-01-09"), "emphasized", "regular")).to eq("regular")
108
+ expect(Candl::AgendaModel.emphasize_date(Date.parse("2019-01-08"), Date.parse("2019-01-09"), "emphasized", "regular")).to eq("regular")
109
109
  end
110
110
  end
111
111
 
@@ -132,10 +132,10 @@ RSpec.describe Candle::AgendaModel do
132
132
 
133
133
  context "Month/Agenda view toggle:" do
134
134
  let(:fake_today) { Date.parse("2019-01-07") }
135
- let(:date_month_start) { Candle::MonthModel.current_month_start(current_shift_factor, fake_today) }
136
- let(:date_month_end) { Candle::MonthModel.current_month_end(current_shift_factor, fake_today) }
135
+ let(:date_month_start) { Candl::MonthModel.current_month_start(current_shift_factor, fake_today) }
136
+ let(:date_month_end) { Candl::MonthModel.current_month_end(current_shift_factor, fake_today) }
137
137
 
138
- let(:month) { Candle::MonthModel.new(test_config, current_shift_factor, fake_today) }
138
+ let(:month) { Candl::MonthModel.new(test_config, current_shift_factor, fake_today) }
139
139
  let(:months_view_dates) { month.generate_months_view_dates(date_month_start, date_month_end) }
140
140
 
141
141
  let(:events) { month.month_events(months_view_dates.first, months_view_dates.last) }
@@ -150,13 +150,13 @@ RSpec.describe Candle::AgendaModel do
150
150
  end
151
151
 
152
152
 
153
- RSpec.describe Candle::MonthModel do
153
+ RSpec.describe Candl::MonthModel do
154
154
  let(:current_shift_factor) { 0 }
155
155
  let(:fake_today) { Date.parse("2019-01-07") }
156
- let(:date_month_start) { Candle::MonthModel.current_month_start(current_shift_factor, fake_today) }
157
- let(:date_month_end) { Candle::MonthModel.current_month_end(current_shift_factor, fake_today) }
156
+ let(:date_month_start) { Candl::MonthModel.current_month_start(current_shift_factor, fake_today) }
157
+ let(:date_month_end) { Candl::MonthModel.current_month_end(current_shift_factor, fake_today) }
158
158
 
159
- let(:month) { Candle::MonthModel.new(test_config, current_shift_factor, fake_today) }
159
+ let(:month) { Candl::MonthModel.new(test_config, current_shift_factor, fake_today) }
160
160
  let(:months_view_dates) { month.generate_months_view_dates(date_month_start, date_month_end) }
161
161
 
162
162
  let(:page_path) { "http://page.path/" }
@@ -169,11 +169,11 @@ RSpec.describe Candle::MonthModel do
169
169
 
170
170
  let(:first_weekday) { Date.parse("2019-01-07") }
171
171
  let(:day) { Date.parse("2019-01-08") }
172
- let(:event_heap) { [Candle::EventLoaderModel::Event.new(Date.parse("2019-01-08"), Date.parse("2019-01-11"), "s_1", "d_1", "l_1", "u_1"), Candle::EventLoaderModel::Event.new(Date.parse("2019-01-08"), Date.parse("2019-01-9"), "s_1", "d_1", "l_1", "u_1"), Candle::EventLoaderModel::Event.new(Date.parse("2019-01-08"), Date.parse("2019-01-10"), "s_1", "d_1", "l_1", "u_1"),
173
- Candle::EventLoaderModel::Event.new(Date.parse("2019-01-09"), Date.parse("2019-01-11"), "s_1", "d_1", "l_1", "u_1")] }
172
+ let(:event_heap) { [Candl::EventLoaderModel::Event.new(Date.parse("2019-01-08"), Date.parse("2019-01-11"), "s_1", "d_1", "l_1", "u_1"), Candl::EventLoaderModel::Event.new(Date.parse("2019-01-08"), Date.parse("2019-01-9"), "s_1", "d_1", "l_1", "u_1"), Candl::EventLoaderModel::Event.new(Date.parse("2019-01-08"), Date.parse("2019-01-10"), "s_1", "d_1", "l_1", "u_1"),
173
+ Candl::EventLoaderModel::Event.new(Date.parse("2019-01-09"), Date.parse("2019-01-11"), "s_1", "d_1", "l_1", "u_1")] }
174
174
 
175
175
  it "Find best fit for day" do
176
- expect(Candle::MonthModel.find_best_fit_for_day(first_weekday, day, event_heap)).to eq(Candle::EventLoaderModel::Event.new(Date.parse("2019-01-08"), Date.parse("2019-01-11"), "s_1", "d_1", "l_1", "u_1"))
176
+ expect(Candl::MonthModel.find_best_fit_for_day(first_weekday, day, event_heap)).to eq(Candl::EventLoaderModel::Event.new(Date.parse("2019-01-08"), Date.parse("2019-01-11"), "s_1", "d_1", "l_1", "u_1"))
177
177
  end
178
178
 
179
179
 
@@ -196,23 +196,23 @@ RSpec.describe Candle::MonthModel do
196
196
  end
197
197
 
198
198
  it "emphasized date" do
199
- expect(Candle::MonthModel.emphasize_date(Date.parse("2019-01-08"), Date.parse("2019-01-08"), "emphasized", "regular")).to eq("emphasized")
199
+ expect(Candl::MonthModel.emphasize_date(Date.parse("2019-01-08"), Date.parse("2019-01-08"), "emphasized", "regular")).to eq("emphasized")
200
200
  end
201
201
  it "regular date" do
202
- expect(Candle::MonthModel.emphasize_date(Date.parse("2019-01-08"), Date.parse("2019-01-09"), "emphasized", "regular")).to eq("regular")
202
+ expect(Candl::MonthModel.emphasize_date(Date.parse("2019-01-08"), Date.parse("2019-01-09"), "emphasized", "regular")).to eq("regular")
203
203
  end
204
204
 
205
205
  it "multiday event cutoff start" do
206
- expect(Candle::MonthModel.multiday_event_cutoff(true, false, "start", "both", "end")).to eq("start")
206
+ expect(Candl::MonthModel.multiday_event_cutoff(true, false, "start", "both", "end")).to eq("start")
207
207
  end
208
208
  it "multiday event cutoff both" do
209
- expect(Candle::MonthModel.multiday_event_cutoff(true, true, "start", "both", "end")).to eq("both")
209
+ expect(Candl::MonthModel.multiday_event_cutoff(true, true, "start", "both", "end")).to eq("both")
210
210
  end
211
211
  it "multiday event cutoff end" do
212
- expect(Candle::MonthModel.multiday_event_cutoff(false, true, "start", "both", "end")).to eq("end")
212
+ expect(Candl::MonthModel.multiday_event_cutoff(false, true, "start", "both", "end")).to eq("end")
213
213
  end
214
214
  it "multiday event cutoff none" do
215
- expect(Candle::MonthModel.multiday_event_cutoff(false, false, "start", "both", "end")).to eq("")
215
+ expect(Candl::MonthModel.multiday_event_cutoff(false, false, "start", "both", "end")).to eq("")
216
216
  end
217
217
 
218
218
  let(:weekday_dates_of_date_today) { [Date.parse("2019-01-07"), Date.parse("2019-01-08"), Date.parse("2019-01-09"), Date.parse("2019-01-10"), Date.parse("2019-01-11"), Date.parse("2019-01-12"), Date.parse("2019-01-13")] }
@@ -231,8 +231,8 @@ RSpec.describe Candle::MonthModel do
231
231
 
232
232
  it "months view dates along 12 * 1 month shifts" do
233
233
  shifts_in_year.times do |shift|
234
- current_month_start = Candle::MonthModel.current_month_start(shift, fake_today)
235
- current_month_end = Candle::MonthModel.current_month_end(shift, fake_today)
234
+ current_month_start = Candl::MonthModel.current_month_start(shift, fake_today)
235
+ current_month_end = Candl::MonthModel.current_month_end(shift, fake_today)
236
236
 
237
237
  current_months_view_dates = month.generate_months_view_dates(current_month_start, current_month_end)
238
238
 
@@ -244,24 +244,24 @@ RSpec.describe Candle::MonthModel do
244
244
  let(:day_in_five_week_month) { Date.parse("2019-01-01") }
245
245
  let(:day_in_six_week_month) { Date.parse("2019-03-01") }
246
246
  it "weeks in months view dates" do
247
- five_week_month_start = Candle::MonthModel.current_month_start(0, day_in_five_week_month)
248
- five_week_month_end = Candle::MonthModel.current_month_end(0, day_in_five_week_month)
247
+ five_week_month_start = Candl::MonthModel.current_month_start(0, day_in_five_week_month)
248
+ five_week_month_end = Candl::MonthModel.current_month_end(0, day_in_five_week_month)
249
249
 
250
- six_week_month_start = Candle::MonthModel.current_month_start(0, day_in_six_week_month)
251
- six_week_month_end = Candle::MonthModel.current_month_end(0, day_in_six_week_month)
250
+ six_week_month_start = Candl::MonthModel.current_month_start(0, day_in_six_week_month)
251
+ six_week_month_end = Candl::MonthModel.current_month_end(0, day_in_six_week_month)
252
252
 
253
253
  five_week_months_view_dates = month.generate_months_view_dates(five_week_month_start, five_week_month_end)
254
254
  six_week_months_view_dates = month.generate_months_view_dates(six_week_month_start, six_week_month_end)
255
255
 
256
- expect(Candle::MonthModel.weeks_in_months_view_dates(five_week_months_view_dates)).to eq(5)
257
- expect(Candle::MonthModel.weeks_in_months_view_dates(six_week_months_view_dates)).to eq(6)
256
+ expect(Candl::MonthModel.weeks_in_months_view_dates(five_week_months_view_dates)).to eq(5)
257
+ expect(Candl::MonthModel.weeks_in_months_view_dates(six_week_months_view_dates)).to eq(6)
258
258
  end
259
259
 
260
260
  it "current month start" do
261
- expect(Candle::MonthModel.current_month_start(current_shift_factor, fake_today)).to eq(date_month_start)
261
+ expect(Candl::MonthModel.current_month_start(current_shift_factor, fake_today)).to eq(date_month_start)
262
262
  end
263
263
  it "current month end" do
264
- expect(Candle::MonthModel.current_month_end(current_shift_factor, fake_today)).to eq(date_month_end)
264
+ expect(Candl::MonthModel.current_month_end(current_shift_factor, fake_today)).to eq(date_month_end)
265
265
  end
266
266
  end
267
267
  end
@@ -1,4 +1,4 @@
1
1
  //= link_tree ../images
2
2
  //= link_directory ../javascripts .js
3
3
  //= link_directory ../stylesheets .css
4
- //= link candle_manifest.js
4
+ //= link candl_manifest.js
@@ -13,4 +13,4 @@
13
13
  //= require rails-ujs
14
14
  //= require activestorage
15
15
  //= require_tree .
16
- //= require candle/application
16
+ //= require candl/application
@@ -12,7 +12,7 @@
12
12
  *
13
13
  *= require_tree .
14
14
  *= require_self
15
- *= require candle/application
15
+ *= require candl/application
16
16
  */
17
17
 
18
18
  /* There seems to be a bug that makes it necessary to have some sort of change to this file in order to have the typical asset pipeline behaviour. */
@@ -1,3 +1,3 @@
1
1
  <div>You should see the calendar rendered below:</div>
2
2
 
3
- <%= render partial: 'candle/calendar/frame', locals: { calendar_id: "grhnk1uaotql6gv2dkf9ldmqjc@group.calendar.google.com", api_key: "AIzaSyD1UIlX0n4-DnY3hSoTkeTZFbbsNO2g67E" } %>
3
+ <%= render partial: 'candl/calendar/frame', locals: { calendar_id: "grhnk1uaotql6gv2dkf9ldmqjc@group.calendar.google.com", api_key: "AIzaSyD1UIlX0n4-DnY3hSoTkeTZFbbsNO2g67E" } %>
@@ -22,4 +22,4 @@ div You should see the calendar rendered below:
22
22
  } \
23
23
  }
24
24
 
25
- = render partial: 'candle/calendar/frame', locals: { config: config }
25
+ = render partial: 'candl/calendar/frame', locals: { config: config }
@@ -3,7 +3,7 @@ require_relative 'boot'
3
3
  require 'rails/all'
4
4
 
5
5
  Bundler.require(*Rails.groups)
6
- require "candle"
6
+ require "candl"
7
7
 
8
8
  module Dummy
9
9
  class Application < Rails::Application
@@ -1,94 +1,94 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # Code is not reloaded between requests.
5
- config.cache_classes = true
6
-
7
- # Eager load code on boot. This eager loads most of Rails and
8
- # your application in memory, allowing both threaded web servers
9
- # and those relying on copy on write to perform better.
10
- # Rake tasks automatically ignore this option for performance.
11
- config.eager_load = true
12
-
13
- # Full error reports are disabled and caching is turned on.
14
- config.consider_all_requests_local = false
15
- config.action_controller.perform_caching = true
16
-
17
- # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
18
- # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
19
- # config.require_master_key = true
20
-
21
- # Disable serving static files from the `/public` folder by default since
22
- # Apache or NGINX already handles this.
23
- config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
24
-
25
- # Compress JavaScripts and CSS.
26
- config.assets.js_compressor = :uglifier
27
- # config.assets.css_compressor = :sass
28
-
29
- # Do not fallback to assets pipeline if a precompiled asset is missed.
30
- config.assets.compile = false
31
-
32
- # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
33
-
34
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
35
- # config.action_controller.asset_host = 'http://assets.example.com'
36
-
37
- # Specifies the header that your server uses for sending files.
38
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
39
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
40
-
41
- # Store uploaded files on the local file system (see config/storage.yml for options)
42
- config.active_storage.service = :local
43
-
44
- # Mount Action Cable outside main process or domain
45
- # config.action_cable.mount_path = nil
46
- # config.action_cable.url = 'wss://example.com/cable'
47
- # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
48
-
49
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
50
- # config.force_ssl = true
51
-
52
- # Use the lowest log level to ensure availability of diagnostic information
53
- # when problems arise.
54
- config.log_level = :debug
55
-
56
- # Prepend all log lines with the following tags.
57
- config.log_tags = [ :request_id ]
58
-
59
- # Use a different cache store in production.
60
- # config.cache_store = :mem_cache_store
61
-
62
- # Use a real queuing backend for Active Job (and separate queues per environment)
63
- # config.active_job.queue_adapter = :resque
64
- # config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
65
-
66
- config.action_mailer.perform_caching = false
67
-
68
- # Ignore bad email addresses and do not raise email delivery errors.
69
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
70
- # config.action_mailer.raise_delivery_errors = false
71
-
72
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
73
- # the I18n.default_locale when a translation cannot be found).
74
- config.i18n.fallbacks = true
75
-
76
- # Send deprecation notices to registered listeners.
77
- config.active_support.deprecation = :notify
78
-
79
- # Use default logging formatter so that PID and timestamp are not suppressed.
80
- config.log_formatter = ::Logger::Formatter.new
81
-
82
- # Use a different logger for distributed setups.
83
- # require 'syslog/logger'
84
- # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
85
-
86
- if ENV["RAILS_LOG_TO_STDOUT"].present?
87
- logger = ActiveSupport::Logger.new(STDOUT)
88
- logger.formatter = config.log_formatter
89
- config.logger = ActiveSupport::TaggedLogging.new(logger)
90
- end
91
-
92
- # Do not dump schema after migrations.
93
- config.active_record.dump_schema_after_migration = false
94
- end
1
+ Rails.application.configure do
2
+ # Settings specified here will take precedence over those in config/application.rb.
3
+
4
+ # Code is not reloaded between requests.
5
+ config.cache_classes = true
6
+
7
+ # Eager load code on boot. This eager loads most of Rails and
8
+ # your application in memory, allowing both threaded web servers
9
+ # and those relying on copy on write to perform better.
10
+ # Rake tasks automatically ignore this option for performance.
11
+ config.eager_load = true
12
+
13
+ # Full error reports are disabled and caching is turned on.
14
+ config.consider_all_requests_local = false
15
+ config.action_controller.perform_caching = true
16
+
17
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
18
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
19
+ # config.require_master_key = true
20
+
21
+ # Disable serving static files from the `/public` folder by default since
22
+ # Apache or NGINX already handles this.
23
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
24
+
25
+ # Compress JavaScripts and CSS.
26
+ config.assets.js_compressor = :uglifier
27
+ # config.assets.css_compressor = :sass
28
+
29
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
30
+ config.assets.compile = false
31
+
32
+ # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
33
+
34
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
35
+ # config.action_controller.asset_host = 'http://assets.example.com'
36
+
37
+ # Specifies the header that your server uses for sending files.
38
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
39
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
40
+
41
+ # Store uploaded files on the local file system (see config/storage.yml for options)
42
+ config.active_storage.service = :local
43
+
44
+ # Mount Action Cable outside main process or domain
45
+ # config.action_cable.mount_path = nil
46
+ # config.action_cable.url = 'wss://example.com/cable'
47
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
48
+
49
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
50
+ # config.force_ssl = true
51
+
52
+ # Use the lowest log level to ensure availability of diagnostic information
53
+ # when problems arise.
54
+ config.log_level = :debug
55
+
56
+ # Prepend all log lines with the following tags.
57
+ config.log_tags = [ :request_id ]
58
+
59
+ # Use a different cache store in production.
60
+ # config.cache_store = :mem_cache_store
61
+
62
+ # Use a real queuing backend for Active Job (and separate queues per environment)
63
+ # config.active_job.queue_adapter = :resque
64
+ # config.active_job.queue_name_prefix = "dummy_#{Rails.env}"
65
+
66
+ config.action_mailer.perform_caching = false
67
+
68
+ # Ignore bad email addresses and do not raise email delivery errors.
69
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
70
+ # config.action_mailer.raise_delivery_errors = false
71
+
72
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
73
+ # the I18n.default_locale when a translation cannot be found).
74
+ config.i18n.fallbacks = true
75
+
76
+ # Send deprecation notices to registered listeners.
77
+ config.active_support.deprecation = :notify
78
+
79
+ # Use default logging formatter so that PID and timestamp are not suppressed.
80
+ config.log_formatter = ::Logger::Formatter.new
81
+
82
+ # Use a different logger for distributed setups.
83
+ # require 'syslog/logger'
84
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
85
+
86
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
87
+ logger = ActiveSupport::Logger.new(STDOUT)
88
+ logger.formatter = config.log_formatter
89
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
90
+ end
91
+
92
+ # Do not dump schema after migrations.
93
+ config.active_record.dump_schema_after_migration = false
94
+ end
@@ -1,4 +1,4 @@
1
1
  Rails.application.routes.draw do
2
2
  get "calendar" => "sample#show"
3
- mount Candle::Engine => "/candle"
3
+ mount Candl::Engine => "/candl"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: candl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andreas Schau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-12 00:00:00.000000000 Z
11
+ date: 2019-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -244,9 +244,10 @@ dependencies:
244
244
  - - ">="
245
245
  - !ruby/object:Gem::Version
246
246
  version: 3.8.0
247
- description: It does so by offering functions that gather the event data, cache it
248
- and structure it in a way that makes it easy to display in an agenda or monthly
249
- overview-like style.
247
+ description: This gem provides functionality to handle the loading of event data from
248
+ a public google calendar via an api key. (Without the need for OAuth.) It does so
249
+ by offering functions that gather the event data, cache it and structure it in a
250
+ way that makes it easy to display in an agenda or monthly overview-like style.
250
251
  email:
251
252
  - andreas.schau@hicknhack-software.com
252
253
  executables: []
@@ -257,33 +258,33 @@ files:
257
258
  - README.md
258
259
  - Rakefile
259
260
  - app/assets/config/candle_manifest.js
260
- - app/assets/javascripts/candle/application.js
261
- - app/assets/javascripts/candle/calendar.coffee
262
- - app/assets/stylesheets/candle/application.scss
263
- - app/assets/stylesheets/candle/calendar.scss
264
- - app/controllers/candle/application_controller.rb
265
- - app/controllers/candle/calendar_controller.rb
266
- - app/helpers/candle/application_helper.rb
267
- - app/helpers/candle/calendar_helper.rb
268
- - app/jobs/candle/application_job.rb
269
- - app/mailers/candle/application_mailer.rb
270
- - app/models/candle/application_record.rb
261
+ - app/assets/javascripts/candl/application.js
262
+ - app/assets/javascripts/candl/calendar.coffee
263
+ - app/assets/stylesheets/candl/application.scss
264
+ - app/assets/stylesheets/candl/calendar.scss
265
+ - app/controllers/candl/application_controller.rb
266
+ - app/controllers/candl/calendar_controller.rb
267
+ - app/helpers/candl/application_helper.rb
268
+ - app/helpers/candl/calendar_helper.rb
269
+ - app/jobs/candl/application_job.rb
270
+ - app/mailers/candl/application_mailer.rb
271
+ - app/models/candl/application_record.rb
271
272
  - app/views/candle/calendar/_agenda.slim
272
273
  - app/views/candle/calendar/_frame.slim
273
274
  - app/views/candle/calendar/_month.slim
274
275
  - app/views/candle/calendar/show.slim
275
- - app/views/layouts/candle/application.html.erb
276
+ - app/views/layouts/candl/application.html.erb
276
277
  - config/locales/de.yml
277
278
  - config/locales/en.yml
278
279
  - config/routes.rb
279
- - lib/candle.rb
280
- - lib/candle/agenda_model.rb
281
- - lib/candle/engine.rb
282
- - lib/candle/event_loader_model.rb
283
- - lib/candle/month_model.rb
284
- - lib/candle/version.rb
285
- - lib/tasks/candle_tasks.rake
286
- - spec/candle_spec.rb
280
+ - lib/candl.rb
281
+ - lib/candl/agenda_model.rb
282
+ - lib/candl/engine.rb
283
+ - lib/candl/event_loader_model.rb
284
+ - lib/candl/month_model.rb
285
+ - lib/candl/version.rb
286
+ - lib/tasks/candl_tasks.rake
287
+ - spec/candl_spec.rb
287
288
  - spec/dummy/Rakefile
288
289
  - spec/dummy/app/assets/config/manifest.js
289
290
  - spec/dummy/app/assets/javascripts/application.js
@@ -1835,8 +1836,8 @@ test_files:
1835
1836
  - spec/dummy/config/puma.rb
1836
1837
  - spec/dummy/config/storage.yml
1837
1838
  - spec/dummy/config/environments/development.rb
1838
- - spec/dummy/config/environments/production.rb
1839
1839
  - spec/dummy/config/environments/test.rb
1840
+ - spec/dummy/config/environments/production.rb
1840
1841
  - spec/dummy/config/initializers/application_controller_renderer.rb
1841
1842
  - spec/dummy/config/initializers/assets.rb
1842
1843
  - spec/dummy/config/initializers/backtrace_silencers.rb
@@ -3288,4 +3289,4 @@ test_files:
3288
3289
  - spec/dummy/spec/helpers/sample_helper_spec.rb
3289
3290
  - spec/spec_helper.rb
3290
3291
  - spec/rails_helper.rb
3291
- - spec/candle_spec.rb
3292
+ - spec/candl_spec.rb
@@ -1,16 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <title>Candle</title>
5
- <%= csrf_meta_tags %>
6
- <%= csp_meta_tag %>
7
-
8
- <%= stylesheet_link_tag "candle/application", media: "all" %>
9
- <%= javascript_include_tag "candle/application" %>
10
- </head>
11
- <body>
12
-
13
- <%= yield %>
14
-
15
- </body>
16
- </html>
@@ -1,3 +0,0 @@
1
- module Candle
2
- VERSION = '0.1.4'
3
- end
data/lib/candle.rb DELETED
@@ -1,9 +0,0 @@
1
- require "candle/engine"
2
-
3
- require "candle/event_loader_model"
4
- require "candle/agenda_model"
5
- require "candle/month_model"
6
-
7
- module Candle
8
- # Code is all found in the models and views.
9
- end