eco-helpers 1.3.6 → 1.3.7

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
  SHA256:
3
- metadata.gz: f068ac5a87fcddd53b2ade559622c0f4f9b603f2f5398822b067bb59aec9b348
4
- data.tar.gz: 39834d2736e117269c1b1e0fb10f6f851d306643ea4ec65203ee62006f5cb4de
3
+ metadata.gz: 11b634b1d49337b52fe8d6a04876d706c14e44059410c77801d780a59c2d6276
4
+ data.tar.gz: 0fdc891abd28dd93339509f1b0d46a265f7754a1dfcc9eba9ff85ae8a1e6dd2e
5
5
  SHA512:
6
- metadata.gz: 344a308dc23d4b462db4307aa3321c4dce1ef63bf322977a542dc6f2c46ce7a98320d51a0ab16ae765be5506565a93e4a85579684f985143deb1f6647e885ca4
7
- data.tar.gz: ba70a2f335c345569a7f7295a501015cdb035fdfff90f01a6dd72fb63e9a348095f38adf40b5659fbcd3d181bf89abe62ec75620c505d420e95a2db451453fba
6
+ metadata.gz: 536f7e54656a444baf0d83213691127f194dd91ce3f45ff91bea7fae441eb7a69b8af0cc41c4a45d8edd08159daf8fa423331bad0fd9f918e0d4b7612fbfd84d
7
+ data.tar.gz: c93ef5b4e097999eccaf356be4fea1332e215355e71edf272d6ccf340baa1ac2025df645654b374bc5bbbb26919ebe98a10ab261c0a60eb94dfea16f406364c3
@@ -106,7 +106,14 @@ module Eco
106
106
  @internal_entry.key?("filter_tags")
107
107
  end
108
108
 
109
+ def default_tag?
110
+ @internal_entry.key?("default_tag")
111
+ end
109
112
 
113
+ def default_tag
114
+ @internal_entry["default_tag"]
115
+ end
116
+
110
117
  # Provides a reference of this person.
111
118
  # @return [String] string summary of this person identity.
112
119
  def to_s(options)
@@ -13,7 +13,7 @@ module Ecoportal
13
13
  if status&.complete?
14
14
  operation.process_response job_result(job_id, operation)
15
15
  else
16
- raise "Job `#{job_id}` not complete. Probably timeout after #{JOB_TIMEOUT + 60} seconds. Current status: #{status}"
16
+ raise "Job `#{job_id}` not complete. Probably timeout after #{JOB_TIMEOUT + 120} seconds. Current status: #{status}"
17
17
  end
18
18
  end
19
19
 
@@ -26,7 +26,7 @@ module Ecoportal
26
26
  while true
27
27
  status = job_status(job_id)
28
28
  break status if status.complete?
29
- break status if Time.now >= before + (JOB_TIMEOUT + 60)
29
+ break status if Time.now >= before + (JOB_TIMEOUT + 120)
30
30
  sleep(DELAY_STATUS_CHECK)
31
31
  status
32
32
  end
@@ -66,13 +66,14 @@ module Eco
66
66
 
67
67
  person.account.permissions_custom = session.new_preset(person) unless !create && options.dig(:exclude, :abilities)
68
68
 
69
- if session.tagtree
70
- person.account.default_tag = session.tagtree.default_tag(*person.filter_tags)
71
- else
72
- tags = person.filter_tags
73
- person.account.default_tag = tags.first unless tags.length > 1
69
+ unless options.dig(:exclude, :filter_tags) || entry.default_tag?
70
+ if session.tagtree
71
+ person.account.default_tag = session.tagtree.default_tag(*person.filter_tags)
72
+ else
73
+ tags = person.filter_tags
74
+ person.account.default_tag = tags.first unless tags.length > 1
75
+ end
74
76
  end
75
-
76
77
  end
77
78
 
78
79
  creation.add(person) if create
@@ -55,7 +55,7 @@ module Eco
55
55
 
56
56
  person.account.permissions_custom = session.new_preset(person) unless options.dig(:exclude, :abilities)
57
57
 
58
- unless options.dig(:exclude, :filter_tags)
58
+ unless options.dig(:exclude, :filter_tags) || entry.default_tag?
59
59
  if session.tagtree
60
60
  person.account.default_tag = session.tagtree.default_tag(*person.filter_tags)
61
61
  else
@@ -59,11 +59,13 @@ module Eco
59
59
 
60
60
  person.account.permissions_custom = session.new_preset(person) unless !create && options.dig(:exclude, :abilities)
61
61
 
62
- if session.tagtree
63
- person.account.default_tag = session.tagtree.default_tag(*person.filter_tags)
64
- else
65
- tags = person.filter_tags
66
- person.account.default_tag = tags.first unless tags.length > 1
62
+ unless options.dig(:exclude, :filter_tags) || entry.default_tag?
63
+ if session.tagtree
64
+ person.account.default_tag = session.tagtree.default_tag(*person.filter_tags)
65
+ else
66
+ tags = person.filter_tags
67
+ person.account.default_tag = tags.first unless tags.length > 1
68
+ end
67
69
  end
68
70
 
69
71
  end
data/lib/eco/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Eco
2
- VERSION = "1.3.6"
2
+ VERSION = "1.3.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eco-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.6
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oscar Segura