maestrano-connector-rails 2.0.0.pre.RC12 → 2.0.0.pre.RC13

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: 7d95bff19220474be447576fb4048e63d48e1266
4
- data.tar.gz: 75565ee7992093efd5a77fe20052f9dc17d1b953
3
+ metadata.gz: e8ec288f5438c26072eff030c169cb0229c658a4
4
+ data.tar.gz: af078ac257dada789c2982437e1bcfbf53eaa29c
5
5
  SHA512:
6
- metadata.gz: 7b673778a40d4dfc9b0e002fc54360c9e729e052aeffc244aebff563672e40f545f0232530ad6848333833229e6d2d839131e76b36abb84867a2d8dc53e23e16
7
- data.tar.gz: d9644a034bfed0f31440df9aa33315a8a493dcf7aa58898304b33693bc9bf13fd95f0a4cc14b8cc7ef82f14e625d1f952a0b9414993903ab318ec5a35a4f558d
6
+ metadata.gz: 8340555280cbda5f4924f5ec464519566e14245be8bb01d16ccf9256d87d9cd5f5641f42ab417bd9efc763a11fbc14f6c13c80bce498f698425ab6ca0c118d23
7
+ data.tar.gz: 7dea5dee0a116cda7f346fa14589acbfc6571fe3024f4ac98105e396223970bb4be6361fb14d802e708ade0aebb89b570bc083e8fc4c88f8251194756e0b09c2
data/Gemfile CHANGED
@@ -22,10 +22,10 @@ gem 'slim'
22
22
 
23
23
  # Add dependencies to develop your gem here.
24
24
  group :development do
25
- gem 'shoulda', '>= 0'
26
- gem 'rdoc', '~> 3.12'
27
- gem 'bundler', '~> 1.0'
28
- gem 'jeweler', '~> 2.1.1'
25
+ gem 'shoulda'
26
+ gem 'rdoc'
27
+ gem 'bundler'
28
+ gem 'jeweler'
29
29
  gem 'simplecov', '>= 0'
30
30
  gem 'rspec-rails'
31
31
  gem 'factory_girl_rails'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.0.0.pre.RC12
1
+ 2.0.0.pre.RC13
@@ -3,7 +3,7 @@ class VersionController < ApplicationController
3
3
  framework_version = Gem.loaded_specs['maestrano-connector-rails'].version.version
4
4
  respond_to do |format|
5
5
  format.html { render text: "framework_version=#{framework_version}\n" }
6
- format.json { render json: {framework_version: framework_version, env: Rails.env} }
6
+ format.json { render json: {framework_version: framework_version, env: Rails.env, ruby_version: RUBY_VERSION, ruby_engine: RUBY_ENGINE} }
7
7
  end
8
8
  end
9
9
  end
data/bin/rails CHANGED
@@ -1,12 +1,17 @@
1
1
  #!/usr/bin/env ruby
2
- # This command will automatically be run when you run "rails" with Rails 4 gems installed from the root of your application.
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rails' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
3
9
 
4
- ENGINE_ROOT = File.expand_path('../..', __FILE__)
5
- ENGINE_PATH = File.expand_path('../../lib/maestrano/connector/rails.rb', __FILE__)
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
6
13
 
7
- # Set up gems listed in the Gemfile.
8
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
9
- require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
14
+ require "rubygems"
15
+ require "bundler/setup"
10
16
 
11
- require 'rails/all'
12
- require 'rails/engine/commands'
17
+ load Gem.bin_path("railties", "rails")
data/bin/rake ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rake' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("rake", "rake")
@@ -1,5 +1,16 @@
1
1
  class AddUniqueIndexOnOrganizationOauthUid < ActiveRecord::Migration
2
2
  def change
3
+ # Disconnect accounts linked several times
4
+ if ActiveRecord::Base.connection.class.to_s == 'ActiveRecord::ConnectionAdapters::Mysql2Adapter'
5
+ execute <<-SQL
6
+ UPDATE organizations AS o
7
+ INNER JOIN
8
+ (SELECT organizations.oauth_uid, min(organizations.id) minid FROM organizations GROUP BY oauth_uid) o1
9
+ ON o.oauth_uid = o1.oauth_uid AND o.id != o1.minid
10
+ SET o.oauth_uid = null, o.encrypted_oauth_token = null, encrypted_refresh_token= null, sync_enabled = false
11
+ SQL
12
+ end
13
+
3
14
  add_index :organizations, :oauth_uid, unique: true
4
15
  end
5
16
  end
@@ -1,66 +1,65 @@
1
1
  module Connector
2
- module Generators
3
- class InstallGenerator < ::Rails::Generators::Base
4
- source_root File.expand_path('../templates', __FILE__)
2
+ class InstallGenerator < ::Rails::Generators::Base
3
+ source_root File.expand_path('../templates', __FILE__)
4
+ desc 'Creating a Maestrano Connector application'
5
5
 
6
- def maestrano_generator
7
- generate 'maestrano:initializer'
8
- end
6
+ def maestrano_generator
7
+ generate 'maestrano:initializer'
8
+ end
9
9
 
10
- def include_helpers
11
- sentinel = 'class ApplicationController < ActionController::Base'
12
- code_lines = [
13
- 'include Maestrano::Connector::Rails::SessionHelper'
14
- ]
10
+ def include_helpers
11
+ sentinel = 'class ApplicationController < ActionController::Base'
12
+ code_lines = [
13
+ 'include Maestrano::Connector::Rails::SessionHelper'
14
+ ]
15
15
 
16
- in_root do
17
- gsub_file 'app/controllers/application_controller.rb', /(#{Regexp.escape(sentinel)})/mi do |match|
18
- "#{match}\n #{code_lines.join("\n ")}\n"
19
- end
16
+ in_root do
17
+ gsub_file 'app/controllers/application_controller.rb', /(#{Regexp.escape(sentinel)})/mi do |match|
18
+ "#{match}\n #{code_lines.join("\n ")}\n"
20
19
  end
21
20
  end
21
+ end
22
22
 
23
- def copy_entity
24
- copy_file 'entity.rb', 'app/models/maestrano/connector/rails/entity.rb'
25
- end
23
+ def copy_entity
24
+ copy_file 'entity.rb', 'app/models/maestrano/connector/rails/entity.rb'
25
+ end
26
26
 
27
- def copy_external
28
- copy_file 'external.rb', 'app/models/maestrano/connector/rails/external.rb'
29
- end
27
+ def copy_external
28
+ copy_file 'external.rb', 'app/models/maestrano/connector/rails/external.rb'
29
+ end
30
30
 
31
- def copy_example_entity
32
- copy_file 'example_entity.rb', 'app/models/entities/example_entitiy.rb'
33
- copy_file 'example_entity_spec.rb', 'spec/models/entities/example_entitiy.rb'
34
- end
31
+ def copy_example_entity
32
+ copy_file 'example_entity.rb', 'app/models/entities/example_entitiy.rb'
33
+ copy_file 'example_entity_spec.rb', 'spec/models/entities/example_entitiy.rb'
34
+ end
35
35
 
36
- def copy_controllers_and_views
37
- copy_file 'home_controller.rb', 'app/controllers/home_controller.rb'
38
- copy_file 'home_controller_spec.rb', 'spec/controllers/home_controller_spec.rb'
39
- copy_file 'home_index.haml', 'app/views/home/index.html.haml'
40
- copy_file 'home.js', 'app/assets/javascripts/home.js'
36
+ def copy_controllers_and_views
37
+ copy_file 'home_controller.rb', 'app/controllers/home_controller.rb'
38
+ copy_file 'home_controller_spec.rb', 'spec/controllers/home_controller_spec.rb'
39
+ copy_file 'home_index.haml', 'app/views/home/index.html.haml'
40
+ copy_file 'home.js', 'app/assets/javascripts/home.js'
41
41
 
42
- copy_file 'synchronizations_controller.rb', 'app/controllers/synchronizations_controller.rb'
43
- copy_file 'synchronizations_controller_spec.rb', 'spec/controllers/synchronizations_controller_spec.rb'
44
- copy_file 'synchronizations_index.haml', 'app/views/synchronizations/index.html.haml'
42
+ copy_file 'synchronizations_controller.rb', 'app/controllers/synchronizations_controller.rb'
43
+ copy_file 'synchronizations_controller_spec.rb', 'spec/controllers/synchronizations_controller_spec.rb'
44
+ copy_file 'synchronizations_index.haml', 'app/views/synchronizations/index.html.haml'
45
45
 
46
- copy_file 'shared_entities_controller.rb', 'app/controllers/shared_entities_controller.rb'
47
- copy_file 'shared_entities_controller_spec.rb', 'spec/controllers/shared_entities_controller_spec.rb'
48
- copy_file 'shared_entities_index.haml', 'app/views/shared_entities/index.html.haml'
46
+ copy_file 'shared_entities_controller.rb', 'app/controllers/shared_entities_controller.rb'
47
+ copy_file 'shared_entities_controller_spec.rb', 'spec/controllers/shared_entities_controller_spec.rb'
48
+ copy_file 'shared_entities_index.haml', 'app/views/shared_entities/index.html.haml'
49
49
 
50
- copy_file 'layouts.haml', 'app/views/layouts/application.html.haml'
51
- end
50
+ copy_file 'layouts.haml', 'app/views/layouts/application.html.haml'
51
+ end
52
52
 
53
- def copy_stylesheets
54
- copy_file 'stylesheets/application.sass', 'app/assets/stylesheets/application.sass'
55
- copy_file 'stylesheets/home.sass', 'app/assets/stylesheets/home.sass'
56
- copy_file 'stylesheets/layout.sass', 'app/assets/stylesheets/layout.sass'
57
- copy_file 'stylesheets/spacers.sass', 'app/assets/stylesheets/spacers.sass'
58
- copy_file 'stylesheets/variables.sass', 'app/assets/stylesheets/variables.sass'
59
- end
53
+ def copy_stylesheets
54
+ copy_file 'stylesheets/application.sass', 'app/assets/stylesheets/application.sass'
55
+ copy_file 'stylesheets/home.sass', 'app/assets/stylesheets/home.sass'
56
+ copy_file 'stylesheets/layout.sass', 'app/assets/stylesheets/layout.sass'
57
+ copy_file 'stylesheets/spacers.sass', 'app/assets/stylesheets/spacers.sass'
58
+ copy_file 'stylesheets/variables.sass', 'app/assets/stylesheets/variables.sass'
59
+ end
60
60
 
61
- def copy_oauth_controller
62
- copy_file 'oauth_controller.rb', 'app/controllers/oauth_controller.rb'
63
- end
61
+ def copy_oauth_controller
62
+ copy_file 'oauth_controller.rb', 'app/controllers/oauth_controller.rb'
64
63
  end
65
64
  end
66
65
  end
@@ -2,19 +2,19 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: maestrano-connector-rails 2.0.0.pre.RC12 ruby lib
5
+ # stub: maestrano-connector-rails 2.0.0.pre.RC13 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "maestrano-connector-rails"
9
- s.version = "2.0.0.pre.RC12"
9
+ s.version = "2.0.0.pre.RC13"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Maestrano"]
14
- s.date = "2016-10-18"
14
+ s.date = "2016-11-07"
15
15
  s.description = "Maestrano is the next generation marketplace for SME applications. See https://sme.maestrano.com for details."
16
16
  s.email = "developers@maestrano.com"
17
- s.executables = ["rails"]
17
+ s.executables = ["rails", "rake"]
18
18
  s.extra_rdoc_files = [
19
19
  "LICENSE",
20
20
  "README.md"
@@ -67,6 +67,7 @@ Gem::Specification.new do |s|
67
67
  "app/models/maestrano/connector/rails/user.rb",
68
68
  "app/models/maestrano/connector/rails/user_organization_rel.rb",
69
69
  "bin/rails",
70
+ "bin/rake",
70
71
  "config/routes.rb",
71
72
  "db/migrate/20151122162100_create_users.rb",
72
73
  "db/migrate/20151122162414_create_organizations.rb",
@@ -239,9 +240,9 @@ Gem::Specification.new do |s|
239
240
  s.add_runtime_dependency(%q<sidekiq-cron>, [">= 0"])
240
241
  s.add_runtime_dependency(%q<slim>, [">= 0"])
241
242
  s.add_development_dependency(%q<shoulda>, [">= 0"])
242
- s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
243
- s.add_development_dependency(%q<bundler>, ["~> 1.0"])
244
- s.add_development_dependency(%q<jeweler>, ["~> 2.1.1"])
243
+ s.add_development_dependency(%q<rdoc>, [">= 0"])
244
+ s.add_development_dependency(%q<bundler>, [">= 0"])
245
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
245
246
  s.add_development_dependency(%q<simplecov>, [">= 0"])
246
247
  s.add_development_dependency(%q<rspec-rails>, [">= 0"])
247
248
  s.add_development_dependency(%q<factory_girl_rails>, [">= 0"])
@@ -267,9 +268,9 @@ Gem::Specification.new do |s|
267
268
  s.add_dependency(%q<sidekiq-cron>, [">= 0"])
268
269
  s.add_dependency(%q<slim>, [">= 0"])
269
270
  s.add_dependency(%q<shoulda>, [">= 0"])
270
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
271
- s.add_dependency(%q<bundler>, ["~> 1.0"])
272
- s.add_dependency(%q<jeweler>, ["~> 2.1.1"])
271
+ s.add_dependency(%q<rdoc>, [">= 0"])
272
+ s.add_dependency(%q<bundler>, [">= 0"])
273
+ s.add_dependency(%q<jeweler>, [">= 0"])
273
274
  s.add_dependency(%q<simplecov>, [">= 0"])
274
275
  s.add_dependency(%q<rspec-rails>, [">= 0"])
275
276
  s.add_dependency(%q<factory_girl_rails>, [">= 0"])
@@ -296,9 +297,9 @@ Gem::Specification.new do |s|
296
297
  s.add_dependency(%q<sidekiq-cron>, [">= 0"])
297
298
  s.add_dependency(%q<slim>, [">= 0"])
298
299
  s.add_dependency(%q<shoulda>, [">= 0"])
299
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
300
- s.add_dependency(%q<bundler>, ["~> 1.0"])
301
- s.add_dependency(%q<jeweler>, ["~> 2.1.1"])
300
+ s.add_dependency(%q<rdoc>, [">= 0"])
301
+ s.add_dependency(%q<bundler>, [">= 0"])
302
+ s.add_dependency(%q<jeweler>, [">= 0"])
302
303
  s.add_dependency(%q<simplecov>, [">= 0"])
303
304
  s.add_dependency(%q<rspec-rails>, [">= 0"])
304
305
  s.add_dependency(%q<factory_girl_rails>, [">= 0"])
@@ -11,7 +11,7 @@ describe VersionController, type: :controller do
11
11
 
12
12
  it 'returns a version hash' do
13
13
  subject
14
- expect(JSON.parse(response.body)).to eql({"framework_version"=>"1.2", "env" => "test"})
14
+ expect(JSON.parse(response.body)).to eql('framework_version'=>'1.2', 'env' => 'test', 'ruby_version' => RUBY_VERSION, 'ruby_engine' => RUBY_ENGINE)
15
15
  end
16
16
  end
17
17
  end
@@ -1,37 +1,2 @@
1
1
  encryption_key1: <%= ENV['encryption_key1'] %>
2
2
  encryption_key2: <%= ENV['encryption_key2'] %>
3
-
4
- # tenant config
5
- default:
6
- environment: 'production'
7
- x509_certificate: "-----BEGIN CERTIFICATE-----\nMIIDezCCAuSgAwIBAgIJAPFpcH2rW0pyMA0GCSqGSIb3DQEBBQUAMIGGMQswCQYD\nVQQGEwJBVTEMMAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxGjAYBgNVBAoT\nEU1hZXN0cmFubyBQdHkgTHRkMRYwFAYDVQQDEw1tYWVzdHJhbm8uY29tMSQwIgYJ\nKoZIhvcNAQkBFhVzdXBwb3J0QG1hZXN0cmFuby5jb20wHhcNMTQwMTA0MDUyNDEw\nWhcNMzMxMjMwMDUyNDEwWjCBhjELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA05TVzEP\nMA0GA1UEBxMGU3lkbmV5MRowGAYDVQQKExFNYWVzdHJhbm8gUHR5IEx0ZDEWMBQG\nA1UEAxMNbWFlc3RyYW5vLmNvbTEkMCIGCSqGSIb3DQEJARYVc3VwcG9ydEBtYWVz\ndHJhbm8uY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD3feNNn2xfEz5/\nQvkBIu2keh9NNhobpre8U4r1qC7h7OeInTldmxGL4cLHw4ZAqKbJVrlFWqNevM5V\nZBkDe4mjuVkK6rYK1ZK7eVk59BicRksVKRmdhXbANk/C5sESUsQv1wLZyrF5Iq8m\na9Oy4oYrIsEF2uHzCouTKM5n+O4DkwIDAQABo4HuMIHrMB0GA1UdDgQWBBSd/X0L\n/Pq+ZkHvItMtLnxMCAMdhjCBuwYDVR0jBIGzMIGwgBSd/X0L/Pq+ZkHvItMtLnxM\nCAMdhqGBjKSBiTCBhjELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA05TVzEPMA0GA1UE\nBxMGU3lkbmV5MRowGAYDVQQKExFNYWVzdHJhbm8gUHR5IEx0ZDEWMBQGA1UEAxMN\nbWFlc3RyYW5vLmNvbTEkMCIGCSqGSIb3DQEJARYVc3VwcG9ydEBtYWVzdHJhbm8u\nY29tggkA8WlwfatbSnIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQDE\nhe/18oRh8EqIhOl0bPk6BG49AkjhZZezrRJkCFp4dZxaBjwZTddwo8O5KHwkFGdy\nyLiPV326dtvXoKa9RFJvoJiSTQLEn5mO1NzWYnBMLtrDWojOe6Ltvn3x0HVo/iHh\nJShjAn6ZYX43Tjl1YXDd1H9O+7/VgEWAQQ32v8p5lA==\n-----END CERTIFICATE-----"
8
- x509_fingerprint: '2f:57:71:e4:40:19:57:37:a6:2c:f0:c5:82:52:2f:2e:41:b7:9d:7e'
9
- api_id: 'connec_api_id'
10
- api_key: 'connec_api_key'
11
- sso_init_path: '/maestrano/auth/saml/init/default'
12
- sso_consume_path: '/maestrano/auth/saml/consume/default'
13
- api_host: 'https://maestrano.com'
14
- connec_host: 'https://api-connec.maestrano.com'
15
- webhook:
16
- account:
17
- groups_path: '/maestrano/account/groups/:id/default'
18
- group_users_path: '/maestrano/account/groups/:group_id/users/:id/default'
19
- connec:
20
- notifications_path: '/maestrano/connec/notifications/default'
21
-
22
- maestrano-uat:
23
- environment: 'uat'
24
- x509_certificate: "-----BEGIN CERTIFICATE-----\nMIIDezCCAuSgAwIBAgIJAMzy+weDPp7qMA0GCSqGSIb3DQEBBQUAMIGGMQswCQYD\nVQQGEwJBVTEMMAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxGjAYBgNVBAoT\nEU1hZXN0cmFubyBQdHkgTHRkMRYwFAYDVQQDEw1tYWVzdHJhbm8uY29tMSQwIgYJ\nKoZIhvcNAQkBFhVzdXBwb3J0QG1hZXN0cmFuby5jb20wHhcNMTQwMTA0MDUyMzE0\nWhcNMzMxMjMwMDUyMzE0WjCBhjELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA05TVzEP\nMA0GA1UEBxMGU3lkbmV5MRowGAYDVQQKExFNYWVzdHJhbm8gUHR5IEx0ZDEWMBQG\nA1UEAxMNbWFlc3RyYW5vLmNvbTEkMCIGCSqGSIb3DQEJARYVc3VwcG9ydEBtYWVz\ndHJhbm8uY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+2uyQeAOc/iro\nhCyT33RkkWfTGeJ8E/mu9F5ORWoCZ/h2J+QDuzuc69Rf1LoO4wZVQ8LBeWOqMBYz\notYFUIPlPfIBXDNL/stHkpg28WLDpoJM+46WpTAgp89YKgwdAoYODHiUOcO/uXOO\n2i9Ekoa+kxbvBzDJf7uuR/io6GERXwIDAQABo4HuMIHrMB0GA1UdDgQWBBTGRDBT\nie5+fHkB0+SZ5g3WY/D2RTCBuwYDVR0jBIGzMIGwgBTGRDBTie5+fHkB0+SZ5g3W\nY/D2RaGBjKSBiTCBhjELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA05TVzEPMA0GA1UE\nBxMGU3lkbmV5MRowGAYDVQQKExFNYWVzdHJhbm8gUHR5IEx0ZDEWMBQGA1UEAxMN\nbWFlc3RyYW5vLmNvbTEkMCIGCSqGSIb3DQEJARYVc3VwcG9ydEBtYWVzdHJhbm8u\nY29tggkAzPL7B4M+nuowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQAw\nRxg3rZrML//xbsS3FFXguzXiiNQAvA4KrMWhGh3jVrtzAlN1/okFNy6zuN8gzdKD\nYw2n0c/u3cSpUutIVZOkwQuPCMC1hoP7Ilat6icVewNcHayLBxKgRxpBhr5Sc4av\n3HOW5Bi/eyC7IjeBTbTnpziApEC7uUsBou2rlKmTGw==\n-----END CERTIFICATE-----"
25
- x509_fingerprint: '8a:1e:2e:76:c4:67:80:68:6c:81:18:f7:d3:29:5d:77:f8:79:54:2f'
26
- api_id: 'maestrano_uat_connec_api_id'
27
- api_key: 'maestrano_uat_connec_api_key'
28
- sso_consume_path: '/maestrano/auth/saml/consume/maestrano-uat'
29
- sso_init_path: '/maestrano/auth/saml/init/maestrano-uat'
30
- api_host: 'https://uat.maestrano.io'
31
- connec_host: 'https://api-connec-uat.maestrano.io'
32
- webhook:
33
- account:
34
- groups_path: '/maestrano/account/groups/:id/maestrano-uat'
35
- group_users_path: '/maestrano/account/groups/:group_id/users/:id/maestrano-uat'
36
- connec:
37
- notifications_path: '/maestrano/connec/notifications/maestrano-uat'
@@ -38,7 +38,6 @@ ActiveRecord::Schema.define(version: 20161018155513) do
38
38
  t.string "provider"
39
39
  t.string "uid"
40
40
  t.string "name"
41
- t.string "org_uid"
42
41
  t.string "tenant"
43
42
  t.string "oauth_provider"
44
43
  t.string "oauth_uid"
@@ -51,12 +50,15 @@ ActiveRecord::Schema.define(version: 20161018155513) do
51
50
  t.datetime "updated_at", null: false
52
51
  t.boolean "sync_enabled", default: false
53
52
  t.datetime "date_filtering_limit"
53
+ t.boolean "historical_data", default: false
54
54
  t.string "encrypted_oauth_token_iv"
55
55
  t.string "encrypted_oauth_token_salt"
56
56
  t.string "encrypted_refresh_token_iv"
57
57
  t.string "encrypted_refresh_token_salt"
58
+ t.string "org_uid"
58
59
  end
59
60
 
61
+ add_index "organizations", ["oauth_uid"], name: "index_organizations_on_oauth_uid", unique: true
60
62
  add_index "organizations", ["uid", "tenant"], name: "orga_uid_index"
61
63
 
62
64
  create_table "synchronizations", force: :cascade do |t|
@@ -28,27 +28,30 @@ remove_file 'Gemfile'
28
28
  run 'touch Gemfile'
29
29
 
30
30
  add_source 'https://rubygems.org'
31
-
32
- if yes?('Use JRuby? [y/n]')
33
- run 'echo "ruby \'2.2.3\', :engine => \'jruby\', :engine_version => \'9.0.5.0\'" | cat - Gemfile > temp && mv temp Gemfile'
31
+ if defined?(RUBY_ENGINE) && RUBY_ENGINE == 'jruby'
32
+ run 'echo "ruby \'2.3.1\', :engine => \'jruby\', :engine_version => \'9.1.5.0\'" | cat - Gemfile > temp && mv temp Gemfile'
34
33
  end
35
34
 
36
35
  gem 'rails', '~> 4.2'
37
36
  gem 'turbolinks', '~> 2.5'
38
37
  gem 'jquery-rails'
39
- gem 'puma', require: false
40
38
  gem 'tzinfo-data', platforms: [:mingw, :mswin, :jruby]
41
39
  gem 'uglifier', '>= 1.3.0'
42
40
 
41
+ gem 'puma', require: false
42
+ gem 'sinatra', require: false
43
+ gem 'sidekiq'
44
+ gem 'sidekiq-cron'
45
+
43
46
  gem 'maestrano-connector-rails'
44
47
 
45
- group :production, :uat do
48
+ gem_group :production, :uat do
46
49
  gem 'activerecord-jdbcmysql-adapter', platforms: :jruby
47
50
  gem 'mysql2', platforms: :ruby
48
51
  gem 'rails_12factor'
49
52
  end
50
53
 
51
- group :test, :develpment do
54
+ gem_group :test, :development do
52
55
  gem 'activerecord-jdbcsqlite3-adapter', platforms: :jruby
53
56
  gem 'sqlite3', platforms: :ruby
54
57
  gem 'rubocop'
@@ -101,7 +104,7 @@ after_bundle do
101
104
  copy_file 'settings/settings.yml', 'config/settings.yml'
102
105
 
103
106
  copy_file 'application-sample.yml', 'config/application-sample.yml'
104
- copy_file 'application-sample.yml', 'config/application.yml'
107
+ copy_file 'application-sample.yml', 'config/application.yml', force: true
105
108
 
106
109
  application do
107
110
  <<-RUBY
@@ -1,37 +1,2 @@
1
1
  encryption_key1: <%= ENV['encryption_key1'] %>
2
2
  encryption_key2: <%= ENV['encryption_key2'] %>
3
-
4
- # tenant config
5
- default:
6
- environment: 'production'
7
- x509_certificate: "-----BEGIN CERTIFICATE-----\nMIIDezCCAuSgAwIBAgIJAPFpcH2rW0pyMA0GCSqGSIb3DQEBBQUAMIGGMQswCQYD\nVQQGEwJBVTEMMAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxGjAYBgNVBAoT\nEU1hZXN0cmFubyBQdHkgTHRkMRYwFAYDVQQDEw1tYWVzdHJhbm8uY29tMSQwIgYJ\nKoZIhvcNAQkBFhVzdXBwb3J0QG1hZXN0cmFuby5jb20wHhcNMTQwMTA0MDUyNDEw\nWhcNMzMxMjMwMDUyNDEwWjCBhjELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA05TVzEP\nMA0GA1UEBxMGU3lkbmV5MRowGAYDVQQKExFNYWVzdHJhbm8gUHR5IEx0ZDEWMBQG\nA1UEAxMNbWFlc3RyYW5vLmNvbTEkMCIGCSqGSIb3DQEJARYVc3VwcG9ydEBtYWVz\ndHJhbm8uY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQD3feNNn2xfEz5/\nQvkBIu2keh9NNhobpre8U4r1qC7h7OeInTldmxGL4cLHw4ZAqKbJVrlFWqNevM5V\nZBkDe4mjuVkK6rYK1ZK7eVk59BicRksVKRmdhXbANk/C5sESUsQv1wLZyrF5Iq8m\na9Oy4oYrIsEF2uHzCouTKM5n+O4DkwIDAQABo4HuMIHrMB0GA1UdDgQWBBSd/X0L\n/Pq+ZkHvItMtLnxMCAMdhjCBuwYDVR0jBIGzMIGwgBSd/X0L/Pq+ZkHvItMtLnxM\nCAMdhqGBjKSBiTCBhjELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA05TVzEPMA0GA1UE\nBxMGU3lkbmV5MRowGAYDVQQKExFNYWVzdHJhbm8gUHR5IEx0ZDEWMBQGA1UEAxMN\nbWFlc3RyYW5vLmNvbTEkMCIGCSqGSIb3DQEJARYVc3VwcG9ydEBtYWVzdHJhbm8u\nY29tggkA8WlwfatbSnIwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQDE\nhe/18oRh8EqIhOl0bPk6BG49AkjhZZezrRJkCFp4dZxaBjwZTddwo8O5KHwkFGdy\nyLiPV326dtvXoKa9RFJvoJiSTQLEn5mO1NzWYnBMLtrDWojOe6Ltvn3x0HVo/iHh\nJShjAn6ZYX43Tjl1YXDd1H9O+7/VgEWAQQ32v8p5lA==\n-----END CERTIFICATE-----"
8
- x509_fingerprint: '2f:57:71:e4:40:19:57:37:a6:2c:f0:c5:82:52:2f:2e:41:b7:9d:7e'
9
- api_id: 'connec_api_id'
10
- api_key: 'connec_api_key'
11
- sso_init_path: '/maestrano/auth/saml/init/default'
12
- sso_consume_path: '/maestrano/auth/saml/consume/default'
13
- api_host: 'https://maestrano.com'
14
- connec_host: 'https://api-connec.maestrano.com'
15
- webhook:
16
- account:
17
- groups_path: '/maestrano/account/groups/:id/default'
18
- group_users_path: '/maestrano/account/groups/:group_id/users/:id/default'
19
- connec:
20
- notifications_path: '/maestrano/connec/notifications/default'
21
-
22
- maestrano-uat:
23
- environment: 'uat'
24
- x509_certificate: "-----BEGIN CERTIFICATE-----\nMIIDezCCAuSgAwIBAgIJAMzy+weDPp7qMA0GCSqGSIb3DQEBBQUAMIGGMQswCQYD\nVQQGEwJBVTEMMAoGA1UECBMDTlNXMQ8wDQYDVQQHEwZTeWRuZXkxGjAYBgNVBAoT\nEU1hZXN0cmFubyBQdHkgTHRkMRYwFAYDVQQDEw1tYWVzdHJhbm8uY29tMSQwIgYJ\nKoZIhvcNAQkBFhVzdXBwb3J0QG1hZXN0cmFuby5jb20wHhcNMTQwMTA0MDUyMzE0\nWhcNMzMxMjMwMDUyMzE0WjCBhjELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA05TVzEP\nMA0GA1UEBxMGU3lkbmV5MRowGAYDVQQKExFNYWVzdHJhbm8gUHR5IEx0ZDEWMBQG\nA1UEAxMNbWFlc3RyYW5vLmNvbTEkMCIGCSqGSIb3DQEJARYVc3VwcG9ydEBtYWVz\ndHJhbm8uY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC+2uyQeAOc/iro\nhCyT33RkkWfTGeJ8E/mu9F5ORWoCZ/h2J+QDuzuc69Rf1LoO4wZVQ8LBeWOqMBYz\notYFUIPlPfIBXDNL/stHkpg28WLDpoJM+46WpTAgp89YKgwdAoYODHiUOcO/uXOO\n2i9Ekoa+kxbvBzDJf7uuR/io6GERXwIDAQABo4HuMIHrMB0GA1UdDgQWBBTGRDBT\nie5+fHkB0+SZ5g3WY/D2RTCBuwYDVR0jBIGzMIGwgBTGRDBTie5+fHkB0+SZ5g3W\nY/D2RaGBjKSBiTCBhjELMAkGA1UEBhMCQVUxDDAKBgNVBAgTA05TVzEPMA0GA1UE\nBxMGU3lkbmV5MRowGAYDVQQKExFNYWVzdHJhbm8gUHR5IEx0ZDEWMBQGA1UEAxMN\nbWFlc3RyYW5vLmNvbTEkMCIGCSqGSIb3DQEJARYVc3VwcG9ydEBtYWVzdHJhbm8u\nY29tggkAzPL7B4M+nuowDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQAw\nRxg3rZrML//xbsS3FFXguzXiiNQAvA4KrMWhGh3jVrtzAlN1/okFNy6zuN8gzdKD\nYw2n0c/u3cSpUutIVZOkwQuPCMC1hoP7Ilat6icVewNcHayLBxKgRxpBhr5Sc4av\n3HOW5Bi/eyC7IjeBTbTnpziApEC7uUsBou2rlKmTGw==\n-----END CERTIFICATE-----"
25
- x509_fingerprint: '8a:1e:2e:76:c4:67:80:68:6c:81:18:f7:d3:29:5d:77:f8:79:54:2f'
26
- api_id: 'maestrano_uat_connec_api_id'
27
- api_key: 'maestrano_uat_connec_api_key'
28
- sso_consume_path: '/maestrano/auth/saml/consume/maestrano-uat'
29
- sso_init_path: '/maestrano/auth/saml/init/maestrano-uat'
30
- api_host: 'https://uat.maestrano.io'
31
- connec_host: 'https://api-connec-uat.maestrano.io'
32
- webhook:
33
- account:
34
- groups_path: '/maestrano/account/groups/:id/maestrano-uat'
35
- group_users_path: '/maestrano/account/groups/:group_id/users/:id/maestrano-uat'
36
- connec:
37
- notifications_path: '/maestrano/connec/notifications/maestrano-uat'
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.0.0.pre.RC12
4
+ version: 2.0.0.pre.RC13
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maestrano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-18 00:00:00.000000000 Z
11
+ date: 2016-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -224,44 +224,44 @@ dependencies:
224
224
  name: rdoc
225
225
  requirement: !ruby/object:Gem::Requirement
226
226
  requirements:
227
- - - "~>"
227
+ - - ">="
228
228
  - !ruby/object:Gem::Version
229
- version: '3.12'
229
+ version: '0'
230
230
  type: :development
231
231
  prerelease: false
232
232
  version_requirements: !ruby/object:Gem::Requirement
233
233
  requirements:
234
- - - "~>"
234
+ - - ">="
235
235
  - !ruby/object:Gem::Version
236
- version: '3.12'
236
+ version: '0'
237
237
  - !ruby/object:Gem::Dependency
238
238
  name: bundler
239
239
  requirement: !ruby/object:Gem::Requirement
240
240
  requirements:
241
- - - "~>"
241
+ - - ">="
242
242
  - !ruby/object:Gem::Version
243
- version: '1.0'
243
+ version: '0'
244
244
  type: :development
245
245
  prerelease: false
246
246
  version_requirements: !ruby/object:Gem::Requirement
247
247
  requirements:
248
- - - "~>"
248
+ - - ">="
249
249
  - !ruby/object:Gem::Version
250
- version: '1.0'
250
+ version: '0'
251
251
  - !ruby/object:Gem::Dependency
252
252
  name: jeweler
253
253
  requirement: !ruby/object:Gem::Requirement
254
254
  requirements:
255
- - - "~>"
255
+ - - ">="
256
256
  - !ruby/object:Gem::Version
257
- version: 2.1.1
257
+ version: '0'
258
258
  type: :development
259
259
  prerelease: false
260
260
  version_requirements: !ruby/object:Gem::Requirement
261
261
  requirements:
262
- - - "~>"
262
+ - - ">="
263
263
  - !ruby/object:Gem::Version
264
- version: 2.1.1
264
+ version: '0'
265
265
  - !ruby/object:Gem::Dependency
266
266
  name: simplecov
267
267
  requirement: !ruby/object:Gem::Requirement
@@ -393,6 +393,7 @@ description: Maestrano is the next generation marketplace for SME applications.
393
393
  email: developers@maestrano.com
394
394
  executables:
395
395
  - rails
396
+ - rake
396
397
  extensions: []
397
398
  extra_rdoc_files:
398
399
  - LICENSE
@@ -445,6 +446,7 @@ files:
445
446
  - app/models/maestrano/connector/rails/user.rb
446
447
  - app/models/maestrano/connector/rails/user_organization_rel.rb
447
448
  - bin/rails
449
+ - bin/rake
448
450
  - config/routes.rb
449
451
  - db/migrate/20151122162100_create_users.rb
450
452
  - db/migrate/20151122162414_create_organizations.rb