promethee 1.3.13 → 1.3.15

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
- SHA1:
3
- metadata.gz: 1776f27dd12b69eb4f7de5c420d938ba725e475b
4
- data.tar.gz: 60fa948ad2a81f072baeabc0c36ed933f521a08c
2
+ SHA256:
3
+ metadata.gz: 4d9b83829af4366f0438d7d7d07cfec271ebb96211ccba1629416f2dabd6ea61
4
+ data.tar.gz: a318d9d5ed598bfc51704b8c60837de5ae737c8e634b03f9e6641d1abb9faee0
5
5
  SHA512:
6
- metadata.gz: ac8cfcf7ea0ed9d17207ac62580c7278ef8f20d9ed968729000476705f375610207fe911137bd01ff329fa6f17c32fa78a26659b803b3faec49671a193f92b95
7
- data.tar.gz: 9bf0cc3f3104542b6f55472ee0c393ad60b8f4c198f68778e30e260597f4df82251a4c891c6b319e58bb621c0fd96d2f7351222c627482c0e45a0f6b6a29688a
6
+ metadata.gz: 437f8fbd6a87234df3d6894d51c259e8da71df8b05b56a9b3323bd7326384f50cd64fb4265b7016161fed77ec6616457b66817b16bc396662608d5a961dc4f6c
7
+ data.tar.gz: 722f0c987318b69cbd177052970c41f5983147ad112df02f0797c7a8917c78c18f528e1b687d349eba305fafd173d1e792039c842ed07d562c16d7927b7f75ac
@@ -15,7 +15,7 @@ promethee_data = Promethee::Data.new master_data, localization_data: localizatio
15
15
  prometheeLocalizer.controller('PrometheeLocalizerController', ['$scope', 'data', function($scope, data) {
16
16
 
17
17
  $scope.data = data;
18
- $scope.component = data;
18
+ $scope.component = {children: data.components};
19
19
 
20
20
  $scope.options = {
21
21
  toolbar: [
@@ -52,7 +52,7 @@ module Promethee
52
52
  components: []
53
53
  }
54
54
  # We create a flat list of the children and all their child, in the master's order
55
- master_components_flat = Promethee::Data.flatten_components @master_data.deep_dup[:children]
55
+ master_components_flat = Promethee::Data.flatten_components @master_data.deep_dup
56
56
  master_components_flat.each do |component|
57
57
  localized_component = Promethee::Data.find_localized_component component[:id], @localization_data_raw
58
58
  # We take either the localized, or the master component
@@ -93,12 +93,10 @@ module Promethee
93
93
  end
94
94
 
95
95
  # Takes an array of components and puts every component and their children into a unique flat array
96
- def self.flatten_components(components)
97
- return [] if components.nil?
98
- components.reduce [] do |flat_components, component|
99
- flat_components +
100
- [component.except(:children)] +
101
- flatten_components(component[:children] || [])
96
+ def self.flatten_components(component)
97
+ flat_components = [component.except(:children)]
98
+ (component[:children] || []).reduce flat_components do |flat_components, component|
99
+ flat_components + flatten_components(component)
102
100
  end
103
101
  end
104
102
  end
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '1.3.13'
3
+ VERSION = '1.3.15'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promethee
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.13
4
+ version: 1.3.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julien Dargelos
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2018-03-30 00:00:00.000000000 Z
16
+ date: 2018-04-01 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: rails
@@ -318,7 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
318
318
  version: '0'
319
319
  requirements: []
320
320
  rubyforge_project:
321
- rubygems_version: 2.6.12
321
+ rubygems_version: 2.7.3
322
322
  signing_key:
323
323
  specification_version: 4
324
324
  summary: Bring fire to your page