simple_calendar 2.0.0 → 2.0.1

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: 8dfc97c340a63812f227e879a6756c2802c50488
4
- data.tar.gz: ebf3dad29eae132666ecc41060996ca812e59d9c
3
+ metadata.gz: 62254f5fef1e894c99a533e9e5254acbc5c9f1c5
4
+ data.tar.gz: 6095a62f0af5cf5e48b9b2cba01307ddd24abbe7
5
5
  SHA512:
6
- metadata.gz: c7fcff14b9f734bd872120d693bd3b71434cf82d439d92a11767c3cc6fbc862a05d2b297b7937b3704b5c5adf5d0dee6a2390b1bbb0a58a0d9003ad53d0fa9d8
7
- data.tar.gz: 32501ddee6d5535fd55a1af0487b66ba9a3b23c3e464e48181e1bb7956de0efacc599decff45c131b9f8ba9f7b4865eb81ea0b8bf7a9256a66d022894332942f
6
+ metadata.gz: f51067733929d0d1885c389285517e2864a2b34d5b13772f31ee13a342c53ef4250238a1019fda310fc308e010349efb4c81076ffdc0f72e8b8f40410a55c5a6
7
+ data.tar.gz: 28f2a049bcd185715bec4e18f3ce8bfb3c0ce144e698b7d1deb5e81ccdbd58b904fad908751a206e50deb0a2f0072c7fb633c983118a97f4ce9f9b61ac3f07a3
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2015 Chris Oliver
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- ![travis ci](https://travis-ci.org/excid3/simple_calendar.svg?branch=2.0)
1
+ ![travis ci](https://travis-ci.org/excid3/simple_calendar.svg?branch=master)
2
2
 
3
3
  Simple Calendar
4
4
  ===============
@@ -17,7 +17,7 @@
17
17
  <tr>
18
18
  <% week.each do |day| %>
19
19
  <%= content_tag :td, class: calendar.td_classes_for(day) do %>
20
- <%= block.call day, sorted_events.fetch(day, []) %>
20
+ <% block.call day, sorted_events.fetch(day, []) %>
21
21
  <% end %>
22
22
  <% end %>
23
23
  </tr>
@@ -17,7 +17,7 @@
17
17
  <tr>
18
18
  <% week.each do |day| %>
19
19
  <%= content_tag :td, class: calendar.td_classes_for(day) do %>
20
- <%= block.call day, sorted_events.fetch(day, []) %>
20
+ <% block.call day, sorted_events.fetch(day, []) %>
21
21
  <% end %>
22
22
  <% end %>
23
23
  </tr>
@@ -17,7 +17,7 @@
17
17
  <tr>
18
18
  <% week.each do |day| %>
19
19
  <%= content_tag :td, class: calendar.td_classes_for(day) do %>
20
- <%= block.call day, sorted_events.fetch(day, []) %>
20
+ <% block.call day, sorted_events.fetch(day, []) %>
21
21
  <% end %>
22
22
  <% end %>
23
23
  </tr>
@@ -50,7 +50,7 @@ module SimpleCalendar
50
50
  end
51
51
 
52
52
  def sorted_events
53
- events = options.fetch(:events, [])
53
+ events = options.fetch(:events, []).sort_by(&attribute)
54
54
  sorted = {}
55
55
 
56
56
  events.each do |event|
@@ -59,12 +59,9 @@ module SimpleCalendar
59
59
  date = start_time.to_date
60
60
  sorted[date] ||= []
61
61
  sorted[date] << event
62
- sorted[date] = sorted[date].sort_by(&attribute)
63
62
  end
64
63
  end
65
64
 
66
- # TODO: move sorting by start_time to after the event loop
67
-
68
65
  sorted
69
66
  end
70
67
 
@@ -1,3 +1,3 @@
1
1
  module SimpleCalendar
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
@@ -10,7 +10,8 @@ Gem::Specification.new do |s|
10
10
  s.homepage = "https://github.com/excid3/simple_calendar"
11
11
  s.summary = %q{A simple Rails 3 and Rails 4 calendar}
12
12
  s.description = %q{A simple Rails 3 and Rails 4 calendar}
13
-
13
+ s.license = "MIT"
14
+
14
15
  s.rubyforge_project = "simple_calendar"
15
16
 
16
17
  s.files = `git ls-files`.split("\n")
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_calendar
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Oliver
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-07 00:00:00.000000000 Z
11
+ date: 2015-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -51,6 +51,7 @@ files:
51
51
  - ".rspec"
52
52
  - ".travis.yml"
53
53
  - Gemfile
54
+ - LICENSE.txt
54
55
  - README.md
55
56
  - Rakefile
56
57
  - app/views/simple_calendar/_calendar.html.erb
@@ -73,7 +74,8 @@ files:
73
74
  - spec/spec_helper.rb
74
75
  - spec/views_generators_spec.rb
75
76
  homepage: https://github.com/excid3/simple_calendar
76
- licenses: []
77
+ licenses:
78
+ - MIT
77
79
  metadata: {}
78
80
  post_install_message:
79
81
  rdoc_options: []