xlsxtream_rails 0.2.0 → 0.3.0

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: 2356d39bc93f7932ff1ebcf31f4e79d0feb38c31521227c9524ac745ccaaff3a
4
- data.tar.gz: e3cacfb6c7bcf4cb76ba7bcb1469222631f36e1c8343ae717f8420eb76bc4468
3
+ metadata.gz: abbdd2ed40b9778899f75dcf87ded14f9a1f1f8b0d9d1644123ef93e4bbc6bb3
4
+ data.tar.gz: a91d3281e92d57977011198a4f19a656fb17f22fd0569df6d6d14868c63efe49
5
5
  SHA512:
6
- metadata.gz: 317eb0b72e5c04d913ba5054450e90b4de0ff27067276740ece5f1b4af24f5f5c55df9b4984d25f92da1839f30328cd1379a3bd6941a9faad80e96c603a20fb1
7
- data.tar.gz: adc28f4c75706991af808e076d3f5049d67a8e1b3c688e8788d5ed32b6b7ff418a6b08ac7b449eaed0c481fa5da1f8101ece6d23585158c7c360557de07b6085
6
+ metadata.gz: 2e65e4414b26b6147e3a1b15d0a9ecde53c858ace2a1fa47063e91c346a278fb90cac60b8aeb926441c66afa13208fe328836578546dfd516f432c559eccedbe
7
+ data.tar.gz: 5722f6a0e4ca69c813bbe872f9fc7be16860eef3b17399d1690cb821b1ea090d1fd54f429f212e508c9584fa735e7b943be1be24ccd08515af859bf07cb997ad
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # XlsxtreamRails
2
- Xlsx stream download for rails with template.
2
+ Xlsx stream download for rails.
3
3
 
4
4
  ## Installation
5
5
  Add this line to your application's Gemfile:
@@ -61,18 +61,6 @@ class Post < ApplicationRecord
61
61
  end
62
62
  ```
63
63
 
64
- ## View
65
-
66
- If you want to render with template, you can create the template with the .xlsx.xrb extension (index.xlsx.xrb for example)
67
-
68
- ```ruby
69
- xlsx.write_worksheet do |sheet|
70
- @posts.find_each do |post|
71
- sheet.add_row [post.id, post.title]
72
- end
73
- end
74
- ```
75
-
76
64
  ## This gem is inspired by the following
77
65
 
78
66
  [spreadsheet_architect](https://github.com/westonganger/spreadsheet_architect)
@@ -1,11 +1,6 @@
1
1
  module XlsxtreamRails
2
2
  class Railtie < ::Rails::Railtie
3
3
  initializer "xlsxtream_rails.initialization" do
4
- ActiveSupport.on_load(:action_view) do
5
- require "xlsxtream_rails/template_handler"
6
- ActionView::Template.register_template_handler :xrb, ActionView::Template::Handlers::XrbBuilder.new
7
- end
8
-
9
4
  ActiveSupport.on_load(:action_controller) do
10
5
  require "xlsxtream_rails/action_controller"
11
6
  end
@@ -1,3 +1,3 @@
1
1
  module XlsxtreamRails
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xlsxtream_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - doabit
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 2.4.0
41
- description: Xlsx stream download for rails with template.
41
+ description: Xlsx stream download for rails.
42
42
  email:
43
43
  - doinsist@gmail.com
44
44
  executables: []
@@ -52,7 +52,6 @@ files:
52
52
  - lib/xlsxtream_rails.rb
53
53
  - lib/xlsxtream_rails/action_controller.rb
54
54
  - lib/xlsxtream_rails/railtie.rb
55
- - lib/xlsxtream_rails/template_handler.rb
56
55
  - lib/xlsxtream_rails/utils.rb
57
56
  - lib/xlsxtream_rails/version.rb
58
57
  homepage: https://github.com/ruby-gems/xlsxtream_rails
@@ -80,5 +79,5 @@ requirements: []
80
79
  rubygems_version: 3.2.3
81
80
  signing_key:
82
81
  specification_version: 4
83
- summary: Xlsx stream download for rails with template.
82
+ summary: Xlsx stream download for rails.
84
83
  test_files: []
@@ -1,19 +0,0 @@
1
- require "action_view"
2
- require "stringio"
3
-
4
- module ActionView
5
- module Template::Handlers
6
- class XrbBuilder
7
- def default_format
8
- Mime[:xlsx].symbol
9
- end
10
-
11
- def call(template, source = nil)
12
- builder = StringIO.new
13
- builder << "# encoding: utf-8\n"
14
- builder << (source || template.source)
15
- builder.string
16
- end
17
- end
18
- end
19
- end