italian-ruby 0.9.9 → 0.9.14

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: 205914029ed8bc7cb0b75137028e993b7bc38cb381844509327e76a08a9b8605
4
- data.tar.gz: 200cc0ce2d7c89f3d82510bc63328a3b7343be9642db377bcace508375b2c677
3
+ metadata.gz: fa4041d1c3fc4a0fdc99d5c1a04f70393b5de6c63d9166177952b3a069b141a7
4
+ data.tar.gz: b20a51a0f78ac7327dfbaae79fe1bd22945e1764af3de48b5090ba0352b2c0c6
5
5
  SHA512:
6
- metadata.gz: 6e5ef308be4d4995d16dbf9b2eba8e486de4ff9c572a7672f112131f063d325a0bce30152c160fda3bfd15885b6842a0d2cb50bd025f41c435dc1ad4e63028b1
7
- data.tar.gz: a0c8b2bd9dc50e8f2a33bdbc3e6000359400a1c3581251f54b41dd01509be00d2ddbdb1b4d04113771391dc5d681d8a7ce1523c936d82426e42be6b221c75811
6
+ metadata.gz: 183f206260a8a7cab3f3f44744408e4bcab2b8ca6b0570b227ff3aa4fbe5f73c0b369b4760bf693efbe4fc72cd94c2c57ddefcd09f189f4b2606199cd61c9953
7
+ data.tar.gz: d6504f8fb1459389eebfd450c80f78300d03c04b9bc6fd358f7d66bfbe85be59c8c51b450cdb71fefaf05981f41647a4e8f211da51c8ab551031b54f2dae6891
data/.gitignore CHANGED
@@ -7,5 +7,7 @@
7
7
  /spec/reports/
8
8
  /tmp/
9
9
 
10
+ .italian-ruby
11
+
10
12
  # rspec failure tracking
11
13
  .rspec_status
data/README.md CHANGED
@@ -76,7 +76,7 @@ LibreriaInteressantissima.metodo_interessantissimo
76
76
  # Che roba!
77
77
  ```
78
78
 
79
- È possibile anche utilizzare il `richiedi`, che funziona come il `require` di Ruby, nel remoto caso in cui _qualcuno_ faccia una gemma in Italian Ruby, la pubblichi su rubygems.org e _qualcun'altro_ la scarichi e la installi. Se mai succedesse, funzionerebbe così:
79
+ È possibile anche utilizzare il `richiedi`, che funziona come il `require` di Ruby, nel remoto caso in cui _qualcuno_ faccia una gemma in Italian Ruby, la pubblichi su rubygems.org e _qualcun altro_ la scarichi e la installi. Se mai succedesse, funzionerebbe così:
80
80
 
81
81
  ```ruby
82
82
  # tuo_file_ruby.rb
@@ -29,6 +29,7 @@ class Date
29
29
  alias :settimana :cweek
30
30
  alias :mese :month
31
31
  alias :anno :year
32
+ alias :fra? :between?
32
33
  alias :formatta :strftime
33
34
 
34
35
  def due_anni_fa
@@ -7,6 +7,7 @@ class Float
7
7
  INFINITO = INFINITY
8
8
 
9
9
  alias :in_intero :to_i
10
+ alias :in_decimale :to_f
10
11
  alias :in_stringa :to_s
11
12
  alias :arrotonda :round
12
13
  alias :arrotonda_per_eccesso :ceil
@@ -133,6 +133,10 @@ module RSpec
133
133
  alias :volta :times
134
134
  end
135
135
  end
136
+
137
+ module ArgumentMatchers
138
+ alias :mappa_che_include :hash_including
139
+ end
136
140
  end
137
141
  end
138
142
 
@@ -151,6 +155,9 @@ RSpec.configure do |config|
151
155
  RSpec::Matchers.alias_matcher :cambi, :change
152
156
  RSpec::Matchers.alias_matcher :di, :by
153
157
  RSpec::Matchers.alias_matcher :includa, :include
158
+ RSpec::Matchers.alias_matcher :includano, :include
159
+ RSpec::Matchers.alias_matcher :corrisponda_a, :match
160
+ RSpec::Matchers.alias_matcher :corrispondano_a, :match
154
161
 
155
162
  config.alias_example_to :esso
156
163
  config.alias_example_to :essa
@@ -14,6 +14,12 @@ class Time
14
14
  alias :in_numero :to_i
15
15
  alias :formatta :strftime
16
16
  alias :localizza :localtime
17
+ alias :secondi :sec
18
+ alias :secondo :sec
19
+ alias :minuto :min
20
+ alias :minuti :min
21
+ alias :ore :hour
22
+ alias :ora :hour
17
23
 
18
24
  def in_data
19
25
  self.to_date
@@ -42,6 +48,22 @@ class Time
42
48
  return (self.to_date <=> other) if other.is_a? Date
43
49
  original_compare other
44
50
  end
51
+
52
+ def inizio_ora
53
+ Time.new(self.year, self.month, self.day, self.hour)
54
+ end
55
+
56
+ def fine_ora
57
+ Time.new(self.year, self.month, self.day, self.hour, 59, 59)
58
+ end
59
+
60
+ def inizio_minuto
61
+ Time.new(self.year, self.month, self.day, self.hour, self.min)
62
+ end
63
+
64
+ def fine_minuto
65
+ Time.new(self.year, self.month, self.day, self.hour, self.min, 59)
66
+ end
45
67
  end
46
68
 
47
69
  Tempo = Time
@@ -1,5 +1,5 @@
1
1
  module Italian
2
2
  module Ruby
3
- VERSION = "0.9.9"
3
+ VERSION = "0.9.14"
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.9.9
4
+ version: 0.9.14
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-08-06 00:00:00.000000000 Z
11
+ date: 2020-09-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler