italian-ruby 0.9.4 → 0.9.9
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 +4 -4
- data/lib/italian/ruby/core_ext/class.rb +3 -1
- data/lib/italian/ruby/core_ext/date.rb +8 -0
- data/lib/italian/ruby/core_ext/float.rb +1 -0
- data/lib/italian/ruby/core_ext/gems/rspec.rb +8 -1
- data/lib/italian/ruby/core_ext/integer.rb +2 -0
- data/lib/italian/ruby/core_ext/open_struct.rb +2 -2
- data/lib/italian/ruby/core_ext/time.rb +10 -1
- data/lib/italian/ruby/version.rb +1 -1
- data/vim/syntax/ir.vim +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 205914029ed8bc7cb0b75137028e993b7bc38cb381844509327e76a08a9b8605
|
4
|
+
data.tar.gz: 200cc0ce2d7c89f3d82510bc63328a3b7343be9642db377bcace508375b2c677
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e5ef308be4d4995d16dbf9b2eba8e486de4ff9c572a7672f112131f063d325a0bce30152c160fda3bfd15885b6842a0d2cb50bd025f41c435dc1ad4e63028b1
|
7
|
+
data.tar.gz: a0c8b2bd9dc50e8f2a33bdbc3e6000359400a1c3581251f54b41dd01509be00d2ddbdb1b4d04113771391dc5d681d8a7ce1523c936d82426e42be6b221c75811
|
@@ -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
|
@@ -8,6 +8,9 @@ module RSpec
|
|
8
8
|
def self.variabili_condivise(*args, &block)
|
9
9
|
shared_context *args, &block
|
10
10
|
end
|
11
|
+
def self.contesto_condiviso(*args, &block)
|
12
|
+
shared_context *args, &block
|
13
|
+
end
|
11
14
|
|
12
15
|
##
|
13
16
|
# Core
|
@@ -25,6 +28,7 @@ module RSpec
|
|
25
28
|
|
26
29
|
class << self
|
27
30
|
alias :includi_variabili :include_context
|
31
|
+
alias :includi_contesto :include_context
|
28
32
|
end
|
29
33
|
end
|
30
34
|
|
@@ -135,6 +139,8 @@ end
|
|
135
139
|
RSpec.configure do |config|
|
136
140
|
RSpec::Matchers.alias_matcher :sia, :be
|
137
141
|
RSpec::Matchers.alias_matcher :siano, :be
|
142
|
+
RSpec::Matchers.alias_matcher :sia_nullo, :be_nil
|
143
|
+
RSpec::Matchers.alias_matcher :sia_nulla, :be_nil
|
138
144
|
RSpec::Matchers.alias_matcher :tutti, :all
|
139
145
|
RSpec::Matchers.alias_matcher :tutte, :all
|
140
146
|
RSpec::Matchers.alias_matcher :equivalga_a, :eq
|
@@ -144,6 +150,7 @@ RSpec.configure do |config|
|
|
144
150
|
RSpec::Matchers.alias_matcher :abbia_ricevuto, :have_received
|
145
151
|
RSpec::Matchers.alias_matcher :cambi, :change
|
146
152
|
RSpec::Matchers.alias_matcher :di, :by
|
153
|
+
RSpec::Matchers.alias_matcher :includa, :include
|
147
154
|
|
148
155
|
config.alias_example_to :esso
|
149
156
|
config.alias_example_to :essa
|
@@ -152,4 +159,4 @@ RSpec.configure do |config|
|
|
152
159
|
alias :verifica :expect
|
153
160
|
alias :consenti :allow
|
154
161
|
end
|
155
|
-
end
|
162
|
+
end
|
@@ -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.
|
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
|
@@ -13,6 +13,7 @@ class Time
|
|
13
13
|
alias :in_stringa :to_s
|
14
14
|
alias :in_numero :to_i
|
15
15
|
alias :formatta :strftime
|
16
|
+
alias :localizza :localtime
|
16
17
|
|
17
18
|
def in_data
|
18
19
|
self.to_date
|
@@ -22,6 +23,14 @@ class Time
|
|
22
23
|
self
|
23
24
|
end
|
24
25
|
|
26
|
+
def formatta_locale(format)
|
27
|
+
if defined? I18n
|
28
|
+
I18n.l self, format: format
|
29
|
+
else
|
30
|
+
strftime format
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
25
34
|
alias :original_equality :==
|
26
35
|
def ==(other)
|
27
36
|
return (self.to_date == other) if other.is_a? Date
|
@@ -35,4 +44,4 @@ class Time
|
|
35
44
|
end
|
36
45
|
end
|
37
46
|
|
38
|
-
Tempo = Time
|
47
|
+
Tempo = Time
|
data/lib/italian/ruby/version.rb
CHANGED
data/vim/syntax/ir.vim
CHANGED
@@ -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.
|
4
|
+
version: 0.9.9
|
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-
|
11
|
+
date: 2020-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|