spid-es 0.0.26 → 0.0.31

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: 22bca7fc7ffffb1f963e39275f6026c15d41ef5b86de646a1b88fc812afeefa0
4
- data.tar.gz: 2b633c95a520a05e7dbcc64adba2137fd1bfaaf781d5236e9bcf391095aa3aac
3
+ metadata.gz: 45a2021698f17c419eff32d26d8ce5a49cad6b73aa011448a8457d1a3e94d964
4
+ data.tar.gz: aa22c0c52bc2cc16d91403d32465df43ff880302444d500f99d7bfd816787048
5
5
  SHA512:
6
- metadata.gz: b0b0dd8e38e3ef358a148de182d9d38a5aa6332da952815c6a92dec1f93d54948271a8eb096ac56cbbec0f856ae3cb00e4dffcdc3094c819140e58a5714ab003
7
- data.tar.gz: '006628db995c81787c38d3b4dd0d46f545287125aca2ab770a68383caffec515e32e6bdb3a6d52a7bb684cbbd10ee0355535bbc7a5e8c83449dcf69d3e15b4b0'
6
+ metadata.gz: 780073b1f2b9c1a8735725d365fcec406c70772c712c5338780be0d3073cd679802f274a2b497a569f64b3df99b5972c4f579a6785622a9bbb8f805b25efc934
7
+ data.tar.gz: 3c0ee1bba5171de914b7b173ed0eacfa76ae91d3c9211dc515e4ef34568db574cb5ac9efab403bbd11b69e9f4f23593f956084ecd69f242ece239373215e3492
@@ -5,7 +5,6 @@ require "uri"
5
5
  require "digest/md5"
6
6
  require "nokogiri"
7
7
  require_relative "../xml_security_new" #fa il require della nokogiri
8
- require "uuid"
9
8
 
10
9
  # Class to return SP metadata based on the settings requested.
11
10
  # Return this XML in a controller, then give that URL to the the
@@ -50,7 +49,7 @@ module Spid
50
49
  #Tolto per non far cambiare sempre il metadata
51
50
  #uuid = "_" + UUID.new.generate
52
51
  #genero l'id come hash dell'entityID
53
- uuid = "_" + settings.issuer.hash.to_s
52
+ uuid = "_"+Digest::MD5.hexdigest(settings.issuer)
54
53
  self.uuid = uuid
55
54
  root.attributes["ID"] = uuid
56
55
 
@@ -224,7 +223,7 @@ module Spid
224
223
  "xml:lang" => "it"
225
224
  }
226
225
 
227
- org_display_name.text = settings.organization['org_display_name']+(settings.aggregato ? " tramite #{settings.hash_aggregatore['soggetto_aggregatore']}" : '')
226
+ org_display_name.text = settings.organization['org_display_name'] #+(settings.aggregato ? " tramite #{settings.hash_aggregatore['soggetto_aggregatore']}" : '')
228
227
  org_url = organization.add_element "md:OrganizationURL", {
229
228
  "xml:lang" => "it"
230
229
  }
@@ -236,23 +235,46 @@ module Spid
236
235
  "contactType" => "other",
237
236
  "spid:entityType" => "spid:aggregator"
238
237
  }
239
- company = contact_person_aggregatore.add_element "md:Company"
240
- company.text = settings.hash_aggregatore['soggetto_aggregatore']
241
238
 
242
239
  extensions_aggregatore = contact_person_aggregatore.add_element "md:Extensions"
243
- vat_number_aggregatore = extensions_aggregatore.add_element "spid:VATNumber"
244
- vat_number_aggregatore.text = settings.hash_aggregatore['piva_aggregatore']
245
-
246
- ipa_code_aggregatore = extensions_aggregatore.add_element "spid:IPACode"
247
- ipa_code_aggregatore.text = settings.hash_aggregatore['cipa_aggregatore']
248
240
 
249
- fiscal_code_aggregatore = extensions_aggregatore.add_element "spid:FiscalCode"
250
- fiscal_code_aggregatore.text = settings.hash_aggregatore['cf_aggregatore']
241
+ unless settings.hash_aggregatore['piva_aggregatore'].blank?
242
+ vat_number_aggregatore = extensions_aggregatore.add_element "spid:VATNumber"
243
+ vat_number_aggregatore.text = settings.hash_aggregatore['piva_aggregatore']
244
+ end
245
+
246
+ unless settings.hash_aggregatore['cipa_aggregatore'].blank?
247
+ ipa_code_aggregatore = extensions_aggregatore.add_element "spid:IPACode"
248
+ ipa_code_aggregatore.text = settings.hash_aggregatore['cipa_aggregatore']
249
+ end
250
+
251
+ unless settings.hash_aggregatore['cf_aggregatore'].blank?
252
+ fiscal_code_aggregatore = extensions_aggregatore.add_element "spid:FiscalCode"
253
+ fiscal_code_aggregatore.text = settings.hash_aggregatore['cf_aggregatore']
254
+ end
255
+
256
+ tipo_aggregatore = extensions_aggregatore.add_element "spid:PublicServicesFullAggregator"
257
+
258
+ unless settings.hash_aggregatore['soggetto_aggregatore'].blank?
259
+ company = contact_person_aggregatore.add_element "md:Company"
260
+ company.text = settings.hash_aggregatore['soggetto_aggregatore']
261
+ end
262
+
263
+ unless settings.hash_aggregatore['email_aggregatore'].blank?
264
+ email_address = contact_person_aggregatore.add_element "md:EmailAddress"
265
+ email_address.text = settings.hash_aggregatore['email_aggregatore']
266
+ end
267
+
268
+ unless settings.hash_aggregatore['telefono_aggregatore'].blank?
269
+ telephone_number = contact_person_aggregatore.add_element "md:TelephoneNumber"
270
+ telephone_number.text = settings.hash_aggregatore['telefono_aggregatore']
271
+ end
251
272
 
252
273
  contact_person_aggregato = root.add_element "md:ContactPerson", {
253
274
  "contactType" => "other",
254
275
  "spid:entityType" => "spid:aggregated"
255
276
  }
277
+
256
278
  company = contact_person_aggregato.add_element "md:Company"
257
279
  company.text = settings.organization['org_name']
258
280
 
@@ -2,7 +2,7 @@ $LOAD_PATH.push File.expand_path('../lib', __FILE__)
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'spid-es'
5
- s.version = '0.0.26'
5
+ s.version = '0.0.31'
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Fabiano Pavan"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spid-es
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.26
4
+ version: 0.0.31
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabiano Pavan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-08 00:00:00.000000000 Z
11
+ date: 2020-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: canonix