maestrano-connector-rails 2.3.1 → 2.3.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bfd22362e09c5e15198f2930ccf7d5e0b3341170b769a4efa2c625bb367d9dc4
4
- data.tar.gz: f05895b4dbc9777176257d2e421f948da00c6267ab637d89d8e83472c00547da
3
+ metadata.gz: fe03ff785065c1f8cadca66eb2e2b82ed5fc84f5323c4869b48336d12972c85b
4
+ data.tar.gz: b498996b210d55d76a64ddee0e3172b98ec59a2414865c6cc78b29cecd926057
5
5
  SHA512:
6
- metadata.gz: cec844572c51c895cce3e9a1621f79fc14105bc9ae1f55df2ad28e981b26425767bb74015aa657da4104425108a116ed48a24155fabcd00dbfcd65893d6ad107
7
- data.tar.gz: dd8814f5f5d28112e4d44be1d0eb3d99a1969c8f9b05f13abcd3433c3fcf8f9b8c9b26bfc310e883dac97ff648590608f0162a99b2b3cebdde7539b1ed577566
6
+ metadata.gz: e4bcd12d815b164b47bcea4882499ddecfacb4ed5eb86aa140ef89aa086f98df44dd250b5cc9f32f87ac05974038c026aef2917c1294178ff75141ede6c76d1b
7
+ data.tar.gz: 7118fddc3d02a5681232eeec359c16f2c500aac7456a621577d8443420d1785cd19a87c954bff5d011aa3a78ea864cd66af2b55d50a6851f830192ddf4c51ea7
@@ -10,7 +10,7 @@ class Maestrano::Account::GroupsController < Maestrano::Rails::WebHookController
10
10
 
11
11
  unless organization
12
12
  Maestrano::Connector::Rails::ConnectorLogger.log('info', nil, 'Organization not found')
13
- return render json: {success: true}, status: 204
13
+ return render json: {success: true}, status: :no_content
14
14
  end
15
15
 
16
16
  Maestrano::Connector::Rails::ConnectorLogger.log('info', organization, 'delete organization')
@@ -1,5 +1,5 @@
1
1
  class AddMetadataToIdMap < ActiveRecord::Migration
2
2
  def change
3
- add_column :id_maps, :metadata, :text
3
+ add_column :id_maps, :metadata, :text
4
4
  end
5
5
  end
@@ -6,7 +6,7 @@ module Connector
6
6
  desc 'Creating a Maestrano Connector application'
7
7
 
8
8
  def maestrano_generator
9
- generate 'maestrano:initializer'
9
+ generate 'maestrano:install'
10
10
  end
11
11
 
12
12
  def include_helpers
@@ -19,6 +19,10 @@ function closeModal(sender)
19
19
  $('#myModal').modal('hide');
20
20
  }
21
21
 
22
+ $(function () {
23
+ $('[data-toggle="tooltip"]').tooltip()
24
+ })
25
+
22
26
  $(document).ready(function(){
23
27
  $("#myModal").on('hidden.bs.modal', function (e) {
24
28
  if (!checkHistorical) {
@@ -28,8 +32,3 @@ $(document).ready(function(){
28
32
  checkHistorical = false
29
33
  });
30
34
  });
31
-
32
-
33
- $(function () {
34
- $('[data-toggle="tooltip"]').tooltip()
35
- })
@@ -5,10 +5,10 @@ class HomeController < ApplicationController
5
5
 
6
6
  # Update list of entities to synchronize
7
7
  current_organization.synchronized_entities.keys.each do |entity|
8
- next unless params[entity.to_s]
9
8
  current_organization.synchronized_entities[entity][:can_push_to_connec] = params[entity.to_s]["to_connec"] == "1"
10
9
  current_organization.synchronized_entities[entity][:can_push_to_external] = params[entity.to_s]["to_external"] == "1"
11
10
  end
11
+
12
12
  full_sync = params['historical-data'].present? && !current_organization.historical_data
13
13
  opts = {full_sync: full_sync}
14
14
  current_organization.sync_enabled = current_organization.synchronized_entities.values.any? { |settings| settings.values.any? { |v| v } }
@@ -31,13 +31,13 @@ class HomeController < ApplicationController
31
31
 
32
32
  # Implement the redirection to the external application
33
33
  def redirect_to_external
34
- redirect_to 'https://path/to/external/app'
34
+ redirect_to 'https://your_application.com'
35
35
  end
36
36
 
37
37
  private
38
38
 
39
- def start_synchronization(opts)
40
- Maestrano::Connector::Rails::SynchronizationJob.perform_later(current_organization.id, opts)
41
- flash[:info] = 'Congrats, you\'re all set up! Your data are now being synced' if current_organization.sync_enabled_changed?
42
- end
39
+ def start_synchronization(opts)
40
+ Maestrano::Connector::Rails::SynchronizationJob.perform_later(current_organization.id, opts)
41
+ flash[:info] = 'Congrats, you\'re all set up! Your data are now being synced' if current_organization.sync_enabled_changed?
42
+ end
43
43
  end
@@ -114,6 +114,6 @@ describe HomeController, type: :controller do
114
114
  allow_any_instance_of(Maestrano::Connector::Rails::SessionHelper).to receive(:current_organization).and_return(organization)
115
115
  end
116
116
 
117
- it {expect(subject).to redirect_to('https://somewhere.com')}
117
+ it {expect(subject).to redirect_to('https://your_application.com')}
118
118
  end
119
119
  end
@@ -64,9 +64,9 @@
64
64
  - current_organization.displayable_synchronized_entities.each do |k, v|
65
65
  .row.sync-entity
66
66
  .col-md-1.link-step-action
67
- #{check_box("#{k}", "to_connec", {checked: (v[:can_push_to_connec] || v[:can_push_to_external])})}
67
+ #{check_box("#{k}", "to_connec", {checked: (v[:can_push_to_connec] || v[:can_push_to_external]) && !current_organization.pull_disabled, onclick: "return !#{k}_to_external.checked;", disabled: current_organization.pull_disabled})}
68
68
  .col-md-1.link-step-action
69
- #{check_box("#{k}", "to_external", {checked: v[:can_push_to_external], disabled: !v[:can_push_to_external]})}
69
+ #{check_box("#{k}", "to_external", {checked: v[:can_push_to_external] && !current_organization.push_disabled, onchange: "#{k}_to_connec.checked = #{!current_organization.pull_disabled};", disabled: current_organization.push_disabled})}
70
70
  %label.col-md-7{:for => "#{k}", style: 'padding-top: 5px;'}
71
71
  .col-md-6
72
72
  #{v[:external_name]}
@@ -79,7 +79,7 @@
79
79
 
80
80
  .spacer2
81
81
  .row
82
- %h Chose whether to synchronize your historical data:
82
+ %h Choose whether to synchronize your historical data:
83
83
  .spacer1
84
84
  .row
85
85
  .col-md-4.col-md-offset-1
@@ -127,3 +127,7 @@
127
127
  .row
128
128
  .col-md-4.col-md-offset-4.text-center
129
129
  = link_to 'Go to ApplicationName', home_redirect_to_external_path, class: 'btn btn-lg btn-primary'
130
+ -else
131
+ .row
132
+ .col-md-4.col-md-offset-4.center
133
+ = link_to 'Link your Maestrano account', Maestrano::Connector::Rails::Engine.routes.url_helpers.default_maestrano_auth_saml_index_path(tenant: :default), class: 'btn btn-warning'
@@ -1,7 +1,7 @@
1
1
  module Maestrano
2
2
  module Connector
3
3
  module Rails
4
- VERSION = '2.3.1'.freeze
4
+ VERSION = '2.3.2'.freeze
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maestrano-connector-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.1
4
+ version: 2.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maestrano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-03-13 00:00:00.000000000 Z
11
+ date: 2018-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails