italian-ruby 0.9.10 → 0.9.15

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: 41f0ade9296cc7d8b11a9414978ce556ea9da81126cd6ebdd5fb6134c98ad9a1
4
- data.tar.gz: e61d640f05ed87ed473cc33f674e63dc6c1a94b4a4034523111aa03d36aa26f3
3
+ metadata.gz: 2cbaae2ffc707e561b3ad4047bf75345cbad4a2d88d99c121c1c7504389bc2a0
4
+ data.tar.gz: c390ea6dd47d83624bf41211eb7ecdb9396c1cad352ed0c793807ce04f5a4c6f
5
5
  SHA512:
6
- metadata.gz: 2898ab0c3902662018515f1058ff98cb0c5f1e8a905c72dcbbcae2e2417a6ee29e3e1e6884258551a7592233b1407e4f73840daaac1ebab0822527783d95d507
7
- data.tar.gz: 0aced6ffcba2e42e099798485ffc0205590fe8cae03cb421b726e3cc3445a4f37c9843e99297429ff57a3b3b6c6c50db6efd2276379492c35f9901fa72e1ecbf
6
+ metadata.gz: 6d3ecc6f3c80870d563182f6278a256ec35e674a4751c01c9dc9ebf3f0bc3fbe6ad0455aa7bf771fc5ea4733f2deeb6d7ff45e47859a07590eee441c65319d2d
7
+ data.tar.gz: 99840b8a50262461cc7e56ea05341a97e77d56f58f479aa44d75ff75870979fbbbbbc3dda6164e4df5378ed0809082216b2852ec76346ee3832422e6a8010bb9
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
@@ -5,6 +5,7 @@
5
5
 
6
6
  class String
7
7
  alias :congela :freeze
8
+ alias :caratteri :chars
8
9
  alias :prima_maiuscola :capitalize
9
10
  alias :in_simbolo :to_sym
10
11
  alias :in_stringa :to_s
@@ -16,6 +17,7 @@ class String
16
17
  alias :maiuscolo :upcase
17
18
  alias :minuscola :downcase
18
19
  alias :minuscolo :downcase
20
+ alias :indice :index
19
21
  alias :combacia? :match?
20
22
  alias :inizia_con? :start_with?
21
23
  alias :finisce_con? :end_with?
@@ -48,6 +48,22 @@ class Time
48
48
  return (self.to_date <=> other) if other.is_a? Date
49
49
  original_compare other
50
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
51
67
  end
52
68
 
53
69
  Tempo = Time
@@ -1,5 +1,5 @@
1
1
  module Italian
2
2
  module Ruby
3
- VERSION = "0.9.10"
3
+ VERSION = "0.9.15"
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.10
4
+ version: 0.9.15
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-20 00:00:00.000000000 Z
11
+ date: 2020-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler