excelinator_ruby3 1.3.2 → 1.3.3

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: 6d9637000deffe5f7b7b34a3540385519c9577a1d4fabccab2633ce50d179c21
4
- data.tar.gz: 5c3efdbe98b66c1b9aa0d9110a11d8f68fd044607babd3d6c8049d804c182509
3
+ metadata.gz: 88eb0a4bb8013d07498efb18c2354beb6f99a84fb3f442da22814ef3530b7be8
4
+ data.tar.gz: 490977298721f81e1244ce88493ee78b59268858cee45c45d4f45604635d0865
5
5
  SHA512:
6
- metadata.gz: 9fb7c5c7bff988745b902f2e3f4628790b301c2b1bc8d3db2eaa3dbb39bd87065d5e10cbb8e9268f9deca2cffe4caa3173263ccdbbadf4cc87d5f4e108cdd916
7
- data.tar.gz: 0041025f34662cc4105b498a8dbe4f37cf4deeb14e48e39da7dba944984df870b82e9190a2e60ad85110222594b91c388cb4ed1f619b1c3289aeea18e07cd141
6
+ metadata.gz: 53e73baa8e3769b826faf0d897de690d05ec61c569643e77f6dda60bb7bfdedb374c3be66db9103f18e4cf03ed9465988768f627958e2980d83376e47da40b51
7
+ data.tar.gz: bc32ff192ec9446f9b8c3a712387cc0a1c37942f6228b9902438d3430bcbeafeb5dae502f6aaac93b5384d1423c7fadc9e9b62b66d83b5548793d5532747cdd4
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Excelinator
3
+ module ExcelinatorRuby3
4
4
  # register as rails module
5
5
  module Rails
6
6
  def self.setup
7
7
  require 'action_controller'
8
8
 
9
- Mime::Type.register Excelinator::MIME_TYPE, :xls
9
+ Mime::Type.register ExcelinatorRuby3::MIME_TYPE, :xls
10
10
 
11
11
  add_renderer if ::Rails::VERSION::MAJOR >= 3
12
12
  end
@@ -21,8 +21,8 @@ module Excelinator
21
21
  module ACMixin
22
22
  def send_xls_data(filename, options = {})
23
23
  content = render_to_string(options)
24
- xls_content = Excelinator.convert_content(content)
25
- send_data(xls_content, filename:, type: Excelinator::MIME_TYPE, disposition: 'inline')
24
+ xls_content = ExcelinatorRuby3.convert_content(content)
25
+ send_data(xls_content, filename:, type: ExcelinatorRuby3::MIME_TYPE, disposition: 'inline')
26
26
  end
27
27
  end
28
28
  end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module ExcelinatorRuby3
4
+ VERSION = '1.3.3'
5
+ end
@@ -1,11 +1,11 @@
1
- # Excelinator module
2
- module Excelinator
1
+ # ExcelinatorRuby3 module
2
+ module ExcelinatorRuby3
3
3
  MIME_TYPE = 'application/vnd.ms-excel'
4
4
 
5
5
  # Detects HTML table content (with a rather stupid regex: /<table/) and re-uses it, or attempts to convert from
6
6
  # CSV if HTML not detected.
7
7
  def self.convert_content(content)
8
- content =~ /<table/ ? Excelinator.html_as_xls(content) : Excelinator.csv_to_xls(content)
8
+ content =~ /<table/ ? ExcelinatorRuby3.html_as_xls(content) : ExcelinatorRuby3.csv_to_xls(content)
9
9
  end
10
10
 
11
11
  # rubocop:disable Metrics/MethodLength
@@ -1,8 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'excelinator/xls'
4
- require 'excelinator/rails'
5
- require 'excelinator/version'
3
+ require 'excelinator_ruby3/xls'
4
+ require 'excelinator_ruby3/rails'
5
+ require 'excelinator_ruby3/version'
6
6
  require 'spreadsheet'
7
7
 
8
8
  def old_ruby?
@@ -16,10 +16,10 @@ else
16
16
  end
17
17
 
18
18
  if defined?(Rails)
19
- Excelinator::Rails.setup
19
+ ExcelinatorRuby3::Rails.setup
20
20
  module ActionController
21
21
  class Base
22
- include Excelinator::Rails::ACMixin
22
+ include ExcelinatorRuby3::Rails::ACMixin
23
23
  end
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: excelinator_ruby3
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 1.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ChrKahl
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-09-11 00:00:00.000000000 Z
13
+ date: 2023-09-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: spreadsheet
@@ -64,11 +64,11 @@ extensions: []
64
64
  extra_rdoc_files: []
65
65
  files:
66
66
  - README.md
67
- - lib/excelinator.rb
68
- - lib/excelinator/rails.rb
69
- - lib/excelinator/version.rb
70
- - lib/excelinator/xls.rb
71
- homepage: https://github.com/chrkahl/excelinator
67
+ - lib/excelinator_ruby3.rb
68
+ - lib/excelinator_ruby3/rails.rb
69
+ - lib/excelinator_ruby3/version.rb
70
+ - lib/excelinator_ruby3/xls.rb
71
+ homepage: https://github.com/chrkahl/excelinator_ruby3
72
72
  licenses: []
73
73
  metadata: {}
74
74
  post_install_message:
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Excelinator
4
- VERSION = '1.3.2'
5
- end