italian-ruby 0.5.3 → 0.5.8

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: 8f6fa4705235749206faf7c06bab0895474e2384a962ee3bf560a47bbbbe1697
4
- data.tar.gz: 1fad3c1d0da42a7dc4bcf90c1116f361e8ee38089a6dc3785910537efe3dded7
3
+ metadata.gz: 879547a51b7cd48e47bad81d076172dd59f900169ecb57be1a7d15987032830f
4
+ data.tar.gz: 430f8327290ea73a9f540eebb92fe43e7e879c5f694e40027b8f7387b428f823
5
5
  SHA512:
6
- metadata.gz: 9181af0565f27d69951ad53953a88f6935a2ccf52669e6878667443073b666f3360203433fb1fd047ac5a101cd4ed54ab4e801a2ecebeefe79fc94ec3831b420
7
- data.tar.gz: 8f5e135d8996cd9078100198a5c86881debad45bfc1b9bd6d5b1dae9a5d15e79126d5a818d76897a5e7f4690f57d214ecc939d9f634a45db6ad8418e5dbd067f
6
+ metadata.gz: dcd29c6284309ab1f289e76de4e19aa6be26c8b43920f8cdb37b8e8b0f4eb094e726cc47dffe1067ae8da54fce9dd3be7725a4038d58c7ba02ec9887eeead7a8
7
+ data.tar.gz: be93db401eb8bfe8c86d86b511d0d2cc5a0844abb7b64446768abe05227bfd51eaaf531565c01f75283cb7a65f92e8f53739c7739daf1783c9e7004f6c409bc5
@@ -51,6 +51,7 @@ class Array
51
51
  alias :trova :find
52
52
  alias :cerniera :zip
53
53
  alias :ordina :sort
54
+ alias :ordina! :sort!
54
55
  alias :ordina_per :sort_by
55
56
  alias :ordina_per! :sort_by!
56
57
  alias :raggruppa_per :group_by
@@ -9,6 +9,14 @@ class Date
9
9
  class << self
10
10
  alias :oggi :today
11
11
  alias :converti :parse
12
+
13
+ def domani
14
+ oggi + 1
15
+ end
16
+
17
+ def ieri
18
+ oggi - 1
19
+ end
12
20
  end
13
21
 
14
22
  alias :anno_prossimo :next_year
@@ -21,6 +29,7 @@ class Date
21
29
  def due_anni_fa
22
30
  self.prev_year.prev_year
23
31
  end
32
+ alias :due_anni_precedenti :due_anni_fa
24
33
  end
25
34
 
26
35
  Data = Date
@@ -4,6 +4,8 @@
4
4
  # Alias di metodi della classe Float.
5
5
 
6
6
  class Float
7
+ INFINITO = INFINITY
8
+
7
9
  alias :in_intero :to_i
8
10
  alias :arrotonda :round
9
11
  alias :arrotonda_per_eccesso :ceil
@@ -0,0 +1,22 @@
1
+ module BSON
2
+ class ObjectId
3
+ class << self
4
+ alias :converti :from_string
5
+ end
6
+
7
+ alias :in_stringa :to_s
8
+
9
+ def to_json(*args)
10
+ "\"#{self.to_s}\""
11
+ end
12
+ end
13
+ end
14
+ IdOggetto = BSON::ObjectId
15
+
16
+ class String
17
+ def in_id
18
+ BSON::ObjectId self
19
+ rescue BSON::ObjectId::Invalid
20
+ self
21
+ end
22
+ end
@@ -5,6 +5,9 @@ module RSpec
5
5
  def self.descrivi(*args, &block)
6
6
  describe *args, &block
7
7
  end
8
+ def self.variabili_condivise(*args, &block)
9
+ shared_context *args, &block
10
+ end
8
11
 
9
12
  ##
10
13
  # Core
@@ -19,6 +22,10 @@ module RSpec
19
22
  def risposta(*args, &block)
20
23
  last_response *args, &block
21
24
  end
25
+
26
+ class << self
27
+ alias :includi_variabili :include_context
28
+ end
22
29
  end
23
30
 
24
31
  module Hooks
@@ -1,5 +1,5 @@
1
1
  module Italian
2
2
  module Ruby
3
- VERSION = "0.5.3"
3
+ VERSION = "0.5.8"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: italian-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Francesco Ballardin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-06 00:00:00.000000000 Z
11
+ date: 2020-05-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby2ruby
@@ -94,6 +94,7 @@ files:
94
94
  - lib/italian/ruby/core_ext/errors.rb
95
95
  - lib/italian/ruby/core_ext/file.rb
96
96
  - lib/italian/ruby/core_ext/float.rb
97
+ - lib/italian/ruby/core_ext/gems/bson.rb
97
98
  - lib/italian/ruby/core_ext/gems/fabrication.rb
98
99
  - lib/italian/ruby/core_ext/gems/hanami.rb
99
100
  - lib/italian/ruby/core_ext/gems/rack_test.rb