mangusta 0.4.3 → 0.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f9cd6de70cae5a5d590f26030362996e6ba6cf47e6bfd645f61e523ff8a31be
4
- data.tar.gz: e3fba10c221ec9188352f8a57d2e768346ff47e6dccbc161a84f8f7817a5eba1
3
+ metadata.gz: 208efb975c8370ebdd3495bb2c450adfdbb06680987ff81122e8e2b4caf7ec58
4
+ data.tar.gz: 7fb1f45c20640c3ec4dcee9095357a7b8d088c1ebaa1778fd03b8e94fc36367b
5
5
  SHA512:
6
- metadata.gz: 5d59e8f7689aa5b595b2aefa11f145c21ddb3df1823db0185d57cf23eea20b009d304e85356d4c6368a35967a5defd64354f048ea1fe060722260d249a6ed015
7
- data.tar.gz: 53010ebeda4d206552b0abc2f350a18dca2e71c598a9bcd6730da1c5a6f3650cc171a7348bd8cd4cc3ac05b8f339dcd1aee42bf74090216b1e9f986dbea60475
6
+ metadata.gz: 8657b01392f853713c0ece3294a1e40fa61ed9fbbebc78db1f4fb2c0f03c15b149bc06cb1c257bfb6f850ee8deeef363983859d246a04067f1b7dd164abecb02
7
+ data.tar.gz: bd74104cb4e2e07f3bc2627a68b860e43413eae0331624bac8d436c9884bef8a43945b78bf3a4782b4f8b2a4a747b71f562a0719837054ac991b7fbd66a1a81b
data/.gitignore CHANGED
@@ -6,6 +6,7 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ /.italian-ruby/
9
10
 
10
11
  # rspec failure tracking
11
12
  .rspec_status
@@ -93,9 +93,10 @@ modulo Mangusta
93
93
  alza "L'argomento passato deve essere un #{_nome_classe_documento} o una Mappa" se
94
94
  documento.non_è_un? _classe_documento e documento.non_è_una? Mappa
95
95
 
96
- documento_in_json = Mangusta::Utilità.converti_in_json(documento)
96
+ documento_in_json = Mangusta::Utilità.converti_in_json documento
97
97
  documento_in_json.deposita :_id, IdOggetto.nuovo se documento_in_json.non_ha_chiave? :_id
98
98
  _collezione.inserisci_uno documento_in_json
99
+
99
100
  documento = Mangusta::Utilità.converti_in_documento documento, _classe_documento
100
101
  _propaga_relazioni documento, documento_in_json
101
102
  documento
@@ -117,10 +118,13 @@ modulo Mangusta
117
118
  alza "Il primo argomento deve essere una Stringa o un documento" a_meno_che
118
119
  documento.è_una? Stringa o documento.risponde_a? :_id
119
120
 
120
- id_documento = documento.risponde_a?(:_id) ? documento._id : documento
121
- id_documento = IdOggetto.converti id_documento
122
- _collezione.aggiorna_uno Mappa[_id: id_documento], Mappa["$set" => valori_da_aggiornare]
123
- cerca_per_id(id_documento)
121
+ documento = cerca_per_id id_documento.in_id se documento.è_una? Stringa
122
+ _collezione.aggiorna_uno Mappa[_id: documento._id], Mappa["$set" => valori_da_aggiornare]
123
+
124
+ documento = cerca_per_id documento._id
125
+ documento_in_json = Mangusta::Utilità.converti_in_json documento
126
+ _propaga_relazioni documento, documento_in_json
127
+ documento
124
128
  fine
125
129
 
126
130
  ##
@@ -1,3 +1,3 @@
1
1
  modulo Mangusta
2
- VERSIONE = "0.4.3"
2
+ VERSIONE = "0.4.4"
3
3
  fine
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mangusta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
4
+ version: 0.4.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Ballardin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-19 00:00:00.000000000 Z
11
+ date: 2020-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: italian-ruby