lite-report 1.0.3 → 1.0.4

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: 79b1b74b23c39fc04c8a0ae2b4de4a23d237262420d4386bfa9da3e063d42f4f
4
- data.tar.gz: 177f4b2b71313883bbbe6e659d622ff1178561f0fe41d72093001f7390690e75
3
+ metadata.gz: 751bfcd860c6a91a39bcfec29d875acc524bb005d429e9876506c5da3afe5c16
4
+ data.tar.gz: e620777d05e5bb14b2de4e308cb49c25f50d29402b8251cf15a3c9ede9d6e715
5
5
  SHA512:
6
- metadata.gz: 86f46dfca7c4376a87838eecb132c027dba055cb170b7dd4fa41dd9218a17bd3956f45df7d4efcf196dfec4e2ef4d258128cc771093265a13304215c5d13d8f7
7
- data.tar.gz: ceefdf533d0f618753edb99a9c01f07a0f5cc550e9928b9a75c6f54c4c03d27f90f5e0d12c404af1c41ad4de4a031b58b3d4b6d2dbab5de5eb1027e0497b213c
6
+ metadata.gz: 33ccfc5af0ea1ce97cb59ee8d23c7fc66a17820af8982538855d6c7ebba1a59dcfed8141e7354fbc7b9374b0b574c6f436575d7394c89a82029b0c75159d18df
7
+ data.tar.gz: 49cedd7e7c4de7c7192dfee81d4dd965ea4aacda2ab96359ff258c8b0d8786e87d2600940a897512a4c12e633522e176eb3a24d9ccf81651ca784970d889285b
@@ -5,8 +5,6 @@ AllCops:
5
5
  TargetRubyVersion: 2.6
6
6
  DisplayCopNames: true
7
7
  DisplayStyleGuide: true
8
- LineLength:
9
- Max: 100
10
8
  Layout/EmptyLinesAroundBlockBody:
11
9
  Exclude:
12
10
  - 'spec/**/**/*'
@@ -14,6 +12,8 @@ Layout/EmptyLinesAroundClassBody:
14
12
  EnforcedStyle: empty_lines_except_namespace
15
13
  Layout/EmptyLinesAroundModuleBody:
16
14
  EnforcedStyle: empty_lines_except_namespace
15
+ Layout/LineLength:
16
+ Max: 100
17
17
  Metrics/BlockLength:
18
18
  Exclude:
19
19
  - 'spec/**/**/*'
@@ -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.4] - 2020-02-11
10
+ ### Changed
11
+ - Fix record instance not generating
12
+
9
13
  ## [1.0.3] - 2019-08-24
10
14
  ### Changed
11
15
  - Fix broken configuration option
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lite-report (1.0.3)
4
+ lite-report (1.0.4)
5
5
  activerecord
6
6
  activerecord-import
7
7
  deep_pluck
@@ -9,132 +9,134 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actionpack (6.0.0)
13
- actionview (= 6.0.0)
14
- activesupport (= 6.0.0)
15
- rack (~> 2.0)
12
+ actionpack (6.0.2.1)
13
+ actionview (= 6.0.2.1)
14
+ activesupport (= 6.0.2.1)
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.0)
20
- activesupport (= 6.0.0)
19
+ actionview (6.0.2.1)
20
+ activesupport (= 6.0.2.1)
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.0)
26
- activesupport (= 6.0.0)
27
- activerecord (6.0.0)
28
- activemodel (= 6.0.0)
29
- activesupport (= 6.0.0)
30
- activerecord-import (1.0.2)
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)
31
31
  activerecord (>= 3.2)
32
- activesupport (6.0.0)
32
+ activesupport (6.0.2.1)
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.1, >= 2.1.8)
37
+ zeitwerk (~> 2.2)
38
38
  ast (2.4.0)
39
- builder (3.2.3)
39
+ builder (3.2.4)
40
40
  colorize (0.8.1)
41
- concurrent-ruby (1.1.5)
42
- crass (1.0.4)
43
- database_cleaner (1.7.0)
44
- deep_pluck (1.1.1)
41
+ concurrent-ruby (1.1.6)
42
+ crass (1.0.6)
43
+ database_cleaner (1.8.2)
44
+ deep_pluck (1.1.4)
45
45
  activerecord (>= 3)
46
46
  pluck_all (>= 1.2.3)
47
+ rails_compatibility (>= 0.0.1)
47
48
  diff-lcs (1.3)
48
- erubi (1.8.0)
49
- fasterer (0.6.0)
49
+ erubi (1.9.0)
50
+ fasterer (0.8.2)
50
51
  colorize (~> 0.7)
51
- ruby_parser (>= 3.13.0)
52
+ ruby_parser (>= 3.14.1)
52
53
  generator_spec (0.9.4)
53
54
  activesupport (>= 3.0.0)
54
55
  railties (>= 3.0.0)
55
- i18n (1.6.0)
56
+ i18n (1.8.2)
56
57
  concurrent-ruby (~> 1.0)
57
- jaro_winkler (1.5.3)
58
- loofah (2.2.3)
58
+ jaro_winkler (1.5.4)
59
+ loofah (2.4.0)
59
60
  crass (~> 1.0.2)
60
61
  nokogiri (>= 1.5.9)
61
62
  method_source (0.9.2)
62
63
  mini_portile2 (2.4.0)
63
- minitest (5.11.3)
64
- nokogiri (1.10.4)
64
+ minitest (5.14.0)
65
+ nokogiri (1.10.8)
65
66
  mini_portile2 (~> 2.4.0)
66
- parallel (1.17.0)
67
- parser (2.6.3.0)
67
+ parallel (1.19.1)
68
+ parser (2.7.0.2)
68
69
  ast (~> 2.4.0)
69
70
  pluck_all (2.0.4)
70
71
  activesupport (>= 3.0.0)
71
- polyamorous (2.3.0)
72
- activerecord (>= 5.0)
73
- rack (2.0.7)
72
+ polyamorous (2.3.2)
73
+ activerecord (>= 5.2.1)
74
+ rack (2.2.2)
74
75
  rack-test (1.1.0)
75
76
  rack (>= 1.0, < 3)
76
77
  rails-dom-testing (2.0.3)
77
78
  activesupport (>= 4.2.0)
78
79
  nokogiri (>= 1.6)
79
- rails-html-sanitizer (1.2.0)
80
- loofah (~> 2.2, >= 2.2.2)
81
- railties (6.0.0)
82
- actionpack (= 6.0.0)
83
- activesupport (= 6.0.0)
80
+ rails-html-sanitizer (1.3.0)
81
+ loofah (~> 2.3)
82
+ rails_compatibility (0.0.2)
83
+ activerecord (>= 3)
84
+ railties (6.0.2.1)
85
+ actionpack (= 6.0.2.1)
86
+ activesupport (= 6.0.2.1)
84
87
  method_source
85
88
  rake (>= 0.8.7)
86
89
  thor (>= 0.20.3, < 2.0)
87
90
  rainbow (3.0.0)
88
- rake (12.3.3)
89
- ransack (2.3.0)
90
- actionpack (>= 5.0)
91
- activerecord (>= 5.0)
92
- activesupport (>= 5.0)
91
+ rake (13.0.1)
92
+ ransack (2.3.2)
93
+ activerecord (>= 5.2.1)
94
+ activesupport (>= 5.2.1)
93
95
  i18n
94
- polyamorous (= 2.3.0)
95
- rspec (3.8.0)
96
- rspec-core (~> 3.8.0)
97
- rspec-expectations (~> 3.8.0)
98
- rspec-mocks (~> 3.8.0)
99
- rspec-core (3.8.2)
100
- rspec-support (~> 3.8.0)
101
- rspec-expectations (3.8.4)
96
+ polyamorous (= 2.3.2)
97
+ rspec (3.9.0)
98
+ rspec-core (~> 3.9.0)
99
+ rspec-expectations (~> 3.9.0)
100
+ rspec-mocks (~> 3.9.0)
101
+ rspec-core (3.9.1)
102
+ rspec-support (~> 3.9.1)
103
+ rspec-expectations (3.9.0)
102
104
  diff-lcs (>= 1.2.0, < 2.0)
103
- rspec-support (~> 3.8.0)
104
- rspec-mocks (3.8.1)
105
+ rspec-support (~> 3.9.0)
106
+ rspec-mocks (3.9.1)
105
107
  diff-lcs (>= 1.2.0, < 2.0)
106
- rspec-support (~> 3.8.0)
107
- rspec-rails (3.8.2)
108
+ rspec-support (~> 3.9.0)
109
+ rspec-rails (3.9.0)
108
110
  actionpack (>= 3.0)
109
111
  activesupport (>= 3.0)
110
112
  railties (>= 3.0)
111
- rspec-core (~> 3.8.0)
112
- rspec-expectations (~> 3.8.0)
113
- rspec-mocks (~> 3.8.0)
114
- rspec-support (~> 3.8.0)
115
- rspec-support (3.8.2)
116
- rubocop (0.74.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)
117
119
  jaro_winkler (~> 1.5.1)
118
120
  parallel (~> 1.10)
119
- parser (>= 2.6)
121
+ parser (>= 2.7.0.1)
120
122
  rainbow (>= 2.2.2, < 4.0)
121
123
  ruby-progressbar (~> 1.7)
122
124
  unicode-display_width (>= 1.4.0, < 1.7)
123
- rubocop-performance (1.4.1)
125
+ rubocop-performance (1.5.2)
124
126
  rubocop (>= 0.71.0)
125
- rubocop-rspec (1.35.0)
126
- rubocop (>= 0.60.0)
127
+ rubocop-rspec (1.38.0)
128
+ rubocop (>= 0.68.1)
127
129
  ruby-progressbar (1.10.1)
128
- ruby_parser (3.13.1)
130
+ ruby_parser (3.14.2)
129
131
  sexp_processor (~> 4.9)
130
- sexp_processor (4.12.1)
131
- sqlite3 (1.4.1)
132
- thor (0.20.3)
132
+ sexp_processor (4.14.1)
133
+ sqlite3 (1.4.2)
134
+ thor (1.0.1)
133
135
  thread_safe (0.3.6)
134
- tzinfo (1.2.5)
136
+ tzinfo (1.2.6)
135
137
  thread_safe (~> 0.1)
136
- unicode-display_width (1.6.0)
137
- zeitwerk (2.1.9)
138
+ unicode-display_width (1.6.1)
139
+ zeitwerk (2.2.2)
138
140
 
139
141
  PLATFORMS
140
142
  ruby
@@ -155,4 +157,4 @@ DEPENDENCIES
155
157
  sqlite3
156
158
 
157
159
  BUNDLED WITH
158
- 2.0.1
160
+ 2.0.2
@@ -10,7 +10,7 @@ module Lite
10
10
  def class_columns(data)
11
11
  return data.klass.column_names if ransack_class?(data)
12
12
 
13
- data.column_names
13
+ data.try(:column_names) || data.class.column_names
14
14
  end
15
15
 
16
16
  def klass
@@ -43,6 +43,7 @@ class Lite::Report::Record < Lite::Report::Base
43
43
  columns = class_columns(@data)
44
44
  @data = @data.result if ransack_class?(@data)
45
45
  @data = @data.deep_pluck(*columns)
46
+ @data = [@data] unless @data.is_a?(Array)
46
47
  end
47
48
 
48
49
  def generate_export!
@@ -3,7 +3,7 @@
3
3
  module Lite
4
4
  module Report
5
5
 
6
- VERSION ||= '1.0.3'
6
+ VERSION ||= '1.0.4'
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.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Juan Gomez
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-08-24 00:00:00.000000000 Z
11
+ date: 2020-02-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -279,7 +279,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
279
  - !ruby/object:Gem::Version
280
280
  version: '0'
281
281
  requirements: []
282
- rubygems_version: 3.0.4
282
+ rubygems_version: 3.1.2
283
283
  signing_key:
284
284
  specification_version: 4
285
285
  summary: Import and export Ruby and Rails objects to flat files and vice versa