italian-ruby 0.9.5 → 0.9.10

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: 7428ba47e0eecd95e2a7ef1a777918f3f79bfbfd8728c76cd8f2392150403a14
4
- data.tar.gz: 1eb2b601bf7b0937a1f7a870fe5c9d63c7bf562177bb2f8fd9dd2fdc2d25bbcd
3
+ metadata.gz: 41f0ade9296cc7d8b11a9414978ce556ea9da81126cd6ebdd5fb6134c98ad9a1
4
+ data.tar.gz: e61d640f05ed87ed473cc33f674e63dc6c1a94b4a4034523111aa03d36aa26f3
5
5
  SHA512:
6
- metadata.gz: 9b030da45aeff663f9973c95e71ab061a36a89af4558d75198672dc0ae74d7116dba8121d24d02e3293308beb80cf497ef723aa4477cf83001aaff41d76a55bf
7
- data.tar.gz: 978eb2ba0769b180d2c77fa180f41047bed4655f3c874f9a2acecc7de337a2fb084f3de85fc4e92235e6e3cf46adf9f5a2056c0a922200a603d65135a88418e1
6
+ metadata.gz: 2898ab0c3902662018515f1058ff98cb0c5f1e8a905c72dcbbcae2e2417a6ee29e3e1e6884258551a7592233b1407e4f73840daaac1ebab0822527783d95d507
7
+ data.tar.gz: 0aced6ffcba2e42e099798485ffc0205590fe8cae03cb421b726e3cc3445a4f37c9843e99297429ff57a3b3b6c6c50db6efd2276379492c35f9901fa72e1ecbf
@@ -6,7 +6,9 @@ class Class
6
6
  alias :protetti :protected
7
7
  alias :pubblici :public
8
8
  alias :accessore :attr_accessor
9
+ alias :lettore :attr_reader
10
+ alias :scrittore :attr_writer
9
11
  alias :definisci_metodo :define_method
10
12
  alias :apri_classe :class_eval
11
13
  alias :moduli_inclusi :included_modules
12
- end
14
+ end
@@ -36,6 +36,14 @@ class Date
36
36
  end
37
37
  alias :due_anni_precedenti :due_anni_fa
38
38
 
39
+ def formatta_locale(format)
40
+ if defined? I18n
41
+ I18n.l self, format: format
42
+ else
43
+ strftime format
44
+ end
45
+ end
46
+
39
47
  alias :original_equality :==
40
48
  def ==(other)
41
49
  return (self == other.to_date) if other.is_a? Time
@@ -7,6 +7,7 @@ class Float
7
7
  INFINITO = INFINITY
8
8
 
9
9
  alias :in_intero :to_i
10
+ alias :in_stringa :to_s
10
11
  alias :arrotonda :round
11
12
  alias :arrotonda_per_eccesso :ceil
12
13
  alias :arrotonda_per_difetto :floor
@@ -150,6 +150,7 @@ RSpec.configure do |config|
150
150
  RSpec::Matchers.alias_matcher :abbia_ricevuto, :have_received
151
151
  RSpec::Matchers.alias_matcher :cambi, :change
152
152
  RSpec::Matchers.alias_matcher :di, :by
153
+ RSpec::Matchers.alias_matcher :includa, :include
153
154
 
154
155
  config.alias_example_to :esso
155
156
  config.alias_example_to :essa
@@ -8,7 +8,9 @@ class Integer
8
8
  alias :in_decimale :to_f
9
9
  alias :in_stringa :to_s
10
10
  alias :in_numero :to_i
11
+ alias :in_intero :to_i
11
12
  alias :valore_assoluto :abs
13
+ alias :arrotonda :round
12
14
 
13
15
  def secondi
14
16
  self
@@ -9,7 +9,7 @@ class OpenStruct
9
9
  def in_mappa(*args)
10
10
  hash = to_h *args
11
11
  hash.in_mappa do |key, value|
12
- if value.respond_to? :to_h
12
+ if value.is_a? OpenStruct
13
13
  [ key, value.to_h ]
14
14
  else
15
15
  [ key, value ]
@@ -18,4 +18,4 @@ class OpenStruct
18
18
  end
19
19
  end
20
20
 
21
- Archivio = OpenStruct
21
+ Archivio = OpenStruct
@@ -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
@@ -23,6 +29,14 @@ class Time
23
29
  self
24
30
  end
25
31
 
32
+ def formatta_locale(format)
33
+ if defined? I18n
34
+ I18n.l self, format: format
35
+ else
36
+ strftime format
37
+ end
38
+ end
39
+
26
40
  alias :original_equality :==
27
41
  def ==(other)
28
42
  return (self.to_date == other) if other.is_a? Date
@@ -1,5 +1,5 @@
1
1
  module Italian
2
2
  module Ruby
3
- VERSION = "0.9.5"
3
+ VERSION = "0.9.10"
4
4
  end
5
5
  end
@@ -8,10 +8,10 @@ if exists("b:current_syntax")
8
8
  endif
9
9
 
10
10
  syn match italianRubyKeyword /\v(\s|^)(classe|modulo|esegui)\s/me=e-1
11
- syn match italianRubyKeyword /\v(\s|^)(se|allora|altrimenti_se|a_meno_che|considera|quando|finché|in|definito\?|alias|super)\s/me=e-1
11
+ syn match italianRubyKeyword /\v(\s|^)(se|allora|altrimenti_se|a_meno_che|considera|quando|finché|in|definito\?|blocco_dato\?|alias|super)\s/me=e-1
12
12
  syn match italianRubyKeyword /\v(\s|^)(prossimo|prossima|esci|ritorna|rilascia|recupera)\s/me=e-1
13
13
  syn match italianRubyKeyword /\v(\s|^)(se|allora|altrimenti|a_meno_che|considera|esci|ritorna|rilascia|blocco_dato\?|super)$/
14
- syn match italianRubyKeyword /\v(\s|^)(inizia|recupera|assicura|riprova|esegui|fine)$/
14
+ syn match italianRubyKeyword /\v(\s|^)(prossimo|prossima|inizia|recupera|assicura|riprova|esegui|fine)$/
15
15
 
16
16
  syn region italianRubyDefinition start=/definisci/ end=/[$\n\(]/ contains=italianRubySymbol,italianRubyConstant,italianRubyNumeric,italianRubySpecial,italianRubySplatOperator
17
17
  syn match italianRubyMethodName /\v([a-z0-9_=\?\!àèéìòù]+)/ contained containedin=italianRubyDefinition
@@ -46,7 +46,7 @@ syn match italianRubySpecial /\v\.(nuovo|nuova)(\s|\,|\()/hs=s+1,
46
46
  syn match italianRubySpecial /\v\.(nuovo|nuova)\)/hs=s+1,he=e-1
47
47
  syn match italianRubySpecial /\v\.(nuovo|nuova)$/hs=s+1
48
48
  syn match italianRubySpecial /\v(se_stesso|se_stessa)/
49
- syn match italianRubySpecial /\v(\s)+(si|no|nullo|nulla)$/
50
- syn match italianRubySpecial /\v(\s)+(si|no|nullo|nulla)\W/he=e-1,me=e-1
49
+ syn match italianRubySpecial /\v(\s)+(si|no|nullo|nulla|vero|falso)$/
50
+ syn match italianRubySpecial /\v(\s)+(si|no|nullo|nulla|vero|falso)\W/he=e-1,me=e-1
51
51
 
52
52
  let b:current_syntax = "ir"
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.5
4
+ version: 0.9.10
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-03 00:00:00.000000000 Z
11
+ date: 2020-08-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler