spid-es 0.0.25 → 0.0.30

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: 0df53e9cf72fafa24ceafecf84eeecaeac2ad41ae3fde626427db9015ba066c6
4
- data.tar.gz: 4df05a87667e7e38f788c8a80852290020853a576b9fdd64408adb0e7d84af19
3
+ metadata.gz: ef4d9da8e2a6d3b9e6f0b70a8970010864b1cc98a9b3ca7461717512ec6a04b4
4
+ data.tar.gz: 18c491970d8215cb051c0a505cf33a65b2f0a1170735d27b527a0c1b2777b5bf
5
5
  SHA512:
6
- metadata.gz: c9443aeb32bbeb10038ba9acb6033617c9b2a0f2c5e759bddcb98d0252a41d19248776d2fb0fa2295f6572ecba6fc6eaeb6129ac564c86caed0b2aed929caa87
7
- data.tar.gz: 1ae7d5cec32f6b0a8007c0c27bec008dec9d27c4f4fdd0e20c8d88922ebe32918eedae9260a377da55a304d7380b8073ca730ba4b3d9108c2bbf144f0e87b56a
6
+ metadata.gz: 83e2246e5c07bc0b143c02a72db90dd75f67c0035f2265c524d82d0c5a9db1226fbf84e27bbda03fe58b71d03c0cd8329a451fc69d7097d03b07c2c0b1d3c482
7
+ data.tar.gz: e71257e4fe2e3627d25d880b392527d9f9b4e5a29e3900f2161d584cff4fde9cbafe79f130b5cb09890e7b5a37e8476eeee459aa30197751c533cf284d3bd109
@@ -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
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,18 +235,39 @@ 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']
238
+ unless settings.hash_aggregatore['soggetto_aggregatore'].blank?
239
+ company = contact_person_aggregatore.add_element "md:Company"
240
+ company.text = settings.hash_aggregatore['soggetto_aggregatore']
241
+ end
242
+
243
+ unless settings.hash_aggregatore['email_aggregatore'].blank?
244
+ email_address = contact_person_aggregatore.add_element "md:EmailAddress"
245
+ email_address.text = settings.hash_aggregatore['email_aggregatore']
246
+ end
247
+
248
+ unless settings.hash_aggregatore['telefono_aggregatore'].blank?
249
+ telephone_number = contact_person_aggregatore.add_element "md:TelephoneNumber"
250
+ telephone_number.text = settings.hash_aggregatore['telefono_aggregatore']
251
+ end
241
252
 
242
253
  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
254
 
249
- fiscal_code_aggregatore = extensions_aggregatore.add_element "spid:FiscalCode"
250
- fiscal_code_aggregatore.text = settings.hash_aggregatore['cf_aggregatore']
255
+ unless settings.hash_aggregatore['piva_aggregatore'].blank?
256
+ vat_number_aggregatore = extensions_aggregatore.add_element "spid:VATNumber"
257
+ vat_number_aggregatore.text = settings.hash_aggregatore['piva_aggregatore']
258
+ end
259
+
260
+ unless settings.hash_aggregatore['cipa_aggregatore'].blank?
261
+ ipa_code_aggregatore = extensions_aggregatore.add_element "spid:IPACode"
262
+ ipa_code_aggregatore.text = settings.hash_aggregatore['cipa_aggregatore']
263
+ end
264
+
265
+ unless settings.hash_aggregatore['cf_aggregatore'].blank?
266
+ fiscal_code_aggregatore = extensions_aggregatore.add_element "spid:FiscalCode"
267
+ fiscal_code_aggregatore.text = settings.hash_aggregatore['cf_aggregatore']
268
+ end
269
+
270
+ tipo_aggregatore = extensions_aggregatore.add_element "spid:PublicServicesFullAggregator"
251
271
 
252
272
  contact_person_aggregato = root.add_element "md:ContactPerson", {
253
273
  "contactType" => "other",
@@ -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.25'
5
+ s.version = '0.0.30'
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.25
4
+ version: 0.0.30
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-07-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: canonix