trusty-festivity-extension 2.5.17 → 2.5.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: faa05103740a1f5767d4d7c31e3817f97c73ee8b
4
- data.tar.gz: a9523943dbddabfad4f2ef74e4297aa5a5f16f0b
3
+ metadata.gz: 60aa6d4c1a9ce51eec2ee1475d83bbc03d66866a
4
+ data.tar.gz: dc6251ab513188014f5d951854059ae14259b143
5
5
  SHA512:
6
- metadata.gz: be20e0891f704776b9e3dea258128df2faac1776f300c768e7cc6517d8f1b095585bc87be3fb21a8b5386b3b187861a7bdcba27b03fd54b2a1b5ed7c8cef0bbb
7
- data.tar.gz: e6a17bc999afae2b5197e17f322537da7a7cff928db658197ae7316233fa97f4ec48d3b237cc61c79f60ee86ad58649eb01aaf898f99d5a970b42a7109f53cdd
6
+ metadata.gz: 326e44ce60d77c228b0b512c4263c9e1be5bd92c3819595c5e28dc845b9646c759e7afd1fb6cd2be0c3d9fb5426ce7f314f14e3d09ca0805442ebcd03791db90
7
+ data.tar.gz: 167b5f294b8a86eef0520c9191917c6b9a7ad048a572f4ed6414ab64459c5faf9f386fed315c773a1b3a2230debadbc723e282a81ac7447d26f1fd7badc0a057
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- trusty-festivity-extension (2.5.17)
4
+ trusty-festivity-extension (2.5.18)
5
5
  actionpack-action_caching (~> 1.1.1)
6
6
  chronic (~> 0.10.2)
7
7
  dalli-elasticache (~> 0.1.2)
@@ -0,0 +1,6 @@
1
+ Admin::PagesController.class_eval do
2
+ only_allow_access_to :index,
3
+ :when => [:designer, :admin],
4
+ :denied_url => { :controller => '/admin/configuration', :action => 'show' },
5
+ :denied_message => 'You must have Admin or Designer privileges to access Content.'
6
+ end
data/coverage/index.html CHANGED
@@ -14,14 +14,14 @@
14
14
  <img src="./assets/0.10.0/loading.gif" alt="loading"/>
15
15
  </div>
16
16
  <div id="wrapper" style="display:none;">
17
- <div class="timestamp">Generated <abbr class="timeago" title="2016-09-06T14:06:06-04:00">2016-09-06T14:06:06-04:00</abbr></div>
17
+ <div class="timestamp">Generated <abbr class="timeago" title="2016-11-01T14:50:09-04:00">2016-11-01T14:50:09-04:00</abbr></div>
18
18
  <ul class="group_tabs"></ul>
19
19
 
20
20
  <div id="content">
21
21
  <div class="file_list_container" id="AllFiles">
22
22
  <h2>
23
23
  <span class="group_name">All Files</span>
24
- (<span class="covered_percent"><span class="red">3.62%</span></span>
24
+ (<span class="covered_percent"><span class="red">3.61%</span></span>
25
25
  covered at
26
26
  <span class="covered_strength">
27
27
  <span class="red">
@@ -32,9 +32,9 @@
32
32
  <a name="AllFiles"></a>
33
33
  <div>
34
34
  <b>58</b> files in total.
35
- <b>1465</b> relevant lines.
35
+ <b>1467</b> relevant lines.
36
36
  <span class="green"><b>53</b> lines covered</span> and
37
- <span class="red"><b>1412</b> lines missed </span>
37
+ <span class="red"><b>1414</b> lines missed </span>
38
38
  </div>
39
39
  <table class="file_list">
40
40
  <thead>
@@ -253,10 +253,10 @@
253
253
  <tr>
254
254
  <td class="strong"><a href="#55991f817555ab5e6e7db7ac2e1eee5fa7943207" class="src_link" title="app/models/festivity_event_list.rb">app/models/festivity_event_list.rb</a></td>
255
255
  <td class="red strong">0.0 %</td>
256
- <td>137</td>
257
- <td>137</td>
256
+ <td>138</td>
257
+ <td>138</td>
258
258
  <td>0</td>
259
- <td>137</td>
259
+ <td>138</td>
260
260
  <td>0.0</td>
261
261
  </tr>
262
262
 
@@ -453,10 +453,10 @@
453
453
  <tr>
454
454
  <td class="strong"><a href="#1fdde1c3474c59d9ab63ea7326ad292d335256f4" class="src_link" title="app/services/instagram_feed_service.rb">app/services/instagram_feed_service.rb</a></td>
455
455
  <td class="red strong">0.0 %</td>
456
- <td>13</td>
457
- <td>13</td>
456
+ <td>14</td>
457
+ <td>14</td>
458
458
  <td>0</td>
459
- <td>13</td>
459
+ <td>14</td>
460
460
  <td>0.0</td>
461
461
  </tr>
462
462
 
@@ -503,7 +503,7 @@
503
503
  <tr>
504
504
  <td class="strong"><a href="#85b87cca8a409f164595fa9b41c52f7bfc3e66f8" class="src_link" title="lib/festivity/engine.rb">lib/festivity/engine.rb</a></td>
505
505
  <td class="green strong">100.0 %</td>
506
- <td>20</td>
506
+ <td>22</td>
507
507
  <td>5</td>
508
508
  <td>5</td>
509
509
  <td>0</td>
@@ -796,7 +796,7 @@
796
796
  <div class="file_list_container" id="Models">
797
797
  <h2>
798
798
  <span class="group_name">Models</span>
799
- (<span class="covered_percent"><span class="red">9.17%</span></span>
799
+ (<span class="covered_percent"><span class="red">9.15%</span></span>
800
800
  covered at
801
801
  <span class="covered_strength">
802
802
  <span class="red">
@@ -807,9 +807,9 @@
807
807
  <a name="Models"></a>
808
808
  <div>
809
809
  <b>17</b> files in total.
810
- <b>447</b> relevant lines.
810
+ <b>448</b> relevant lines.
811
811
  <span class="green"><b>41</b> lines covered</span> and
812
- <span class="red"><b>406</b> lines missed </span>
812
+ <span class="red"><b>407</b> lines missed </span>
813
813
  </div>
814
814
  <table class="file_list">
815
815
  <thead>
@@ -868,10 +868,10 @@
868
868
  <tr>
869
869
  <td class="strong"><a href="#55991f817555ab5e6e7db7ac2e1eee5fa7943207" class="src_link" title="app/models/festivity_event_list.rb">app/models/festivity_event_list.rb</a></td>
870
870
  <td class="red strong">0.0 %</td>
871
- <td>137</td>
872
- <td>137</td>
871
+ <td>138</td>
872
+ <td>138</td>
873
873
  <td>0</td>
874
- <td>137</td>
874
+ <td>138</td>
875
875
  <td>0.0</td>
876
876
  </tr>
877
877
 
@@ -1196,7 +1196,7 @@
1196
1196
  <tr>
1197
1197
  <td class="strong"><a href="#85b87cca8a409f164595fa9b41c52f7bfc3e66f8" class="src_link" title="lib/festivity/engine.rb">lib/festivity/engine.rb</a></td>
1198
1198
  <td class="green strong">100.0 %</td>
1199
- <td>20</td>
1199
+ <td>22</td>
1200
1200
  <td>5</td>
1201
1201
  <td>5</td>
1202
1202
  <td>0</td>
@@ -1331,7 +1331,7 @@
1331
1331
  <div class="file_list_container" id="Ungrouped">
1332
1332
  <h2>
1333
1333
  <span class="group_name">Ungrouped</span>
1334
- (<span class="covered_percent"><span class="red">2.65%</span></span>
1334
+ (<span class="covered_percent"><span class="red">2.64%</span></span>
1335
1335
  covered at
1336
1336
  <span class="covered_strength">
1337
1337
  <span class="red">
@@ -1342,9 +1342,9 @@
1342
1342
  <a name="Ungrouped"></a>
1343
1343
  <div>
1344
1344
  <b>11</b> files in total.
1345
- <b>226</b> relevant lines.
1345
+ <b>227</b> relevant lines.
1346
1346
  <span class="green"><b>6</b> lines covered</span> and
1347
- <span class="red"><b>220</b> lines missed </span>
1347
+ <span class="red"><b>221</b> lines missed </span>
1348
1348
  </div>
1349
1349
  <table class="file_list">
1350
1350
  <thead>
@@ -1433,10 +1433,10 @@
1433
1433
  <tr>
1434
1434
  <td class="strong"><a href="#1fdde1c3474c59d9ab63ea7326ad292d335256f4" class="src_link" title="app/services/instagram_feed_service.rb">app/services/instagram_feed_service.rb</a></td>
1435
1435
  <td class="red strong">0.0 %</td>
1436
- <td>13</td>
1437
- <td>13</td>
1436
+ <td>14</td>
1437
+ <td>14</td>
1438
1438
  <td>0</td>
1439
- <td>13</td>
1439
+ <td>14</td>
1440
1440
  <td>0.0</td>
1441
1441
  </tr>
1442
1442
 
@@ -4502,9 +4502,9 @@
4502
4502
  <h3>app/models/festivity_event_list.rb</h3>
4503
4503
  <h4><span class="red">0.0 %</span> covered</h4>
4504
4504
  <div>
4505
- <b>137</b> relevant lines.
4505
+ <b>138</b> relevant lines.
4506
4506
  <span class="green"><b>0</b> lines covered</span> and
4507
- <span class="red"><b>137</b> lines missed.</span>
4507
+ <span class="red"><b>138</b> lines missed.</span>
4508
4508
  </div>
4509
4509
  </div>
4510
4510
 
@@ -4724,469 +4724,469 @@
4724
4724
  <li class="missed" data-hits="0" data-linenumber="36">
4725
4725
 
4726
4726
 
4727
- <code class="ruby"></code>
4727
+ <code class="ruby"> now = DateTime.now.in_time_zone(&quot;Eastern Time (US &amp; Canada)&quot;)</code>
4728
4728
  </li>
4729
4729
 
4730
4730
  <li class="missed" data-hits="0" data-linenumber="37">
4731
4731
 
4732
4732
 
4733
- <code class="ruby"> if festival_dates.include?(DateTime.now.to_date)</code>
4733
+ <code class="ruby"></code>
4734
4734
  </li>
4735
4735
 
4736
4736
  <li class="missed" data-hits="0" data-linenumber="38">
4737
4737
 
4738
4738
 
4739
- <code class="ruby"> FestivityPerformance.where(start_date: DateTime.now...DateTime.now + 1.day).includes(:festivity_event_page).where(pages: {status_id: 100, site_id: Page.current_site.id, layout_id: nil}).compact.sort_by{|e| e[:date]}.first(3)</code>
4739
+ <code class="ruby"> if festival_dates.include?(now.to_date)</code>
4740
4740
  </li>
4741
4741
 
4742
4742
  <li class="missed" data-hits="0" data-linenumber="39">
4743
4743
 
4744
4744
 
4745
- <code class="ruby"> elsif festival_dates.first &gt; DateTime.now.to_date</code>
4745
+ <code class="ruby"> FestivityPerformance.where(start_date: now...now + 1.day).includes(:festivity_event_page).where(pages: {status_id: 100, site_id: Page.current_site.id, layout_id: nil}).compact.sort_by{|e| e[:date]}.first(3)</code>
4746
4746
  </li>
4747
4747
 
4748
4748
  <li class="missed" data-hits="0" data-linenumber="40">
4749
4749
 
4750
4750
 
4751
- <code class="ruby"> FestivityPerformance.includes(:festivity_event_page).where(pages: {status_id: 100, site_id: current_site.id, layout_id: nil}).compact.sort_by{|e| e[:date]}.first(3)</code>
4751
+ <code class="ruby"> elsif festival_dates.first &gt; now.to_date</code>
4752
4752
  </li>
4753
4753
 
4754
4754
  <li class="missed" data-hits="0" data-linenumber="41">
4755
4755
 
4756
4756
 
4757
- <code class="ruby"> else</code>
4757
+ <code class="ruby"> FestivityPerformance.includes(:festivity_event_page).where(pages: {status_id: 100, site_id: current_site.id, layout_id: nil}).compact.sort_by{|e| e[:date]}.first(3)</code>
4758
4758
  </li>
4759
4759
 
4760
4760
  <li class="missed" data-hits="0" data-linenumber="42">
4761
4761
 
4762
4762
 
4763
- <code class="ruby"> FestivityPerformance.includes(:festivity_event_page).where(pages: {status_id: 100, site_id: current_site.id, layout_id: nil}).compact.sort_by{|e| e[:date]}.last(3)</code>
4763
+ <code class="ruby"> else</code>
4764
4764
  </li>
4765
4765
 
4766
4766
  <li class="missed" data-hits="0" data-linenumber="43">
4767
4767
 
4768
4768
 
4769
- <code class="ruby"> end</code>
4769
+ <code class="ruby"> FestivityPerformance.includes(:festivity_event_page).where(pages: {status_id: 100, site_id: current_site.id, layout_id: nil}).compact.sort_by{|e| e[:date]}.last(3)</code>
4770
4770
  </li>
4771
4771
 
4772
4772
  <li class="missed" data-hits="0" data-linenumber="44">
4773
4773
 
4774
4774
 
4775
- <code class="ruby"> end</code>
4775
+ <code class="ruby"> end</code>
4776
4776
  </li>
4777
4777
 
4778
4778
  <li class="missed" data-hits="0" data-linenumber="45">
4779
4779
 
4780
4780
 
4781
- <code class="ruby"></code>
4781
+ <code class="ruby"> end</code>
4782
4782
  </li>
4783
4783
 
4784
4784
  <li class="missed" data-hits="0" data-linenumber="46">
4785
4785
 
4786
4786
 
4787
- <code class="ruby"> def self.find_by_location(location_id, site)</code>
4787
+ <code class="ruby"></code>
4788
4788
  </li>
4789
4789
 
4790
4790
  <li class="missed" data-hits="0" data-linenumber="47">
4791
4791
 
4792
4792
 
4793
- <code class="ruby"> begin</code>
4793
+ <code class="ruby"> def self.find_by_location(location_id, site)</code>
4794
4794
  </li>
4795
4795
 
4796
4796
  <li class="missed" data-hits="0" data-linenumber="48">
4797
4797
 
4798
4798
 
4799
- <code class="ruby"> where_clause = parse_criteria(dates: collect_festival_dates(site).join(&quot;,&quot;), filter_type: site.festivity_filter_type)</code>
4799
+ <code class="ruby"> begin</code>
4800
4800
  </li>
4801
4801
 
4802
4802
  <li class="missed" data-hits="0" data-linenumber="49">
4803
4803
 
4804
4804
 
4805
- <code class="ruby"> rescue ActiveRecord::RecordNotFound</code>
4805
+ <code class="ruby"> where_clause = parse_criteria(dates: collect_festival_dates(site).join(&quot;,&quot;), filter_type: site.festivity_filter_type)</code>
4806
4806
  </li>
4807
4807
 
4808
4808
  <li class="missed" data-hits="0" data-linenumber="50">
4809
4809
 
4810
4810
 
4811
- <code class="ruby"> return FestivityEventList.new([])</code>
4811
+ <code class="ruby"> rescue ActiveRecord::RecordNotFound</code>
4812
4812
  </li>
4813
4813
 
4814
4814
  <li class="missed" data-hits="0" data-linenumber="51">
4815
4815
 
4816
4816
 
4817
- <code class="ruby"> end</code>
4817
+ <code class="ruby"> return FestivityEventList.new([])</code>
4818
4818
  </li>
4819
4819
 
4820
4820
  <li class="missed" data-hits="0" data-linenumber="52">
4821
4821
 
4822
4822
 
4823
- <code class="ruby"></code>
4823
+ <code class="ruby"> end</code>
4824
4824
  </li>
4825
4825
 
4826
4826
  <li class="missed" data-hits="0" data-linenumber="53">
4827
4827
 
4828
4828
 
4829
- <code class="ruby"> FestivityEventList.new(</code>
4829
+ <code class="ruby"></code>
4830
4830
  </li>
4831
4831
 
4832
4832
  <li class="missed" data-hits="0" data-linenumber="54">
4833
4833
 
4834
4834
 
4835
- <code class="ruby"> FestivityEventList::FestivityEventPerformance.</code>
4835
+ <code class="ruby"> FestivityEventList.new(</code>
4836
4836
  </li>
4837
4837
 
4838
4838
  <li class="missed" data-hits="0" data-linenumber="55">
4839
4839
 
4840
4840
 
4841
- <code class="ruby"> includes(:assets).</code>
4841
+ <code class="ruby"> FestivityEventList::FestivityEventPerformance.</code>
4842
4842
  </li>
4843
4843
 
4844
4844
  <li class="missed" data-hits="0" data-linenumber="56">
4845
4845
 
4846
4846
 
4847
- <code class="ruby"> joins(:festivity_categories).</code>
4847
+ <code class="ruby"> includes(:assets).</code>
4848
4848
  </li>
4849
4849
 
4850
4850
  <li class="missed" data-hits="0" data-linenumber="57">
4851
4851
 
4852
4852
 
4853
- <code class="ruby"> where(where_clause).</code>
4853
+ <code class="ruby"> joins(:festivity_categories).</code>
4854
4854
  </li>
4855
4855
 
4856
4856
  <li class="missed" data-hits="0" data-linenumber="58">
4857
4857
 
4858
4858
 
4859
- <code class="ruby"> where(location_id: location_id).</code>
4859
+ <code class="ruby"> where(where_clause).</code>
4860
4860
  </li>
4861
4861
 
4862
4862
  <li class="missed" data-hits="0" data-linenumber="59">
4863
4863
 
4864
4864
 
4865
- <code class="ruby"> group(&quot;performance_id&quot;).</code>
4865
+ <code class="ruby"> where(location_id: location_id).</code>
4866
4866
  </li>
4867
4867
 
4868
4868
  <li class="missed" data-hits="0" data-linenumber="60">
4869
4869
 
4870
4870
 
4871
- <code class="ruby"> order(&quot;featured_item DESC, start_date ASC&quot;).</code>
4871
+ <code class="ruby"> group(&quot;performance_id&quot;).</code>
4872
4872
  </li>
4873
4873
 
4874
4874
  <li class="missed" data-hits="0" data-linenumber="61">
4875
4875
 
4876
4876
 
4877
- <code class="ruby"> preload(:festivity_categories)</code>
4877
+ <code class="ruby"> order(&quot;featured_item DESC, start_date ASC&quot;).</code>
4878
4878
  </li>
4879
4879
 
4880
4880
  <li class="missed" data-hits="0" data-linenumber="62">
4881
4881
 
4882
4882
 
4883
- <code class="ruby"> )</code>
4883
+ <code class="ruby"> preload(:festivity_categories)</code>
4884
4884
  </li>
4885
4885
 
4886
4886
  <li class="missed" data-hits="0" data-linenumber="63">
4887
4887
 
4888
4888
 
4889
- <code class="ruby"> end</code>
4889
+ <code class="ruby"> )</code>
4890
4890
  </li>
4891
4891
 
4892
4892
  <li class="missed" data-hits="0" data-linenumber="64">
4893
4893
 
4894
4894
 
4895
- <code class="ruby"></code>
4895
+ <code class="ruby"> end</code>
4896
4896
  </li>
4897
4897
 
4898
4898
  <li class="missed" data-hits="0" data-linenumber="65">
4899
4899
 
4900
4900
 
4901
- <code class="ruby"> def self.find_related_events(criteria)</code>
4901
+ <code class="ruby"></code>
4902
4902
  </li>
4903
4903
 
4904
4904
  <li class="missed" data-hits="0" data-linenumber="66">
4905
4905
 
4906
4906
 
4907
- <code class="ruby"> where_clause = parse_criteria(criteria)</code>
4907
+ <code class="ruby"> def self.find_related_events(criteria)</code>
4908
4908
  </li>
4909
4909
 
4910
4910
  <li class="missed" data-hits="0" data-linenumber="67">
4911
4911
 
4912
4912
 
4913
- <code class="ruby"> FestivityEventList.new(</code>
4913
+ <code class="ruby"> where_clause = parse_criteria(criteria)</code>
4914
4914
  </li>
4915
4915
 
4916
4916
  <li class="missed" data-hits="0" data-linenumber="68">
4917
4917
 
4918
4918
 
4919
- <code class="ruby"> FestivityEventList::FestivityEventPerformance.</code>
4919
+ <code class="ruby"> FestivityEventList.new(</code>
4920
4920
  </li>
4921
4921
 
4922
4922
  <li class="missed" data-hits="0" data-linenumber="69">
4923
4923
 
4924
4924
 
4925
- <code class="ruby"> includes(:assets).</code>
4925
+ <code class="ruby"> FestivityEventList::FestivityEventPerformance.</code>
4926
4926
  </li>
4927
4927
 
4928
4928
  <li class="missed" data-hits="0" data-linenumber="70">
4929
4929
 
4930
4930
 
4931
- <code class="ruby"> joins(:festivity_categories).</code>
4931
+ <code class="ruby"> includes(:assets).</code>
4932
4932
  </li>
4933
4933
 
4934
4934
  <li class="missed" data-hits="0" data-linenumber="71">
4935
4935
 
4936
4936
 
4937
- <code class="ruby"> where(where_clause).</code>
4937
+ <code class="ruby"> joins(:festivity_categories).</code>
4938
4938
  </li>
4939
4939
 
4940
4940
  <li class="missed" data-hits="0" data-linenumber="72">
4941
4941
 
4942
4942
 
4943
- <code class="ruby"> where(&quot;event_id != ?&quot;, criteria[:event_id]).</code>
4943
+ <code class="ruby"> where(where_clause).</code>
4944
4944
  </li>
4945
4945
 
4946
4946
  <li class="missed" data-hits="0" data-linenumber="73">
4947
4947
 
4948
4948
 
4949
- <code class="ruby"> group(&quot;performance_id&quot;).</code>
4949
+ <code class="ruby"> where(&quot;event_id != ?&quot;, criteria[:event_id]).</code>
4950
4950
  </li>
4951
4951
 
4952
4952
  <li class="missed" data-hits="0" data-linenumber="74">
4953
4953
 
4954
4954
 
4955
- <code class="ruby"> order(&quot;featured_item DESC, start_date ASC&quot;).</code>
4955
+ <code class="ruby"> group(&quot;performance_id&quot;).</code>
4956
4956
  </li>
4957
4957
 
4958
4958
  <li class="missed" data-hits="0" data-linenumber="75">
4959
4959
 
4960
4960
 
4961
- <code class="ruby"> preload(:festivity_categories)</code>
4961
+ <code class="ruby"> order(&quot;featured_item DESC, start_date ASC&quot;).</code>
4962
4962
  </li>
4963
4963
 
4964
4964
  <li class="missed" data-hits="0" data-linenumber="76">
4965
4965
 
4966
4966
 
4967
- <code class="ruby"> )</code>
4967
+ <code class="ruby"> preload(:festivity_categories)</code>
4968
4968
  </li>
4969
4969
 
4970
4970
  <li class="missed" data-hits="0" data-linenumber="77">
4971
4971
 
4972
4972
 
4973
- <code class="ruby"> end</code>
4973
+ <code class="ruby"> )</code>
4974
4974
  </li>
4975
4975
 
4976
4976
  <li class="missed" data-hits="0" data-linenumber="78">
4977
4977
 
4978
4978
 
4979
- <code class="ruby"></code>
4979
+ <code class="ruby"> end</code>
4980
4980
  </li>
4981
4981
 
4982
4982
  <li class="missed" data-hits="0" data-linenumber="79">
4983
4983
 
4984
4984
 
4985
- <code class="ruby"> def self.collect_festival_dates(site)</code>
4985
+ <code class="ruby"></code>
4986
4986
  </li>
4987
4987
 
4988
4988
  <li class="missed" data-hits="0" data-linenumber="80">
4989
4989
 
4990
4990
 
4991
- <code class="ruby"> festival_dates = site.festival_datetimes</code>
4991
+ <code class="ruby"> def self.collect_festival_dates(site)</code>
4992
4992
  </li>
4993
4993
 
4994
4994
  <li class="missed" data-hits="0" data-linenumber="81">
4995
4995
 
4996
4996
 
4997
- <code class="ruby"> if site.date_during_festival?(Time.now)</code>
4997
+ <code class="ruby"> festival_dates = site.festival_datetimes</code>
4998
4998
  </li>
4999
4999
 
5000
5000
  <li class="missed" data-hits="0" data-linenumber="82">
5001
5001
 
5002
5002
 
5003
- <code class="ruby"> festival_dates = festival_dates.select{ |date| date.datetime == Time.now }</code>
5003
+ <code class="ruby"> if site.date_during_festival?(Time.now)</code>
5004
5004
  </li>
5005
5005
 
5006
5006
  <li class="missed" data-hits="0" data-linenumber="83">
5007
5007
 
5008
5008
 
5009
- <code class="ruby"> end</code>
5009
+ <code class="ruby"> festival_dates = festival_dates.select{ |date| date.datetime == Time.now }</code>
5010
5010
  </li>
5011
5011
 
5012
5012
  <li class="missed" data-hits="0" data-linenumber="84">
5013
5013
 
5014
5014
 
5015
- <code class="ruby"></code>
5015
+ <code class="ruby"> end</code>
5016
5016
  </li>
5017
5017
 
5018
5018
  <li class="missed" data-hits="0" data-linenumber="85">
5019
5019
 
5020
5020
 
5021
- <code class="ruby"> festival_dates.map{ |date| date.to_s }</code>
5021
+ <code class="ruby"></code>
5022
5022
  </li>
5023
5023
 
5024
5024
  <li class="missed" data-hits="0" data-linenumber="86">
5025
5025
 
5026
5026
 
5027
- <code class="ruby"></code>
5027
+ <code class="ruby"> festival_dates.map{ |date| date.to_s }</code>
5028
5028
  </li>
5029
5029
 
5030
5030
  <li class="missed" data-hits="0" data-linenumber="87">
5031
5031
 
5032
5032
 
5033
- <code class="ruby"> end</code>
5033
+ <code class="ruby"></code>
5034
5034
  </li>
5035
5035
 
5036
5036
  <li class="missed" data-hits="0" data-linenumber="88">
5037
5037
 
5038
5038
 
5039
- <code class="ruby"></code>
5039
+ <code class="ruby"> end</code>
5040
5040
  </li>
5041
5041
 
5042
5042
  <li class="missed" data-hits="0" data-linenumber="89">
5043
5043
 
5044
5044
 
5045
- <code class="ruby"> private</code>
5045
+ <code class="ruby"></code>
5046
5046
  </li>
5047
5047
 
5048
5048
  <li class="missed" data-hits="0" data-linenumber="90">
5049
5049
 
5050
5050
 
5051
- <code class="ruby"></code>
5051
+ <code class="ruby"> private</code>
5052
5052
  </li>
5053
5053
 
5054
5054
  <li class="missed" data-hits="0" data-linenumber="91">
5055
5055
 
5056
5056
 
5057
- <code class="ruby"> # Return a list of unique event ids that match the provided dates</code>
5057
+ <code class="ruby"></code>
5058
5058
  </li>
5059
5059
 
5060
5060
  <li class="missed" data-hits="0" data-linenumber="92">
5061
5061
 
5062
5062
 
5063
- <code class="ruby"> def self.event_ids_for_datetimes(datetimes, filter_type)</code>
5063
+ <code class="ruby"> # Return a list of unique event ids that match the provided dates</code>
5064
5064
  </li>
5065
5065
 
5066
5066
  <li class="missed" data-hits="0" data-linenumber="93">
5067
5067
 
5068
5068
 
5069
- <code class="ruby"> FestivityEventList::FestivityEventPerformance.where(datetime_criteria(datetimes, filter_type)).map {|e| e.event_id}.uniq</code>
5069
+ <code class="ruby"> def self.event_ids_for_datetimes(datetimes, filter_type)</code>
5070
5070
  </li>
5071
5071
 
5072
5072
  <li class="missed" data-hits="0" data-linenumber="94">
5073
5073
 
5074
5074
 
5075
- <code class="ruby"> end</code>
5075
+ <code class="ruby"> FestivityEventList::FestivityEventPerformance.where(datetime_criteria(datetimes, filter_type)).map {|e| e.event_id}.uniq</code>
5076
5076
  </li>
5077
5077
 
5078
5078
  <li class="missed" data-hits="0" data-linenumber="95">
5079
5079
 
5080
5080
 
5081
- <code class="ruby"></code>
5081
+ <code class="ruby"> end</code>
5082
5082
  </li>
5083
5083
 
5084
5084
  <li class="missed" data-hits="0" data-linenumber="96">
5085
5085
 
5086
5086
 
5087
- <code class="ruby"> # Create a condition for start and end date between midnight and 11:59pm</code>
5087
+ <code class="ruby"></code>
5088
5088
  </li>
5089
5089
 
5090
5090
  <li class="missed" data-hits="0" data-linenumber="97">
5091
5091
 
5092
5092
 
5093
- <code class="ruby"> # for each date passed in and return the SQL condition</code>
5093
+ <code class="ruby"> # Create a condition for start and end date between midnight and 11:59pm</code>
5094
5094
  </li>
5095
5095
 
5096
5096
  <li class="missed" data-hits="0" data-linenumber="98">
5097
5097
 
5098
5098
 
5099
- <code class="ruby"> def self.datetime_criteria(datetimes_string, filter_type)</code>
5099
+ <code class="ruby"> # for each date passed in and return the SQL condition</code>
5100
5100
  </li>
5101
5101
 
5102
5102
  <li class="missed" data-hits="0" data-linenumber="99">
5103
5103
 
5104
5104
 
5105
- <code class="ruby"></code>
5105
+ <code class="ruby"> def self.datetime_criteria(datetimes_string, filter_type)</code>
5106
5106
  </li>
5107
5107
 
5108
5108
  <li class="missed" data-hits="0" data-linenumber="100">
5109
5109
 
5110
5110
 
5111
- <code class="ruby"> date_queries = datetimes_string.split(&#39;,&#39;).map do |date_string|</code>
5111
+ <code class="ruby"></code>
5112
5112
  </li>
5113
5113
 
5114
5114
  <li class="missed" data-hits="0" data-linenumber="101">
5115
5115
 
5116
5116
 
5117
- <code class="ruby"> start_date = Chronic.parse(URI.decode(date_string)).utc</code>
5117
+ <code class="ruby"> date_queries = datetimes_string.split(&#39;,&#39;).map do |date_string|</code>
5118
5118
  </li>
5119
5119
 
5120
5120
  <li class="missed" data-hits="0" data-linenumber="102">
5121
5121
 
5122
5122
 
5123
- <code class="ruby"> end_date = start_date.advance(advance_by(filter_type))</code>
5123
+ <code class="ruby"> start_date = Chronic.parse(URI.decode(date_string)).utc</code>
5124
5124
  </li>
5125
5125
 
5126
5126
  <li class="missed" data-hits="0" data-linenumber="103">
5127
5127
 
5128
5128
 
5129
- <code class="ruby"> &lt;&lt;-SQL</code>
5129
+ <code class="ruby"> end_date = start_date.advance(advance_by(filter_type))</code>
5130
5130
  </li>
5131
5131
 
5132
5132
  <li class="missed" data-hits="0" data-linenumber="104">
5133
5133
 
5134
5134
 
5135
- <code class="ruby"> (</code>
5135
+ <code class="ruby"> &lt;&lt;-SQL</code>
5136
5136
  </li>
5137
5137
 
5138
5138
  <li class="missed" data-hits="0" data-linenumber="105">
5139
5139
 
5140
5140
 
5141
- <code class="ruby"> (start_date &gt;= &#39;#{start_date}&#39; AND start_date &lt;= &#39;#{end_date}&#39;)</code>
5141
+ <code class="ruby"> (</code>
5142
5142
  </li>
5143
5143
 
5144
5144
  <li class="missed" data-hits="0" data-linenumber="106">
5145
5145
 
5146
5146
 
5147
- <code class="ruby"> OR</code>
5147
+ <code class="ruby"> (start_date &gt;= &#39;#{start_date}&#39; AND start_date &lt;= &#39;#{end_date}&#39;)</code>
5148
5148
  </li>
5149
5149
 
5150
5150
  <li class="missed" data-hits="0" data-linenumber="107">
5151
5151
 
5152
5152
 
5153
- <code class="ruby"> (end_date &gt;= &#39;#{start_date}&#39; AND end_date &lt;= &#39;#{end_date}&#39;)</code>
5153
+ <code class="ruby"> OR</code>
5154
5154
  </li>
5155
5155
 
5156
5156
  <li class="missed" data-hits="0" data-linenumber="108">
5157
5157
 
5158
5158
 
5159
- <code class="ruby"> )</code>
5159
+ <code class="ruby"> (end_date &gt;= &#39;#{start_date}&#39; AND end_date &lt;= &#39;#{end_date}&#39;)</code>
5160
5160
  </li>
5161
5161
 
5162
5162
  <li class="missed" data-hits="0" data-linenumber="109">
5163
5163
 
5164
5164
 
5165
- <code class="ruby"> SQL</code>
5165
+ <code class="ruby"> )</code>
5166
5166
  </li>
5167
5167
 
5168
5168
  <li class="missed" data-hits="0" data-linenumber="110">
5169
5169
 
5170
5170
 
5171
- <code class="ruby"> end</code>
5171
+ <code class="ruby"> SQL</code>
5172
5172
  </li>
5173
5173
 
5174
5174
  <li class="missed" data-hits="0" data-linenumber="111">
5175
5175
 
5176
5176
 
5177
- <code class="ruby"> date_queries.join(&quot; OR &quot;)</code>
5177
+ <code class="ruby"> end</code>
5178
5178
  </li>
5179
5179
 
5180
5180
  <li class="missed" data-hits="0" data-linenumber="112">
5181
5181
 
5182
5182
 
5183
- <code class="ruby"> end</code>
5183
+ <code class="ruby"> date_queries.join(&quot; OR &quot;)</code>
5184
5184
  </li>
5185
5185
 
5186
5186
  <li class="missed" data-hits="0" data-linenumber="113">
5187
5187
 
5188
5188
 
5189
- <code class="ruby"></code>
5189
+ <code class="ruby"> end</code>
5190
5190
  </li>
5191
5191
 
5192
5192
  <li class="missed" data-hits="0" data-linenumber="114">
@@ -5198,121 +5198,121 @@
5198
5198
  <li class="missed" data-hits="0" data-linenumber="115">
5199
5199
 
5200
5200
 
5201
- <code class="ruby"> # The order of querying, depending on what is passed:</code>
5201
+ <code class="ruby"></code>
5202
5202
  </li>
5203
5203
 
5204
5204
  <li class="missed" data-hits="0" data-linenumber="116">
5205
5205
 
5206
5206
 
5207
- <code class="ruby"> # - If dates are passed, we search both start and end date between midnight and 11:59pm of that date.</code>
5207
+ <code class="ruby"> # The order of querying, depending on what is passed:</code>
5208
5208
  </li>
5209
5209
 
5210
5210
  <li class="missed" data-hits="0" data-linenumber="117">
5211
5211
 
5212
5212
 
5213
- <code class="ruby"> # That query returns any matching event ids.</code>
5213
+ <code class="ruby"> # - If dates are passed, we search both start and end date between midnight and 11:59pm of that date.</code>
5214
5214
  </li>
5215
5215
 
5216
5216
  <li class="missed" data-hits="0" data-linenumber="118">
5217
5217
 
5218
5218
 
5219
- <code class="ruby"> # - The event ids returned, if any, are added to the where clause for the next query</code>
5219
+ <code class="ruby"> # That query returns any matching event ids.</code>
5220
5220
  </li>
5221
5221
 
5222
5222
  <li class="missed" data-hits="0" data-linenumber="119">
5223
5223
 
5224
5224
 
5225
- <code class="ruby"> # - Any category ids passed are added to the where clause as well.</code>
5225
+ <code class="ruby"> # - The event ids returned, if any, are added to the where clause for the next query</code>
5226
5226
  </li>
5227
5227
 
5228
5228
  <li class="missed" data-hits="0" data-linenumber="120">
5229
5229
 
5230
5230
 
5231
- <code class="ruby"> def self.parse_criteria(criteria)</code>
5231
+ <code class="ruby"> # - Any category ids passed are added to the where clause as well.</code>
5232
5232
  </li>
5233
5233
 
5234
5234
  <li class="missed" data-hits="0" data-linenumber="121">
5235
5235
 
5236
5236
 
5237
- <code class="ruby"> if criteria[:dates]</code>
5237
+ <code class="ruby"> def self.parse_criteria(criteria)</code>
5238
5238
  </li>
5239
5239
 
5240
5240
  <li class="missed" data-hits="0" data-linenumber="122">
5241
5241
 
5242
5242
 
5243
- <code class="ruby"> # related events fails if filter_type is nil - this is a fallback for nil filter_type</code>
5243
+ <code class="ruby"> if criteria[:dates]</code>
5244
5244
  </li>
5245
5245
 
5246
5246
  <li class="missed" data-hits="0" data-linenumber="123">
5247
5247
 
5248
5248
 
5249
- <code class="ruby"> site_filter = Site.find_by_id(Page.current_site.id).festivity_filter_type</code>
5249
+ <code class="ruby"> # related events fails if filter_type is nil - this is a fallback for nil filter_type</code>
5250
5250
  </li>
5251
5251
 
5252
5252
  <li class="missed" data-hits="0" data-linenumber="124">
5253
5253
 
5254
5254
 
5255
- <code class="ruby"> filter = criteria[:filter_type] ||= site_filter</code>
5255
+ <code class="ruby"> site_filter = Site.find_by_id(Page.current_site.id).festivity_filter_type</code>
5256
5256
  </li>
5257
5257
 
5258
5258
  <li class="missed" data-hits="0" data-linenumber="125">
5259
5259
 
5260
5260
 
5261
- <code class="ruby"> event_ids = event_ids_for_datetimes(criteria[:dates], filter)</code>
5261
+ <code class="ruby"> filter = criteria[:filter_type] ||= site_filter</code>
5262
5262
  </li>
5263
5263
 
5264
5264
  <li class="missed" data-hits="0" data-linenumber="126">
5265
5265
 
5266
5266
 
5267
- <code class="ruby"> raise ActiveRecord::RecordNotFound unless event_ids.any?</code>
5267
+ <code class="ruby"> event_ids = event_ids_for_datetimes(criteria[:dates], filter)</code>
5268
5268
  </li>
5269
5269
 
5270
5270
  <li class="missed" data-hits="0" data-linenumber="127">
5271
5271
 
5272
5272
 
5273
- <code class="ruby"> end</code>
5273
+ <code class="ruby"> raise ActiveRecord::RecordNotFound unless event_ids.any?</code>
5274
5274
  </li>
5275
5275
 
5276
5276
  <li class="missed" data-hits="0" data-linenumber="128">
5277
5277
 
5278
5278
 
5279
- <code class="ruby"></code>
5279
+ <code class="ruby"> end</code>
5280
5280
  </li>
5281
5281
 
5282
5282
  <li class="missed" data-hits="0" data-linenumber="129">
5283
5283
 
5284
5284
 
5285
- <code class="ruby"> where_clause = &quot;site_id = #{ Page.current_site.id}&quot;</code>
5285
+ <code class="ruby"></code>
5286
5286
  </li>
5287
5287
 
5288
5288
  <li class="missed" data-hits="0" data-linenumber="130">
5289
5289
 
5290
5290
 
5291
- <code class="ruby"> where_clause += &quot; AND event_id IN (#{event_ids.join(&quot;,&quot;)})&quot; if event_ids.present?</code>
5291
+ <code class="ruby"> where_clause = &quot;site_id = #{ Page.current_site.id}&quot;</code>
5292
5292
  </li>
5293
5293
 
5294
5294
  <li class="missed" data-hits="0" data-linenumber="131">
5295
5295
 
5296
5296
 
5297
- <code class="ruby"> where_clause += &quot; AND #{parse_categories(criteria[:categories].split(&quot;,&quot;))}&quot; if criteria[:categories]</code>
5297
+ <code class="ruby"> where_clause += &quot; AND event_id IN (#{event_ids.join(&quot;,&quot;)})&quot; if event_ids.present?</code>
5298
5298
  </li>
5299
5299
 
5300
5300
  <li class="missed" data-hits="0" data-linenumber="132">
5301
5301
 
5302
5302
 
5303
- <code class="ruby"> where_clause</code>
5303
+ <code class="ruby"> where_clause += &quot; AND #{parse_categories(criteria[:categories].split(&quot;,&quot;))}&quot; if criteria[:categories]</code>
5304
5304
  </li>
5305
5305
 
5306
5306
  <li class="missed" data-hits="0" data-linenumber="133">
5307
5307
 
5308
5308
 
5309
- <code class="ruby"> end</code>
5309
+ <code class="ruby"> where_clause</code>
5310
5310
  </li>
5311
5311
 
5312
5312
  <li class="missed" data-hits="0" data-linenumber="134">
5313
5313
 
5314
5314
 
5315
- <code class="ruby"></code>
5315
+ <code class="ruby"> end</code>
5316
5316
  </li>
5317
5317
 
5318
5318
  <li class="missed" data-hits="0" data-linenumber="135">
@@ -5324,12 +5324,18 @@
5324
5324
  <li class="missed" data-hits="0" data-linenumber="136">
5325
5325
 
5326
5326
 
5327
- <code class="ruby">end</code>
5327
+ <code class="ruby"></code>
5328
5328
  </li>
5329
5329
 
5330
5330
  <li class="missed" data-hits="0" data-linenumber="137">
5331
5331
 
5332
5332
 
5333
+ <code class="ruby">end</code>
5334
+ </li>
5335
+
5336
+ <li class="missed" data-hits="0" data-linenumber="138">
5337
+
5338
+
5333
5339
  <code class="ruby"></code>
5334
5340
  </li>
5335
5341
 
@@ -8432,9 +8438,9 @@
8432
8438
  <h3>app/services/instagram_feed_service.rb</h3>
8433
8439
  <h4><span class="red">0.0 %</span> covered</h4>
8434
8440
  <div>
8435
- <b>13</b> relevant lines.
8441
+ <b>14</b> relevant lines.
8436
8442
  <span class="green"><b>0</b> lines covered</span> and
8437
- <span class="red"><b>13</b> lines missed.</span>
8443
+ <span class="red"><b>14</b> lines missed.</span>
8438
8444
  </div>
8439
8445
  </div>
8440
8446
 
@@ -8462,7 +8468,7 @@
8462
8468
  <li class="missed" data-hits="0" data-linenumber="4">
8463
8469
 
8464
8470
 
8465
- <code class="ruby"> @client = Instagram.client</code>
8471
+ <code class="ruby"> @client = Instagram.client(:access_token =&gt; ENV[&#39;INSTAGRAM_ACCESS_TOKEN&#39;])</code>
8466
8472
  </li>
8467
8473
 
8468
8474
  <li class="missed" data-hits="0" data-linenumber="5">
@@ -8486,36 +8492,42 @@
8486
8492
  <li class="missed" data-hits="0" data-linenumber="8">
8487
8493
 
8488
8494
 
8489
- <code class="ruby"> @client.tag_recent_media(tag).map do |post|</code>
8495
+ <code class="ruby"> tagged_posts = @client.user_recent_media.select{|post| post[:tags].include?(tag.downcase)}</code>
8490
8496
  </li>
8491
8497
 
8492
8498
  <li class="missed" data-hits="0" data-linenumber="9">
8493
8499
 
8494
8500
 
8495
- <code class="ruby"> Social::InstagramPostPresenter.from_instagram_post(post)</code>
8501
+ <code class="ruby"> tagged_posts.map do |post|</code>
8496
8502
  </li>
8497
8503
 
8498
8504
  <li class="missed" data-hits="0" data-linenumber="10">
8499
8505
 
8500
8506
 
8501
- <code class="ruby"> end</code>
8507
+ <code class="ruby"> Social::InstagramPostPresenter.from_instagram_post(post)</code>
8502
8508
  </li>
8503
8509
 
8504
8510
  <li class="missed" data-hits="0" data-linenumber="11">
8505
8511
 
8506
8512
 
8507
- <code class="ruby"> end</code>
8513
+ <code class="ruby"> end</code>
8508
8514
  </li>
8509
8515
 
8510
8516
  <li class="missed" data-hits="0" data-linenumber="12">
8511
8517
 
8512
8518
 
8513
- <code class="ruby"></code>
8519
+ <code class="ruby"> end</code>
8514
8520
  </li>
8515
8521
 
8516
8522
  <li class="missed" data-hits="0" data-linenumber="13">
8517
8523
 
8518
8524
 
8525
+ <code class="ruby"></code>
8526
+ </li>
8527
+
8528
+ <li class="missed" data-hits="0" data-linenumber="14">
8529
+
8530
+
8519
8531
  <code class="ruby">end</code>
8520
8532
  </li>
8521
8533
 
@@ -9140,78 +9152,90 @@
9140
9152
  <li class="never" data-hits="" data-linenumber="8">
9141
9153
 
9142
9154
 
9143
- <code class="ruby"> skins/crawl/skin.css</code>
9155
+ <code class="ruby"> skins/buzzword/skin.css</code>
9144
9156
  </li>
9145
9157
 
9146
9158
  <li class="never" data-hits="" data-linenumber="9">
9147
9159
 
9148
9160
 
9149
- <code class="ruby"> skins/first-night/skin.css</code>
9161
+ <code class="ruby"> skins/crawl/skin.css</code>
9150
9162
  </li>
9151
9163
 
9152
9164
  <li class="never" data-hits="" data-linenumber="10">
9153
9165
 
9154
9166
 
9155
- <code class="ruby"> skins/pghkids/skin.css</code>
9167
+ <code class="ruby"> skins/first-night/skin.css</code>
9156
9168
  </li>
9157
9169
 
9158
9170
  <li class="never" data-hits="" data-linenumber="11">
9159
9171
 
9160
9172
 
9161
- <code class="ruby"> skins/traf/skin.css</code>
9173
+ <code class="ruby"> skins/pghkids/skin.css</code>
9162
9174
  </li>
9163
9175
 
9164
9176
  <li class="never" data-hits="" data-linenumber="12">
9165
9177
 
9166
9178
 
9167
- <code class="ruby"> admin/festivity_admin.css</code>
9179
+ <code class="ruby"> skins/traf/skin.css</code>
9168
9180
  </li>
9169
9181
 
9170
9182
  <li class="never" data-hits="" data-linenumber="13">
9171
9183
 
9172
9184
 
9173
- <code class="ruby"> admin/festivity_admin.js</code>
9185
+ <code class="ruby"> skins/buzzword/skin.css</code>
9174
9186
  </li>
9175
9187
 
9176
9188
  <li class="never" data-hits="" data-linenumber="14">
9177
9189
 
9178
9190
 
9179
- <code class="ruby"> festivity_app.js</code>
9191
+ <code class="ruby"> admin/festivity_admin.css</code>
9180
9192
  </li>
9181
9193
 
9182
9194
  <li class="never" data-hits="" data-linenumber="15">
9183
9195
 
9184
9196
 
9185
- <code class="ruby"> grunticon/production/grunticon.loader.js</code>
9197
+ <code class="ruby"> admin/festivity_admin.js</code>
9186
9198
  </li>
9187
9199
 
9188
9200
  <li class="never" data-hits="" data-linenumber="16">
9189
9201
 
9190
9202
 
9191
- <code class="ruby"> grunticon/production/*.css)</code>
9203
+ <code class="ruby"> festivity_app.js</code>
9192
9204
  </li>
9193
9205
 
9194
9206
  <li class="never" data-hits="" data-linenumber="17">
9195
9207
 
9196
9208
 
9197
- <code class="ruby"> end</code>
9209
+ <code class="ruby"> grunticon/production/grunticon.loader.js</code>
9198
9210
  </li>
9199
9211
 
9200
9212
  <li class="never" data-hits="" data-linenumber="18">
9201
9213
 
9202
9214
 
9203
- <code class="ruby"> end</code>
9215
+ <code class="ruby"> grunticon/production/*.css)</code>
9204
9216
  </li>
9205
9217
 
9206
9218
  <li class="never" data-hits="" data-linenumber="19">
9207
9219
 
9208
9220
 
9209
- <code class="ruby"></code>
9221
+ <code class="ruby"> end</code>
9210
9222
  </li>
9211
9223
 
9212
9224
  <li class="never" data-hits="" data-linenumber="20">
9213
9225
 
9214
9226
 
9227
+ <code class="ruby"> end</code>
9228
+ </li>
9229
+
9230
+ <li class="never" data-hits="" data-linenumber="21">
9231
+
9232
+
9233
+ <code class="ruby"></code>
9234
+ </li>
9235
+
9236
+ <li class="never" data-hits="" data-linenumber="22">
9237
+
9238
+
9215
9239
  <code class="ruby">end</code>
9216
9240
  </li>
9217
9241
 
@@ -11864,7 +11888,7 @@
11864
11888
  <li class="missed" data-hits="0" data-linenumber="2">
11865
11889
 
11866
11890
 
11867
- <code class="ruby"> VERSION = &quot;2.5.7&quot;</code>
11891
+ <code class="ruby"> VERSION = &quot;2.5.18&quot;</code>
11868
11892
  </li>
11869
11893
 
11870
11894
  <li class="missed" data-hits="0" data-linenumber="3">