bookingsync_portal 0.9.0 → 1.0.0

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: 8be3c2f7caed8630671afddc907fab2dd7fe9c8c
4
- data.tar.gz: 500ad107e8f8f80cc857e6919e86a1f742c19b5b
3
+ metadata.gz: 76cbb051fc7aaba60b8e4f24a45fe3ce20ba88eb
4
+ data.tar.gz: 34a4dd0a99cace843610a4f38f8eaaf857d7a709
5
5
  SHA512:
6
- metadata.gz: 4d3d62715b79d3d60f86a690adc3c7e366f6a43dab5d80bf11009e6c1567729f5e202be16403f7bfe7aebd450fb9e6f2106eaae50b714fb63f18276adf409179
7
- data.tar.gz: 5326ddd6268ac75402b1389beb4308ac72f0654e0a0938573894c423d0447ede0991b7786184f2ac50f1b87bbb302758e07b26127633d06041f3e769d6b9cd05
6
+ metadata.gz: 3134493e31826cefecb45e6f73264728511ad230e0c4f438f4834d61fe9e6912915fedd627eefe99d1d5a982ac710680dde20c7ca39e41a218ad3bcb5f1ec61b
7
+ data.tar.gz: 086aeb339da7eeaed6eecbaf65243392bfaa81d4b6aa1493907add52b254a0a540748e6163dc01cd09118debc50ebbe3c7e3e135fbfd4a62bf5576662d7fddc2
@@ -14,15 +14,15 @@ class @ListFilter
14
14
  observeInputChanges: ->
15
15
  @input.change( =>
16
16
  filter = $(event.target).val()
17
- @showElements @listFilterable + ":not(:Contains(" + filter + "))"
18
- @hideElements @listFilterable + ":Contains(" + filter + ")"
17
+ @hideElements @listFilterable + ":not(:Contains(" + filter + "))"
18
+ @showElements @listFilterable + ":Contains(" + filter + ")"
19
19
  false
20
20
  ).keyup =>
21
21
  # fire the above change event after every letter
22
22
  @input.change()
23
23
 
24
24
  showElements: (elements) ->
25
- @list.find(elements).parents(@listElement).slideUp()
25
+ @list.find(elements).parents(@listElement).show()
26
26
 
27
27
  hideElements: (elements) ->
28
- @list.find(elements).parents(@listElement).slideDown()
28
+ @list.find(elements).parents(@listElement).hide()
@@ -1,4 +1,4 @@
1
- require 'bookingsync_application/admin/common_base_controller'
1
+ require 'bookingsync_application/controllers/common_base'
2
2
 
3
3
  module BookingsyncPortal
4
4
  module Admin
@@ -6,7 +6,7 @@ module BookingsyncPortal
6
6
  helper BookingsyncPortal::Admin::ApplicationHelper
7
7
  layout 'bookingsync_portal/admin'
8
8
  respond_to :html
9
- include BookingsyncApplication::Admin::CommonBaseController
9
+ include BookingsyncApplication::Controllers::CommonBase
10
10
 
11
11
  before_action :enforce_remote_account!
12
12
 
@@ -10,7 +10,7 @@ module BookingsyncPortal
10
10
  def create
11
11
  BookingsyncPortal::Write::EnsureSourceExists.new(current_account).call
12
12
  @remote_account = scope.create(params_remote_account)
13
- respond_with @remote_account, location: admin_rentals_url
13
+ respond_with @remote_account, location: admin_rentals_path
14
14
  end
15
15
 
16
16
  private
@@ -9,7 +9,7 @@ module BookingsyncPortal
9
9
  @visible_rentals = current_account.rentals.visible
10
10
  @remote_accounts = current_account.remote_accounts
11
11
  @remote_rentals_by_account = current_account.remote_rentals.ordered
12
- .includes(:remote_account).group_by(&:remote_account)
12
+ .includes(:remote_account, :rental).group_by(&:remote_account)
13
13
  end
14
14
 
15
15
  def show
@@ -14,7 +14,7 @@ class BookingsyncPortal::Connection < ActiveRecord::Base
14
14
 
15
15
  def notify_via_message_bus
16
16
  MessageBus.publish "/account-#{rental.account_id}", { refresh_from:
17
- BookingsyncPortal::Routes.admin_rental_path(rental, format: :js)
17
+ BookingsyncPortal::Engine.routes.url_helpers.admin_rental_path(rental, format: :js)
18
18
  }
19
19
  end
20
20
 
@@ -1,6 +1,6 @@
1
1
  <article>
2
2
  <header>
3
- <%= link_to icon("times", t('.close')), admin_root_url, class: "pull-right" %>
3
+ <%= link_to icon("times", t('.close')), admin_root_path, class: "pull-right" %>
4
4
  <h1><%=t '.title' %></h1>
5
5
  </header>
6
6
  <%= render 'help' %>
@@ -13,7 +13,7 @@
13
13
  <small><%= remote_rental.display_name %></small>
14
14
  </h4>
15
15
  <div class="status">
16
- <%= link_to bookingsync_portal.admin_connection_path(rental.connection),
16
+ <%= link_to BookingsyncPortal::Engine.routes.url_helpers.admin_connection_path(rental.connection),
17
17
  class: ["btn", "btn-xs", "remove-connection", rental.remote_rental.synchronized? ? "btn-success" : "btn-warning"],
18
18
  data: { disable_with: t('.disconnecting_rental') }, method: :delete, remote: true do %>
19
19
  <% unless rental.remote_rental.synchronized? %>
@@ -1,6 +1,6 @@
1
1
  <%- content_for :navbar_right do -%>
2
2
  <ul class="nav navbar-nav">
3
- <li><%= link_to icon("life-ring", t('.help')), admin_help_url %></li>
3
+ <li><%= link_to icon("life-ring", t('.help')), admin_help_path %></li>
4
4
  </ul>
5
5
  <%- end -%>
6
6
  <div class="rentals-container row">
@@ -17,7 +17,7 @@
17
17
  </div>
18
18
  <div class="col-xs-6">
19
19
  <div class="remote-rentals-list rentals-list"
20
- data-connect-url="<%= bookingsync_portal.admin_connections_url %>">
20
+ data-connect-url="<%= BookingsyncPortal::Engine.routes.url_helpers.admin_connections_path %>">
21
21
  <div class="rentals-list-header">
22
22
  <legend class="text-center">
23
23
  <%= image_tag("#{BookingsyncPortal.portal_name.parameterize}.png",
@@ -1,7 +1,7 @@
1
1
  $("#<%= dom_id @rental %>").replaceWith(
2
2
  <%- if @rental.connected? %>
3
3
  "<%=j render 'connected_rental', rental: @rental, remote_rental: @rental.remote_rental,
4
- disconnect_url: bookingsync_portal.admin_connection_url(@rental.connection) %>");
4
+ disconnect_url: BookingsyncPortal::Engine.routes.url_helpers.admin_connection_path(@rental.connection) %>");
5
5
  <%- else %>
6
6
  "<%=j render 'rental', rental: @rental %>");
7
7
  <%- end %>
@@ -13,7 +13,7 @@
13
13
  </button>
14
14
  <%- end -%>
15
15
  <div>
16
- <%= link_to icon("globe", BookingsyncPortal.portal_name), admin_root_url,
16
+ <%= link_to icon("globe", BookingsyncPortal.portal_name), admin_root_path,
17
17
  class: "navbar-brand h1",
18
18
  data: { toggle: "dropdown" } %>
19
19
  </a>
@@ -1,4 +1,4 @@
1
- class CreateAccounts < ActiveRecord::Migration
1
+ class CreateAccounts < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :accounts do |t|
4
4
  t.string :provider
@@ -1,4 +1,4 @@
1
- class CreateRentals < ActiveRecord::Migration
1
+ class CreateRentals < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :rentals do |t|
4
4
  t.belongs_to :account, index: true
@@ -1,4 +1,4 @@
1
- class CreateRemoteAccounts < ActiveRecord::Migration
1
+ class CreateRemoteAccounts < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :remote_accounts do |t|
4
4
  t.belongs_to :account, index: true
@@ -1,4 +1,4 @@
1
- class CreateRemoteRentals < ActiveRecord::Migration
1
+ class CreateRemoteRentals < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :remote_rentals do |t|
4
4
  t.belongs_to :remote_account, index: true
@@ -1,4 +1,4 @@
1
- class CreateConnections < ActiveRecord::Migration
1
+ class CreateConnections < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :connections do |t|
4
4
  t.belongs_to :remote_rental, index: true
@@ -1,4 +1,4 @@
1
- class CreatePhotos < ActiveRecord::Migration
1
+ class CreatePhotos < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :photos do |t|
4
4
  t.belongs_to :rental, index: true
@@ -1,4 +1,4 @@
1
- class CreateRates < ActiveRecord::Migration
1
+ class CreateRates < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :rates do |t|
4
4
  t.belongs_to :rental, index: true
@@ -1,4 +1,4 @@
1
- class AddSyncedSourceIdToAccount < ActiveRecord::Migration
1
+ class AddSyncedSourceIdToAccount < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  add_column :accounts, :synced_source_id, :integer
4
4
  end
@@ -1,4 +1,4 @@
1
- class CreateBookings < ActiveRecord::Migration
1
+ class CreateBookings < ActiveRecord::Migration[4.2]
2
2
  def change
3
3
  create_table :bookings do |t|
4
4
  t.datetime :start_at
@@ -1,3 +1,3 @@
1
1
  module BookingsyncPortal
2
- VERSION = "0.9.0"
2
+ VERSION = "1.0.0"
3
3
  end
@@ -74,15 +74,4 @@ module BookingsyncPortal
74
74
  message_bus_channel_scope
75
75
  end
76
76
  end
77
-
78
- # use this until migrated to ruby 2.3, https://bugs.ruby-lang.org/issues/10871, https://github.com/puma/puma/issues/647
79
- module Routes
80
- module UrlHelpers
81
- include BookingsyncPortal::Engine.routes.url_helpers
82
- end
83
- extend UrlHelpers
84
- def self.default_url_options
85
- {}
86
- end
87
- end
88
77
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookingsync_portal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Marciniak
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-12-25 00:00:00.000000000 Z
13
+ date: 2017-07-03 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -58,16 +58,22 @@ dependencies:
58
58
  name: bookingsync_application
59
59
  requirement: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - "~>"
61
+ - - ">="
62
+ - !ruby/object:Gem::Version
63
+ version: '1'
64
+ - - "<"
62
65
  - !ruby/object:Gem::Version
63
- version: 0.5.0
66
+ version: '3'
64
67
  type: :runtime
65
68
  prerelease: false
66
69
  version_requirements: !ruby/object:Gem::Requirement
67
70
  requirements:
68
- - - "~>"
71
+ - - ">="
69
72
  - !ruby/object:Gem::Version
70
- version: 0.5.0
73
+ version: '1'
74
+ - - "<"
75
+ - !ruby/object:Gem::Version
76
+ version: '3'
71
77
  - !ruby/object:Gem::Dependency
72
78
  name: redis
73
79
  requirement: !ruby/object:Gem::Requirement
@@ -362,6 +368,20 @@ dependencies:
362
368
  - - ">="
363
369
  - !ruby/object:Gem::Version
364
370
  version: '0'
371
+ - !ruby/object:Gem::Dependency
372
+ name: rails-controller-testing
373
+ requirement: !ruby/object:Gem::Requirement
374
+ requirements:
375
+ - - ">="
376
+ - !ruby/object:Gem::Version
377
+ version: '0'
378
+ type: :development
379
+ prerelease: false
380
+ version_requirements: !ruby/object:Gem::Requirement
381
+ requirements:
382
+ - - ">="
383
+ - !ruby/object:Gem::Version
384
+ version: '0'
365
385
  description: A common base for creating BookingSync portal applications.
366
386
  email:
367
387
  - mandaryyyn@gmail.com
@@ -466,7 +486,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
466
486
  version: '0'
467
487
  requirements: []
468
488
  rubyforge_project:
469
- rubygems_version: 2.5.1
489
+ rubygems_version: 2.6.10
470
490
  signing_key:
471
491
  specification_version: 4
472
492
  summary: A common base for creating BookingSync portal applications.