lite-report 1.0.4 → 1.0.5

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: 751bfcd860c6a91a39bcfec29d875acc524bb005d429e9876506c5da3afe5c16
4
- data.tar.gz: e620777d05e5bb14b2de4e308cb49c25f50d29402b8251cf15a3c9ede9d6e715
3
+ metadata.gz: e19a104989a720b33c1d0be498695c26352a0a607d8a2c89af66705958398ed1
4
+ data.tar.gz: 2df858892aff83bad0042f486e4d9501b7a7ef5886c9139b5496c0c9ac37af73
5
5
  SHA512:
6
- metadata.gz: 33ccfc5af0ea1ce97cb59ee8d23c7fc66a17820af8982538855d6c7ebba1a59dcfed8141e7354fbc7b9374b0b574c6f436575d7394c89a82029b0c75159d18df
7
- data.tar.gz: 49cedd7e7c4de7c7192dfee81d4dd965ea4aacda2ab96359ff258c8b0d8786e87d2600940a897512a4c12e633522e176eb3a24d9ccf81651ca784970d889285b
6
+ metadata.gz: 153acef279ba609c0b02f30b0651fb5c085231dbc22d713499ffd38b254d0881821060bbe02947eadf2f1f2b853ca002e998460bb918a4fccd9bc60484261a97
7
+ data.tar.gz: 6001668ff0e2751a674abaec2331ba43f9aec2eda280ac66b5c40c7f234fcb2f505c0ec1b4d7f9e72f2add92c1469aa6622bf959aee89f558e9596c1310ec227
@@ -2,9 +2,12 @@ require:
2
2
  - rubocop-performance
3
3
  - rubocop-rspec
4
4
  AllCops:
5
- TargetRubyVersion: 2.6
5
+ TargetRubyVersion: 2.7
6
+ NewCops: enable
6
7
  DisplayCopNames: true
7
8
  DisplayStyleGuide: true
9
+ Layout/EmptyLinesAroundAttributeAccessor:
10
+ Enabled: true
8
11
  Layout/EmptyLinesAroundBlockBody:
9
12
  Exclude:
10
13
  - 'spec/**/**/*'
@@ -14,6 +17,12 @@ Layout/EmptyLinesAroundModuleBody:
14
17
  EnforcedStyle: empty_lines_except_namespace
15
18
  Layout/LineLength:
16
19
  Max: 100
20
+ Layout/SpaceAroundMethodCallOperator:
21
+ Enabled: true
22
+ Lint/RaiseException:
23
+ Enabled: true
24
+ Lint/StructNewOverride:
25
+ Enabled: true
17
26
  Metrics/BlockLength:
18
27
  Exclude:
19
28
  - 'spec/**/**/*'
@@ -4,6 +4,7 @@ cache: bundler
4
4
  rvm:
5
5
  - 2.5
6
6
  - 2.6
7
+ - 2.7
7
8
  - ruby-head
8
9
  matrix:
9
10
  fast_finish: true
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.0.5] - 2020-07-03
10
+ ### Added
11
+ - Added Ruby 2.7 support
12
+
9
13
  ## [1.0.4] - 2020-02-11
10
14
  ### Changed
11
15
  - Fix record instance not generating
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-report (1.0.4)
4
+ lite-report (1.0.5)
5
5
  activerecord
6
6
  activerecord-import
7
7
  deep_pluck
@@ -9,69 +9,68 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (6.0.2.1)
13
- actionview (= 6.0.2.1)
14
- activesupport (= 6.0.2.1)
12
+ actionpack (6.0.3.2)
13
+ actionview (= 6.0.3.2)
14
+ activesupport (= 6.0.3.2)
15
15
  rack (~> 2.0, >= 2.0.8)
16
16
  rack-test (>= 0.6.3)
17
17
  rails-dom-testing (~> 2.0)
18
18
  rails-html-sanitizer (~> 1.0, >= 1.2.0)
19
- actionview (6.0.2.1)
20
- activesupport (= 6.0.2.1)
19
+ actionview (6.0.3.2)
20
+ activesupport (= 6.0.3.2)
21
21
  builder (~> 3.1)
22
22
  erubi (~> 1.4)
23
23
  rails-dom-testing (~> 2.0)
24
24
  rails-html-sanitizer (~> 1.1, >= 1.2.0)
25
- activemodel (6.0.2.1)
26
- activesupport (= 6.0.2.1)
27
- activerecord (6.0.2.1)
28
- activemodel (= 6.0.2.1)
29
- activesupport (= 6.0.2.1)
30
- activerecord-import (1.0.4)
25
+ activemodel (6.0.3.2)
26
+ activesupport (= 6.0.3.2)
27
+ activerecord (6.0.3.2)
28
+ activemodel (= 6.0.3.2)
29
+ activesupport (= 6.0.3.2)
30
+ activerecord-import (1.0.5)
31
31
  activerecord (>= 3.2)
32
- activesupport (6.0.2.1)
32
+ activesupport (6.0.3.2)
33
33
  concurrent-ruby (~> 1.0, >= 1.0.2)
34
34
  i18n (>= 0.7, < 2)
35
35
  minitest (~> 5.1)
36
36
  tzinfo (~> 1.1)
37
- zeitwerk (~> 2.2)
38
- ast (2.4.0)
37
+ zeitwerk (~> 2.2, >= 2.2.2)
38
+ ast (2.4.1)
39
39
  builder (3.2.4)
40
40
  colorize (0.8.1)
41
41
  concurrent-ruby (1.1.6)
42
42
  crass (1.0.6)
43
- database_cleaner (1.8.2)
43
+ database_cleaner (1.8.5)
44
44
  deep_pluck (1.1.4)
45
45
  activerecord (>= 3)
46
46
  pluck_all (>= 1.2.3)
47
47
  rails_compatibility (>= 0.0.1)
48
- diff-lcs (1.3)
48
+ diff-lcs (1.4.4)
49
49
  erubi (1.9.0)
50
- fasterer (0.8.2)
50
+ fasterer (0.8.3)
51
51
  colorize (~> 0.7)
52
52
  ruby_parser (>= 3.14.1)
53
53
  generator_spec (0.9.4)
54
54
  activesupport (>= 3.0.0)
55
55
  railties (>= 3.0.0)
56
- i18n (1.8.2)
56
+ i18n (1.8.3)
57
57
  concurrent-ruby (~> 1.0)
58
- jaro_winkler (1.5.4)
59
- loofah (2.4.0)
58
+ loofah (2.6.0)
60
59
  crass (~> 1.0.2)
61
60
  nokogiri (>= 1.5.9)
62
- method_source (0.9.2)
61
+ method_source (1.0.0)
63
62
  mini_portile2 (2.4.0)
64
- minitest (5.14.0)
65
- nokogiri (1.10.8)
63
+ minitest (5.14.1)
64
+ nokogiri (1.10.9)
66
65
  mini_portile2 (~> 2.4.0)
67
- parallel (1.19.1)
68
- parser (2.7.0.2)
69
- ast (~> 2.4.0)
66
+ parallel (1.19.2)
67
+ parser (2.7.1.4)
68
+ ast (~> 2.4.1)
70
69
  pluck_all (2.0.4)
71
70
  activesupport (>= 3.0.0)
72
71
  polyamorous (2.3.2)
73
72
  activerecord (>= 5.2.1)
74
- rack (2.2.2)
73
+ rack (2.2.3)
75
74
  rack-test (1.1.0)
76
75
  rack (>= 1.0, < 3)
77
76
  rails-dom-testing (2.0.3)
@@ -81,9 +80,9 @@ GEM
81
80
  loofah (~> 2.3)
82
81
  rails_compatibility (0.0.2)
83
82
  activerecord (>= 3)
84
- railties (6.0.2.1)
85
- actionpack (= 6.0.2.1)
86
- activesupport (= 6.0.2.1)
83
+ railties (6.0.3.2)
84
+ actionpack (= 6.0.3.2)
85
+ activesupport (= 6.0.3.2)
87
86
  method_source
88
87
  rake (>= 0.8.7)
89
88
  thor (>= 0.20.3, < 2.0)
@@ -94,49 +93,55 @@ GEM
94
93
  activesupport (>= 5.2.1)
95
94
  i18n
96
95
  polyamorous (= 2.3.2)
96
+ regexp_parser (1.7.1)
97
+ rexml (3.2.4)
97
98
  rspec (3.9.0)
98
99
  rspec-core (~> 3.9.0)
99
100
  rspec-expectations (~> 3.9.0)
100
101
  rspec-mocks (~> 3.9.0)
101
- rspec-core (3.9.1)
102
- rspec-support (~> 3.9.1)
103
- rspec-expectations (3.9.0)
102
+ rspec-core (3.9.2)
103
+ rspec-support (~> 3.9.3)
104
+ rspec-expectations (3.9.2)
104
105
  diff-lcs (>= 1.2.0, < 2.0)
105
106
  rspec-support (~> 3.9.0)
106
107
  rspec-mocks (3.9.1)
107
108
  diff-lcs (>= 1.2.0, < 2.0)
108
109
  rspec-support (~> 3.9.0)
109
- rspec-rails (3.9.0)
110
- actionpack (>= 3.0)
111
- activesupport (>= 3.0)
112
- railties (>= 3.0)
113
- rspec-core (~> 3.9.0)
114
- rspec-expectations (~> 3.9.0)
115
- rspec-mocks (~> 3.9.0)
116
- rspec-support (~> 3.9.0)
117
- rspec-support (3.9.2)
118
- rubocop (0.79.0)
119
- jaro_winkler (~> 1.5.1)
110
+ rspec-rails (4.0.1)
111
+ actionpack (>= 4.2)
112
+ activesupport (>= 4.2)
113
+ railties (>= 4.2)
114
+ rspec-core (~> 3.9)
115
+ rspec-expectations (~> 3.9)
116
+ rspec-mocks (~> 3.9)
117
+ rspec-support (~> 3.9)
118
+ rspec-support (3.9.3)
119
+ rubocop (0.86.0)
120
120
  parallel (~> 1.10)
121
121
  parser (>= 2.7.0.1)
122
122
  rainbow (>= 2.2.2, < 4.0)
123
+ regexp_parser (>= 1.7)
124
+ rexml
125
+ rubocop-ast (>= 0.0.3, < 1.0)
123
126
  ruby-progressbar (~> 1.7)
124
- unicode-display_width (>= 1.4.0, < 1.7)
125
- rubocop-performance (1.5.2)
127
+ unicode-display_width (>= 1.4.0, < 2.0)
128
+ rubocop-ast (0.1.0)
129
+ parser (>= 2.7.0.1)
130
+ rubocop-performance (1.6.1)
126
131
  rubocop (>= 0.71.0)
127
- rubocop-rspec (1.38.0)
132
+ rubocop-rspec (1.41.0)
128
133
  rubocop (>= 0.68.1)
129
134
  ruby-progressbar (1.10.1)
130
135
  ruby_parser (3.14.2)
131
136
  sexp_processor (~> 4.9)
132
- sexp_processor (4.14.1)
137
+ sexp_processor (4.15.0)
133
138
  sqlite3 (1.4.2)
134
139
  thor (1.0.1)
135
140
  thread_safe (0.3.6)
136
- tzinfo (1.2.6)
141
+ tzinfo (1.2.7)
137
142
  thread_safe (~> 0.1)
138
- unicode-display_width (1.6.1)
139
- zeitwerk (2.2.2)
143
+ unicode-display_width (1.7.0)
144
+ zeitwerk (2.3.1)
140
145
 
141
146
  PLATFORMS
142
147
  ruby
@@ -157,4 +162,4 @@ DEPENDENCIES
157
162
  sqlite3
158
163
 
159
164
  BUNDLED WITH
160
- 2.0.2
165
+ 2.1.4
@@ -7,7 +7,7 @@ class Lite::Report::Array < Lite::Report::Base
7
7
  end
8
8
 
9
9
  def import
10
- CSV.foreach(@data, @csv_options)
10
+ CSV.foreach(@data, **@csv_options)
11
11
  .with_object([]) do |row, array|
12
12
  row = convert_to_array!(row)
13
13
  array << process_import_row!(row)
@@ -8,7 +8,7 @@ class Lite::Report::Hash < Lite::Report::Base
8
8
  end
9
9
 
10
10
  def import
11
- CSV.foreach(@data, @csv_options)
11
+ CSV.foreach(@data, **@csv_options)
12
12
  .with_object([]) do |row, array|
13
13
  next if header_row?(row)
14
14
 
@@ -10,7 +10,14 @@ module Lite
10
10
  def encode(cell)
11
11
  return cell unless cell.is_a?(String)
12
12
 
13
- cell.tr('"', '').encode!(*@data_options[:encode])
13
+ cell = cell.tr('"', '')
14
+ return cell if @data_options[:encode].empty?
15
+
16
+ cell.encode!(
17
+ @data_options[:encode][0],
18
+ @data_options[:encode][1],
19
+ **@data_options[:encode][2]
20
+ )
14
21
  end
15
22
 
16
23
  def encode?(delete: false)
@@ -8,7 +8,7 @@ module Lite
8
8
  private
9
9
 
10
10
  def generate_export!
11
- CSV.generate(@csv_options) do |csv|
11
+ CSV.generate(**@csv_options) do |csv|
12
12
  @data.each do |row|
13
13
  csv << process_export_row!(row)
14
14
  end
@@ -33,7 +33,7 @@ module Lite
33
33
 
34
34
  @data.each do |row|
35
35
  row = process_export_row!(row)
36
- csv << CSV.generate_line(row, @csv_options)
36
+ csv << CSV.generate_line(row, **@csv_options)
37
37
  end
38
38
  end
39
39
  end
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Report
5
5
 
6
- VERSION ||= '1.0.4'
6
+ VERSION ||= '1.0.5'
7
7
 
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lite-report
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-12 00:00:00.000000000 Z
11
+ date: 2020-07-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -220,7 +220,7 @@ dependencies:
220
220
  - - ">="
221
221
  - !ruby/object:Gem::Version
222
222
  version: '0'
223
- description:
223
+ description:
224
224
  email:
225
225
  - j.gomez@drexed.com
226
226
  executables: []
@@ -264,7 +264,7 @@ homepage: http://drexed.github.io/lite-report
264
264
  licenses:
265
265
  - MIT
266
266
  metadata: {}
267
- post_install_message:
267
+ post_install_message:
268
268
  rdoc_options: []
269
269
  require_paths:
270
270
  - lib
@@ -279,8 +279,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
279
  - !ruby/object:Gem::Version
280
280
  version: '0'
281
281
  requirements: []
282
- rubygems_version: 3.1.2
283
- signing_key:
282
+ rubygems_version: 3.1.4
283
+ signing_key:
284
284
  specification_version: 4
285
285
  summary: Import and export Ruby and Rails objects to flat files and vice versa
286
286
  test_files: []