eitil 1.1.29 → 1.1.33

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d6e9524411219e8780f014709c6b2d0c37b5c906896d1baaefaab9b75221ef12
4
- data.tar.gz: dea5f20434c5bdbec175482d3e527958af0b92076d985cd21c18e47d16936818
3
+ metadata.gz: 36321fc1d4a6ef1bc8427a54f987b7c659ca6c2d129a4b4ffa32d65292c6e55b
4
+ data.tar.gz: 1096c2f9c22382044a248d118680d2882df5886b1d8a58a374bd840d01070fd8
5
5
  SHA512:
6
- metadata.gz: d2ef3c1d7ae8e689969a7e34f63ca6824c0bc29d2879638ae23b0ed9278fe46e00d4421279fd2bd644015632bcf42459ef70383e1e9ae70ba0f69e5555317aaf
7
- data.tar.gz: f1871f96ae4a1d3e8be5bacd19282d0a343b0a1168344d61497bd0d1f7b5ea5671fa8b036ad26918b5a1d16f46d302d9ef8023ebfdcf6b4f302f606d7f88d7d7
6
+ metadata.gz: 33b6da41a3963ef05207d6bfb6937f3ec28cbaa9a842d3cc7b22a4c3bcafe1b0abdaddb0d291fb121bc033b58b35ce455c101eb086a11ce7266c9a6e058f1e9f
7
+ data.tar.gz: 6e7438d46132b2efa040221a02129ba516945a1f2256f7235ad910847ac0c724841f82a41e7dfb2b40753d28bee54c6cc9b44040640131784cd9ac3431f36aec
data/eitil_core/README.md CHANGED
@@ -190,15 +190,6 @@ slice_hashes(*keys)
190
190
  # => [{"a"=>1, "b"=>2}, {"a"=>1, "b"=>2}]
191
191
  ```
192
192
 
193
- ```ruby
194
- # require "eitil_core/array/to_a"
195
-
196
- "hello world".to_a # => ["hello_world"]
197
- 69.to_a # => [69]
198
- true.to_a # => [true]
199
- # implements the .to_a method for classes: String, Numeric, TrueClass and FalseClass
200
- ```
201
-
202
193
  ## Concerns
203
194
 
204
195
  ```ruby
@@ -12,7 +12,7 @@ module EitilCore
12
12
 
13
13
  def find_by_like(_hash)
14
14
  column, like = _hash.first
15
- find_by("LOWER(#{column}) LIKE ?", "%#{like.downcase}%")
15
+ find_by("REPLACE(LOWER(#{column}), ' ', '') LIKE ?", "%#{like.downcase.delete(' ')}%")
16
16
  end
17
17
 
18
18
  end
@@ -12,7 +12,7 @@ module EitilCore
12
12
 
13
13
  def where_like(_hash)
14
14
  column, like = _hash.first
15
- where("LOWER(#{column}) LIKE ?", "%#{like.downcase}%")
15
+ where("REPLACE(LOWER(#{column}), ' ', '') LIKE ?", "%#{like.downcase.delete(' ')}%")
16
16
  end
17
17
 
18
18
  end
@@ -1,3 +1,2 @@
1
1
 
2
- require "eitil_core/array/slice_hashes"
3
- require "eitil_core/array/to_a"
2
+ require "eitil_core/array/slice_hashes"
@@ -94,3 +94,56 @@ class Array
94
94
  end
95
95
 
96
96
  end
97
+
98
+
99
+ class Date
100
+
101
+ def is_nan?
102
+ true
103
+ end
104
+
105
+ def is_num?
106
+ false
107
+ end
108
+
109
+ end
110
+
111
+
112
+ class DateTime
113
+
114
+ def is_nan?
115
+ true
116
+ end
117
+
118
+ def is_num?
119
+ false
120
+ end
121
+
122
+ end
123
+
124
+
125
+ class Time
126
+
127
+ def is_nan?
128
+ true
129
+ end
130
+
131
+ def is_num?
132
+ false
133
+ end
134
+
135
+ end
136
+
137
+
138
+ class ActiveSupport::TimeWithZone
139
+
140
+ def is_nan?
141
+ true
142
+ end
143
+
144
+ def is_num?
145
+ false
146
+ end
147
+
148
+ end
149
+
@@ -13,8 +13,12 @@ module EitilIntegrate
13
13
  attr_accessor :book, :sheet, :x, :y, :start_date, :end_date, :date_range, :write_log
14
14
 
15
15
  def initialize(attributes={})
16
- all_kwargs_to_ivars binding, :attributes
16
+
17
+ @start_date ||= attributes[:start_date]
18
+ @end_date ||= attributes[:end_date]
19
+
17
20
  set_ivars :start_date, :end_date, :date_range
21
+
18
22
  @book = ::RubyXL::Workbook.new
19
23
  @sheet = @book.worksheets[0]
20
24
  @x ||= 0
data/lib/eitil/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Eitil
2
2
 
3
- VERSION = '1.1.29'
3
+ VERSION = '1.1.33'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eitil
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.29
4
+ version: 1.1.33
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurriaan Schrofer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-13 00:00:00.000000000 Z
11
+ date: 2021-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -104,7 +104,6 @@ files:
104
104
  - eitil_core/lib/eitil_core/argument_helpers/args_to_ivars_bang.rb
105
105
  - eitil_core/lib/eitil_core/array.rb
106
106
  - eitil_core/lib/eitil_core/array/slice_hashes.rb
107
- - eitil_core/lib/eitil_core/array/to_a.rb
108
107
  - eitil_core/lib/eitil_core/concerns.rb
109
108
  - eitil_core/lib/eitil_core/concerns/include_concerns_of.rb
110
109
  - eitil_core/lib/eitil_core/datetime.rb
@@ -1,34 +0,0 @@
1
-
2
- # require "eitil_core/array/to_a"
3
-
4
- class String
5
-
6
- def to_a
7
- [self]
8
- end
9
-
10
- end
11
-
12
- class Numeric
13
-
14
- def to_a
15
- [self]
16
- end
17
-
18
- end
19
-
20
- class TrueClass
21
-
22
- def to_a
23
- [self]
24
- end
25
-
26
- end
27
-
28
- class FalseClass
29
-
30
- def to_a
31
- [self]
32
- end
33
-
34
- end