maestrano-connector-rails 2.1.0 → 2.1.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f267b4786215b5d645fc55e422f0f03225467fd6
|
4
|
+
data.tar.gz: e51ffb20f909c95602eb306ea74ea7e6910a3df5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9266c88d3068be3b351a9b1802c08ba69b355f413ff84065c7b05af74128a456be9570a1dcba3059d29ec6702d4ffb81bb38d8e27025cecdb1c7bef01f2c878c
|
7
|
+
data.tar.gz: f3c38b491d1cd4c584b6c37c9cef44f5aa45ec53952de0cb7d33f05131dbe63bb69a4ad2bb316cee900f7c127d45c3576c6464949a14d4f7bc6fbea55c4121d0
|
data/.rubocop_todo.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
## 2.1.1
|
2
|
+
|
3
|
+
### Features
|
4
|
+
* Class names declared into ComplexEntities can now be camel case, spaced or underscored
|
5
|
+
* Logs have been added when an entity is not pushed to either Connec!/External (when push is disabled)
|
6
|
+
|
1
7
|
## 2.1.0
|
2
8
|
|
3
9
|
### Features
|
@@ -6,12 +12,26 @@
|
|
6
12
|
* Organization and User can now be overridden in the connectors
|
7
13
|
* Updates to layout of generated connectors
|
8
14
|
* Option to push/pull disable for a specific Organization
|
9
|
-
* Optional methods to limit currency updates
|
15
|
+
* Optional methods to limit currency updates
|
10
16
|
|
11
|
-
### Migration guide
|
17
|
+
### Detailed Migration guide
|
12
18
|
* Please refer to this document in the
|
13
19
|
[Maestrano Guides](https://maestrano.atlassian.net/wiki/spaces/DEV/pages/102336339/Migration+Guides)
|
14
20
|
|
21
|
+
#### Quick Migration Checklist
|
22
|
+
|
23
|
+
* Add `webmock`
|
24
|
+
* Update `spec_helper` to require `webmock` and stub requests
|
25
|
+
* Add `to_connec.png` and `to_external.png` in your `assets/images/logos` folder
|
26
|
+
* Update `home.js` to support the Modal (Popping up when enabling historical data)
|
27
|
+
* Update `layout.sass` to correctly resize the logos
|
28
|
+
* Update your `home_controller.rb`
|
29
|
+
* Update your `home_controller_spec.rb` fil
|
30
|
+
* Update your `index.html.haml`
|
31
|
+
* Add `UpdateOrganizationMetadata` and `AddMetadataToIdMap` migrations
|
32
|
+
|
33
|
+
|
34
|
+
|
15
35
|
## 2.0.0
|
16
36
|
|
17
37
|
### Features
|
@@ -7,16 +7,21 @@ module Maestrano::Connector::Rails
|
|
7
7
|
Entities.constants&.each do |c|
|
8
8
|
klass = Entities.const_get(c)
|
9
9
|
next unless klass.respond_to?(:formatted_external_entities_names)
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
10
|
+
|
11
|
+
external_class_names = klass.formatted_external_entities_names.values
|
12
|
+
break name = c if camel_case_format(external_class_names).include?(class_name.camelize)
|
13
|
+
|
14
|
+
connec_class_names = klass.formatted_connec_entities_names.values
|
15
|
+
break name = c if camel_case_format(connec_class_names).include?(class_name.camelize)
|
15
16
|
end
|
16
17
|
name.to_s.underscore.to_sym
|
17
18
|
else
|
18
19
|
class_name.to_sym
|
19
20
|
end
|
20
21
|
end
|
22
|
+
|
23
|
+
def self.camel_case_format(array_of_class_names)
|
24
|
+
array_of_class_names.map { |name| name.titleize.delete(' ') }
|
25
|
+
end
|
21
26
|
end
|
22
27
|
end
|
@@ -257,7 +257,10 @@ module Maestrano::Connector::Rails::Concerns::Entity
|
|
257
257
|
# * connec_id and push timestamp
|
258
258
|
# * error message
|
259
259
|
def push_entities_to_connec_to(mapped_external_entities_with_idmaps, connec_entity_name)
|
260
|
-
|
260
|
+
unless @organization.push_to_connec_enabled?(self)
|
261
|
+
Maestrano::Connector::Rails::ConnectorLogger.log('info', @organization, "#{Maestrano::Connector::Rails::External.external_name}-#{self.class.external_entity_name.pluralize} not sent to Connec! Push disabled or name not found")
|
262
|
+
return
|
263
|
+
end
|
261
264
|
|
262
265
|
Maestrano::Connector::Rails::ConnectorLogger.log('info', @organization, "Sending #{Maestrano::Connector::Rails::External.external_name} #{self.class.external_entity_name.pluralize} to Connec! #{connec_entity_name.pluralize}")
|
263
266
|
|
@@ -318,7 +321,10 @@ module Maestrano::Connector::Rails::Concerns::Entity
|
|
318
321
|
# Pushes connec entities to the external application
|
319
322
|
# Sends new external ids to Connec! (either only the id, or the id + the id references)
|
320
323
|
def push_entities_to_external_to(mapped_connec_entities_with_idmaps, external_entity_name)
|
321
|
-
|
324
|
+
unless @organization.push_to_external_enabled?(self)
|
325
|
+
Maestrano::Connector::Rails::ConnectorLogger.log('info', @organization, "#{self.class.connec_entity_name.pluralize} not sent to External! Push disabled or name not found")
|
326
|
+
return
|
327
|
+
end
|
322
328
|
|
323
329
|
Maestrano::Connector::Rails::ConnectorLogger.log('info', @organization, "Sending Connec! #{self.class.connec_entity_name.pluralize} to #{Maestrano::Connector::Rails::External.external_name} #{external_entity_name.pluralize}")
|
324
330
|
|
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.1.
|
4
|
+
version: 2.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maestrano
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|