bookable 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +17 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +22 -0
- data/README.md +78 -0
- data/Rakefile +1 -0
- data/bookable.gemspec +27 -0
- data/lib/bookable/bookable.rb +2 -0
- data/lib/bookable/generators/bookable/booking_model_generator.rb +33 -0
- data/lib/bookable/generators/bookable/controller_generator.rb +29 -0
- data/lib/bookable/generators/bookable/css_generator.rb +13 -0
- data/lib/bookable/generators/bookable/install_generator.rb +18 -0
- data/lib/bookable/generators/bookable/js_generator.rb +21 -0
- data/lib/bookable/generators/bookable/resource_model_generator.rb +28 -0
- data/lib/bookable/generators/bookable/templates/assets/javascript/calendar-editable.js +6991 -0
- data/lib/bookable/generators/bookable/templates/assets/javascript/custom.js +130 -0
- data/lib/bookable/generators/bookable/templates/assets/javascript/fullcalendar.js +6110 -0
- data/lib/bookable/generators/bookable/templates/assets/stylesheets/custom.css +29 -0
- data/lib/bookable/generators/bookable/templates/assets/stylesheets/fullcalendar.css +589 -0
- data/lib/bookable/generators/bookable/templates/controllers/booking_controller.rb +77 -0
- data/lib/bookable/generators/bookable/templates/controllers/resource_controller.rb +50 -0
- data/lib/bookable/generators/bookable/templates/models/bookable.rb +114 -0
- data/lib/bookable/generators/bookable/templates/models/booking.rb +5 -0
- data/lib/bookable/generators/bookable/templates/models/datetime.rb +6 -0
- data/lib/bookable/generators/bookable/templates/models/resource.rb +5 -0
- data/lib/bookable/generators/bookable/templates/views/_errors.html.erb +13 -0
- data/lib/bookable/generators/bookable/templates/views/_form.html.erb +6 -0
- data/lib/bookable/generators/bookable/templates/views/bookings/_errors.html.erb +12 -0
- data/lib/bookable/generators/bookable/templates/views/bookings/_form.html.erb +11 -0
- data/lib/bookable/generators/bookable/templates/views/bookings/edit.html.erb +9 -0
- data/lib/bookable/generators/bookable/templates/views/bookings/index.html.erb +22 -0
- data/lib/bookable/generators/bookable/templates/views/bookings/new.html.erb +9 -0
- data/lib/bookable/generators/bookable/templates/views/bookings/show.html.erb +7 -0
- data/lib/bookable/generators/bookable/templates/views/edit.html.erb +1 -0
- data/lib/bookable/generators/bookable/templates/views/index.html.erb +11 -0
- data/lib/bookable/generators/bookable/templates/views/new.html.erb +1 -0
- data/lib/bookable/generators/bookable/views_generator.rb +26 -0
- data/lib/bookable/railtie.rb +11 -0
- data/lib/bookable/version.rb +3 -0
- metadata +147 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
class BookingsController < ApplicationController
|
|
2
|
+
respond_to :html, :xml, :json
|
|
3
|
+
|
|
4
|
+
before_action :find_<%=resource_name_underscore.singularize%>
|
|
5
|
+
|
|
6
|
+
def index
|
|
7
|
+
@bookings = Booking.where("<%=resource_name.singularize%>_id = ? AND end_time >= ?", @<%=resource_name.singularize%>.id, Time.now).order(:start_time)
|
|
8
|
+
respond_with @bookings
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def new
|
|
12
|
+
@booking = Booking.new(<%=resource_name.singularize%>_id: @<%=resource_name.singularize%>.id)
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def create
|
|
16
|
+
@booking = Booking.new(params[:booking].permit(:<%=resource_name.singularize%>_id, :start_time, :length))
|
|
17
|
+
@booking.<%=resource_name.singularize%> = @<%=resource_name.singularize%>
|
|
18
|
+
if @booking.save
|
|
19
|
+
redirect_to <%=resource_name.singularize%>_bookings_path(@<%=resource_name.singularize%>, method: :get)
|
|
20
|
+
else
|
|
21
|
+
render 'new'
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def show
|
|
26
|
+
@booking = Booking.find(params[:id])
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def destroy
|
|
30
|
+
@booking = Booking.find(params[:id]).destroy
|
|
31
|
+
if @booking.destroy
|
|
32
|
+
flash[:notice] = "Booking: #{@booking.start_time.strftime('%e %b %Y %H:%M%p')} to #{@booking.end_time.strftime('%e %b %Y %H:%M%p')} deleted"
|
|
33
|
+
redirect_to <%=resource_name.singularize%>_bookings_path(@<%=resource_name.singularize%>)
|
|
34
|
+
else
|
|
35
|
+
render 'index'
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def edit
|
|
40
|
+
@booking = Booking.find(params[:id])
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def update
|
|
44
|
+
@booking = Booking.find(params[:id])
|
|
45
|
+
# @booking.<%=resource_name%> = @<%=resource_name%>
|
|
46
|
+
|
|
47
|
+
if @booking.update(params[:booking].permit(:<%=resource_name.singularize%>_id, :start_time, :length))
|
|
48
|
+
flash[:notice] = 'Your booking was updated succesfully'
|
|
49
|
+
|
|
50
|
+
if request.xhr?
|
|
51
|
+
render json: {status: :success}.to_json
|
|
52
|
+
else
|
|
53
|
+
redirect_to <%=resource_name.singularize%>_bookings_path(@<%=resource_name.singularize%>)
|
|
54
|
+
end
|
|
55
|
+
else
|
|
56
|
+
render 'edit'
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
private
|
|
61
|
+
|
|
62
|
+
def save booking
|
|
63
|
+
if @booking.save
|
|
64
|
+
flash[:notice] = 'booking added'
|
|
65
|
+
redirect_to <%=resource_name.singularize%>_booking_path(@<%=resource_name.singularize%>, @booking)
|
|
66
|
+
else
|
|
67
|
+
render 'new'
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def find_<%=resource_name.singularize%>
|
|
72
|
+
if params[:<%=resource_name.singularize%>_id]
|
|
73
|
+
@<%=resource_name.singularize%> = <%=resource_name_camelize.singularize%>.find_by_id(params[:<%=resource_name.singularize%>_id])
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
class <%=resource_name_camelize.singularize.pluralize%>Controller < ApplicationController
|
|
2
|
+
|
|
3
|
+
def index
|
|
4
|
+
@<%=resource_name_underscore.pluralize%> = <%=resource_name_camelize.singularize%>.all
|
|
5
|
+
end
|
|
6
|
+
|
|
7
|
+
def new
|
|
8
|
+
@<%=resource_name_underscore.singularize%> = <%=resource_name_camelize.singularize%>.new
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def create
|
|
12
|
+
@<%=resource_name_underscore.singularize%> = <%=resource_name_camelize.singularize%>.create(<%=resource_name_underscore.singularize%>_params)
|
|
13
|
+
if @<%=resource_name_underscore.singularize%>.save
|
|
14
|
+
name = @<%=resource_name_underscore.singularize%>.name
|
|
15
|
+
redirect_to <%=resource_name_underscore.pluralize%>_path
|
|
16
|
+
flash[:notice] = "#{name} created"
|
|
17
|
+
else
|
|
18
|
+
render 'new'
|
|
19
|
+
flash[:error] = "Unable to create <%=resource_name_underscore.singularize.gsub(/(_)/, ' ')%>. Please try again"
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def destroy
|
|
24
|
+
@<%=resource_name_underscore.singularize%> = <%= resource_name_camelize.singularize%>.find(params[:id])
|
|
25
|
+
@<%=resource_name_underscore.singularize%>.destroy
|
|
26
|
+
redirect_to <%=resource_name_underscore.pluralize%>_path
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def edit
|
|
30
|
+
@<%=resource_name_underscore.singularize%> = <%=resource_name_camelize.singularize%>.find(params[:id])
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def update
|
|
34
|
+
@<%=resource_name_underscore.singularize%> = <%=resource_name_camelize.singularize%>.find(params[:id])
|
|
35
|
+
@<%=resource_name_underscore.singularize%>.update <%=resource_name_underscore.singularize%>_params
|
|
36
|
+
if @<%=resource_name_underscore.singularize%>.save
|
|
37
|
+
flash[:notice] = "Your <%=resource_name_underscore.singularize.gsub(/(_)/, ' ')%> was updated succesfully"
|
|
38
|
+
redirect_to root_path
|
|
39
|
+
else
|
|
40
|
+
render 'edit'
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
private
|
|
45
|
+
|
|
46
|
+
def <%=resource_name_underscore.singularize%>_params
|
|
47
|
+
params.require(:<%=resource_name_underscore.singularize%>).permit(:name, :delete)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
end
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
module Bookable
|
|
2
|
+
extend ActiveSupport::Concern
|
|
3
|
+
|
|
4
|
+
included do
|
|
5
|
+
belongs_to :<%=resource_name_underscore.singularize%>
|
|
6
|
+
|
|
7
|
+
validates :start_time, presence: true
|
|
8
|
+
validates :length, presence: true, numericality: { greater_than: 0 }
|
|
9
|
+
validate :start_date_cannot_be_in_the_past
|
|
10
|
+
validate :overlaps
|
|
11
|
+
|
|
12
|
+
before_validation :calculate_end_time
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
scope :end_during, ->(new_start_time, new_end_time) do
|
|
16
|
+
if (!new_start_time.nil?) && (!new_end_time.nil?)
|
|
17
|
+
where('end_time > ? AND end_time < ?', new_start_time, new_end_time)
|
|
18
|
+
else
|
|
19
|
+
return nil
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
scope :start_during, ->(new_start_time, new_end_time) do
|
|
24
|
+
if (!new_start_time.nil?) && (!new_end_time.nil?)
|
|
25
|
+
where('start_time > ? AND start_time < ?', new_start_time, new_end_time)
|
|
26
|
+
else
|
|
27
|
+
return nil
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
scope :happening_during, ->(new_start_time, new_end_time) do
|
|
32
|
+
if (!new_start_time.nil?) && (!new_end_time.nil?)
|
|
33
|
+
where('start_time > ? AND end_time < ?', new_start_time, new_end_time)
|
|
34
|
+
else
|
|
35
|
+
return nil
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
scope :enveloping, ->(new_start_time, new_end_time) do
|
|
40
|
+
if (!new_start_time.nil?) && (!new_end_time.nil?)
|
|
41
|
+
where('start_time < ? AND end_time > ?', new_start_time, new_end_time)
|
|
42
|
+
else
|
|
43
|
+
return nil
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
scope :identical, ->(new_start_time, new_end_time) do
|
|
48
|
+
if (!new_start_time.nil?) && (!new_end_time.nil?)
|
|
49
|
+
where('start_time = ? AND end_time = ?', new_start_time, new_end_time)
|
|
50
|
+
else
|
|
51
|
+
return nil
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def overlaps
|
|
57
|
+
overlapping_bookings = [
|
|
58
|
+
<%=resource_name_underscore.singularize%>.bookings.end_during(start_time, end_time),
|
|
59
|
+
<%=resource_name_underscore.singularize%>.bookings.start_during(start_time, end_time),
|
|
60
|
+
<%=resource_name_underscore.singularize%>.bookings.happening_during(start_time, end_time),
|
|
61
|
+
<%=resource_name_underscore.singularize%>.bookings.enveloping(start_time, end_time),
|
|
62
|
+
<%=resource_name_underscore.singularize%>.bookings.identical(start_time, end_time)
|
|
63
|
+
].flatten
|
|
64
|
+
|
|
65
|
+
overlapping_bookings.delete self
|
|
66
|
+
if overlapping_bookings.any?
|
|
67
|
+
errors.add(:base, 'Slot has already been booked')
|
|
68
|
+
end
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def start_date_cannot_be_in_the_past
|
|
72
|
+
if start_time && start_time < DateTime.now + (15.minutes)
|
|
73
|
+
errors.add(:start_time, 'must be at least 15 minutes from present time')
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def calculate_end_time
|
|
78
|
+
start_time = validate_start_time
|
|
79
|
+
length = validate_length
|
|
80
|
+
if start_time && length
|
|
81
|
+
self.end_time = start_time + (length.hours - 60)
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
def as_json(options = {})
|
|
87
|
+
{
|
|
88
|
+
:id => self.id,
|
|
89
|
+
:start => self.start_time,
|
|
90
|
+
:end => self.end_time + 60,
|
|
91
|
+
:recurring => false,
|
|
92
|
+
:allDay => false
|
|
93
|
+
}
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
private
|
|
97
|
+
|
|
98
|
+
def validate_start_time
|
|
99
|
+
if !self.start_time.nil?
|
|
100
|
+
start_time = self.start_time
|
|
101
|
+
else
|
|
102
|
+
return nil
|
|
103
|
+
end
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def validate_length
|
|
107
|
+
if !self.length.nil?
|
|
108
|
+
length = self.length.to_i
|
|
109
|
+
else
|
|
110
|
+
return nil
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<%% if @<%=bookable_views_name.singularize%>.errors.any? %>
|
|
2
|
+
<div class="errors">
|
|
3
|
+
<h3>
|
|
4
|
+
<%%= pluralize(@<%=bookable_views_name.singularize%>.errors.count, 'error') %>
|
|
5
|
+
prohibited this <%=bookable_views_name.singularize%> from being saved:
|
|
6
|
+
</h3>
|
|
7
|
+
<ul>
|
|
8
|
+
<%% @<%=bookable_views_name.singularize%>.errors.full_messages.each do |message| %>
|
|
9
|
+
<li><%%= message %></li>
|
|
10
|
+
<%% end %>
|
|
11
|
+
</ul>
|
|
12
|
+
</div>
|
|
13
|
+
<%% end %>
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<%% if @booking.errors.any? %>
|
|
2
|
+
<div class="errors">
|
|
3
|
+
<h3><%%= pluralize(@booking.errors.count, 'error') %>
|
|
4
|
+
prohibited this booking from being saved:
|
|
5
|
+
</h3>
|
|
6
|
+
<ul>
|
|
7
|
+
<%% @booking.errors.full_messages.each do |message| %>
|
|
8
|
+
<li><%%= message %></li>
|
|
9
|
+
<%% end %>
|
|
10
|
+
</ul>
|
|
11
|
+
</div>
|
|
12
|
+
<%% end %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<%%= form_for([@<%=bookable_views_name.singularize%>, @booking]) do |f| %>
|
|
2
|
+
<p>
|
|
3
|
+
<%%= f.label 'start_time', 'Start time' %>
|
|
4
|
+
<%%= f.datetime_select :start_time, { minute_step: 15 } %>
|
|
5
|
+
</p>
|
|
6
|
+
<p>
|
|
7
|
+
<%%= f.label 'length', 'Length of booking in hours' %>
|
|
8
|
+
<%%= f.number_field 'length', min: 1 %>
|
|
9
|
+
</p>
|
|
10
|
+
<%%= f.submit 'Submit' %>
|
|
11
|
+
<%% end %>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<h3> Bookings for <%%= @<%=bookable_views_name.singularize%>.name %></h3>
|
|
2
|
+
<table>
|
|
3
|
+
<tr>
|
|
4
|
+
<th>Start</th>
|
|
5
|
+
<th>End</th>
|
|
6
|
+
</tr>
|
|
7
|
+
|
|
8
|
+
<%% @bookings.each do |booking| %>
|
|
9
|
+
<tr>
|
|
10
|
+
<td>
|
|
11
|
+
<%%= booking.start_time.strftime('%e %b %Y %H:%M%p') %>
|
|
12
|
+
</td>
|
|
13
|
+
<td>
|
|
14
|
+
<%%= (booking.calculate_end_time + 60).strftime('%e %b %Y %H:%M%p') %>
|
|
15
|
+
</td>
|
|
16
|
+
<td><%%= link_to "Delete", <%=bookable_views_name.singularize%>_booking_path(@<%=bookable_views_name.singularize%>, booking), data: { confirm: 'Are you sure?' }, method: :delete %>
|
|
17
|
+
</td>
|
|
18
|
+
<td><%%= link_to "Edit", edit_<%=bookable_views_name.singularize%>_booking_path(@<%=bookable_views_name.singularize%>, booking) %>
|
|
19
|
+
</td>
|
|
20
|
+
</tr>
|
|
21
|
+
<%% end %>
|
|
22
|
+
</table>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%%= render 'form' %>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<h3><%=bookable_views_name.pluralize.gsub(/(_)/,' ')%></h3>
|
|
2
|
+
|
|
3
|
+
<%% @<%=bookable_views_name.pluralize%>.each do |<%=bookable_views_name.singularize%>| %>
|
|
4
|
+
<div class="<%=bookable_views_name.singularize%>">
|
|
5
|
+
<%%= <%=bookable_views_name.singularize%>.name %>
|
|
6
|
+
<%%= link_to "Show all bookings", <%=bookable_views_name.singularize%>_bookings_path(<%=bookable_views_name.singularize%>) %>
|
|
7
|
+
<%%= link_to "Delete", <%=bookable_views_name.singularize%>_path(<%=bookable_views_name.singularize%>), data: { confirm: 'Are you sure?' }, method: :delete %>
|
|
8
|
+
<%%= link_to "Edit", edit_<%=bookable_views_name.singularize%>_path(<%=bookable_views_name.singularize%>) %>
|
|
9
|
+
<%%= link_to "Add booking", new_<%=bookable_views_name.singularize%>_booking_path(<%=bookable_views_name.singularize%>) %>
|
|
10
|
+
</div>
|
|
11
|
+
<%% end %>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<%%= render 'form' %>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module Bookable
|
|
2
|
+
module Generators
|
|
3
|
+
class ViewsGenerator < Rails::Generators::Base
|
|
4
|
+
source_root File.expand_path('../templates/views', __FILE__)
|
|
5
|
+
|
|
6
|
+
argument :bookable_views_name, :type => :string, :default => "resources"
|
|
7
|
+
|
|
8
|
+
def generate_bookable_views
|
|
9
|
+
template "_errors.html.erb", "app/views/#{bookable_views_name.pluralize}/_errors.html.erb"
|
|
10
|
+
template "_form.html.erb", "app/views/#{bookable_views_name.pluralize}/_form.html.erb"
|
|
11
|
+
template "edit.html.erb", "app/views/#{bookable_views_name.pluralize}/edit.html.erb"
|
|
12
|
+
template "index.html.erb", "app/views/#{bookable_views_name.pluralize}/index.html.erb"
|
|
13
|
+
template "new.html.erb", "app/views/#{bookable_views_name.pluralize}/new.html.erb"
|
|
14
|
+
|
|
15
|
+
template "bookings/_errors.html.erb", "app/views/bookings/_errors.html.erb"
|
|
16
|
+
template "bookings/_form.html.erb", "app/views/bookings/_form.html.erb"
|
|
17
|
+
template "bookings/edit.html.erb", "app/views/bookings/edit.html.erb"
|
|
18
|
+
template "bookings/index.html.erb", "app/views/bookings/index.html.erb"
|
|
19
|
+
template "bookings/new.html.erb", "app/views/bookings/new.html.erb"
|
|
20
|
+
template "bookings/show.html.erb", "app/views/bookings/show.html.erb"
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
metadata
ADDED
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: bookable
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.5
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Srikanth
|
|
8
|
+
- Margo
|
|
9
|
+
- Jon
|
|
10
|
+
autorequire:
|
|
11
|
+
bindir: bin
|
|
12
|
+
cert_chain: []
|
|
13
|
+
date: 2013-11-07 00:00:00.000000000 Z
|
|
14
|
+
dependencies:
|
|
15
|
+
- !ruby/object:Gem::Dependency
|
|
16
|
+
name: bundler
|
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
|
18
|
+
requirements:
|
|
19
|
+
- - ~>
|
|
20
|
+
- !ruby/object:Gem::Version
|
|
21
|
+
version: '1.3'
|
|
22
|
+
type: :development
|
|
23
|
+
prerelease: false
|
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
25
|
+
requirements:
|
|
26
|
+
- - ~>
|
|
27
|
+
- !ruby/object:Gem::Version
|
|
28
|
+
version: '1.3'
|
|
29
|
+
- !ruby/object:Gem::Dependency
|
|
30
|
+
name: rake
|
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
|
32
|
+
requirements:
|
|
33
|
+
- - '>='
|
|
34
|
+
- !ruby/object:Gem::Version
|
|
35
|
+
version: '0'
|
|
36
|
+
type: :development
|
|
37
|
+
prerelease: false
|
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
39
|
+
requirements:
|
|
40
|
+
- - '>='
|
|
41
|
+
- !ruby/object:Gem::Version
|
|
42
|
+
version: '0'
|
|
43
|
+
- !ruby/object:Gem::Dependency
|
|
44
|
+
name: jbuilder
|
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
|
46
|
+
requirements:
|
|
47
|
+
- - ~>
|
|
48
|
+
- !ruby/object:Gem::Version
|
|
49
|
+
version: '1.2'
|
|
50
|
+
type: :runtime
|
|
51
|
+
prerelease: false
|
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
53
|
+
requirements:
|
|
54
|
+
- - ~>
|
|
55
|
+
- !ruby/object:Gem::Version
|
|
56
|
+
version: '1.2'
|
|
57
|
+
- !ruby/object:Gem::Dependency
|
|
58
|
+
name: rails_12factor
|
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
|
60
|
+
requirements:
|
|
61
|
+
- - '>='
|
|
62
|
+
- !ruby/object:Gem::Version
|
|
63
|
+
version: '0'
|
|
64
|
+
type: :runtime
|
|
65
|
+
prerelease: false
|
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
67
|
+
requirements:
|
|
68
|
+
- - '>='
|
|
69
|
+
- !ruby/object:Gem::Version
|
|
70
|
+
version: '0'
|
|
71
|
+
description: a bookings reservation gem for rails 4.0
|
|
72
|
+
email:
|
|
73
|
+
- srikanth.kunkulagunta@gmail.com
|
|
74
|
+
- margo@margonline.co.uk
|
|
75
|
+
- chewymeister88@googlemail.com
|
|
76
|
+
executables: []
|
|
77
|
+
extensions: []
|
|
78
|
+
extra_rdoc_files: []
|
|
79
|
+
files:
|
|
80
|
+
- .gitignore
|
|
81
|
+
- Gemfile
|
|
82
|
+
- LICENSE.txt
|
|
83
|
+
- README.md
|
|
84
|
+
- Rakefile
|
|
85
|
+
- bookable.gemspec
|
|
86
|
+
- lib/bookable/bookable.rb
|
|
87
|
+
- lib/bookable/generators/bookable/booking_model_generator.rb
|
|
88
|
+
- lib/bookable/generators/bookable/controller_generator.rb
|
|
89
|
+
- lib/bookable/generators/bookable/css_generator.rb
|
|
90
|
+
- lib/bookable/generators/bookable/install_generator.rb
|
|
91
|
+
- lib/bookable/generators/bookable/js_generator.rb
|
|
92
|
+
- lib/bookable/generators/bookable/resource_model_generator.rb
|
|
93
|
+
- lib/bookable/generators/bookable/templates/assets/javascript/calendar-editable.js
|
|
94
|
+
- lib/bookable/generators/bookable/templates/assets/javascript/custom.js
|
|
95
|
+
- lib/bookable/generators/bookable/templates/assets/javascript/fullcalendar.js
|
|
96
|
+
- lib/bookable/generators/bookable/templates/assets/stylesheets/custom.css
|
|
97
|
+
- lib/bookable/generators/bookable/templates/assets/stylesheets/fullcalendar.css
|
|
98
|
+
- lib/bookable/generators/bookable/templates/controllers/booking_controller.rb
|
|
99
|
+
- lib/bookable/generators/bookable/templates/controllers/resource_controller.rb
|
|
100
|
+
- lib/bookable/generators/bookable/templates/models/bookable.rb
|
|
101
|
+
- lib/bookable/generators/bookable/templates/models/booking.rb
|
|
102
|
+
- lib/bookable/generators/bookable/templates/models/datetime.rb
|
|
103
|
+
- lib/bookable/generators/bookable/templates/models/resource.rb
|
|
104
|
+
- lib/bookable/generators/bookable/templates/views/_errors.html.erb
|
|
105
|
+
- lib/bookable/generators/bookable/templates/views/_form.html.erb
|
|
106
|
+
- lib/bookable/generators/bookable/templates/views/bookings/_errors.html.erb
|
|
107
|
+
- lib/bookable/generators/bookable/templates/views/bookings/_form.html.erb
|
|
108
|
+
- lib/bookable/generators/bookable/templates/views/bookings/edit.html.erb
|
|
109
|
+
- lib/bookable/generators/bookable/templates/views/bookings/index.html.erb
|
|
110
|
+
- lib/bookable/generators/bookable/templates/views/bookings/new.html.erb
|
|
111
|
+
- lib/bookable/generators/bookable/templates/views/bookings/show.html.erb
|
|
112
|
+
- lib/bookable/generators/bookable/templates/views/edit.html.erb
|
|
113
|
+
- lib/bookable/generators/bookable/templates/views/index.html.erb
|
|
114
|
+
- lib/bookable/generators/bookable/templates/views/new.html.erb
|
|
115
|
+
- lib/bookable/generators/bookable/views_generator.rb
|
|
116
|
+
- lib/bookable/railtie.rb
|
|
117
|
+
- lib/bookable/version.rb
|
|
118
|
+
homepage: https://github.com/kunks001/bookable
|
|
119
|
+
licenses:
|
|
120
|
+
- MIT
|
|
121
|
+
metadata: {}
|
|
122
|
+
post_install_message:
|
|
123
|
+
rdoc_options: []
|
|
124
|
+
require_paths:
|
|
125
|
+
- lib
|
|
126
|
+
- lib/bookable
|
|
127
|
+
- lib/bookable/generators
|
|
128
|
+
- lib/bookable/generators/bookable
|
|
129
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
130
|
+
requirements:
|
|
131
|
+
- - '>='
|
|
132
|
+
- !ruby/object:Gem::Version
|
|
133
|
+
version: '0'
|
|
134
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
|
+
requirements:
|
|
136
|
+
- - '>='
|
|
137
|
+
- !ruby/object:Gem::Version
|
|
138
|
+
version: '0'
|
|
139
|
+
requirements: []
|
|
140
|
+
rubyforge_project:
|
|
141
|
+
rubygems_version: 2.0.3
|
|
142
|
+
signing_key:
|
|
143
|
+
specification_version: 4
|
|
144
|
+
summary: Bookable is a Rails 4.0 gem that enables you to add resource booking functionality
|
|
145
|
+
to your Rails application. A resource can be anything that is bookable e.g. tennis
|
|
146
|
+
court, football pitch, bowling lane, function room, conference room, office space.
|
|
147
|
+
test_files: []
|