excel_rails 0.3.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/VERSION +1 -1
  3. data/excel_rails.gemspec +12 -20
  4. data/lib/excel_rails.rb +4 -3
  5. metadata +20 -42
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 568cec8e8c5db610cafe6f3d205692c46fd6ba08c834e190f9b684264182aab2
4
+ data.tar.gz: 9a375e775abd0ce1aa181bf0aa87133e10b29ce2002a49429613851cf45f5164
5
+ SHA512:
6
+ metadata.gz: ccf43ae13be050b070bd8da40628b207d11d4bede261e85c1a0d68af8ed6d7b6f53625a71f227363bea3ca62200b473057a4ee6b356147ee388a56e790c37209
7
+ data.tar.gz: 68c79d0c9b0e1f1b51384a8a6ed090b3399a8d2e71605146b7eefd6648dd2c22fc6e47590655f51c4b4c6de6d6d1727b49454b2631385d39aa7a618ccfc0559c
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.4.1
data/excel_rails.gemspec CHANGED
@@ -2,16 +2,18 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: excel_rails 0.4.1 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
- s.name = "excel_rails"
8
- s.version = "0.3.0"
8
+ s.name = "excel_rails".freeze
9
+ s.version = "0.4.1"
9
10
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Aditya Sanghi"]
12
- s.date = "2012-01-27"
13
- s.description = "Allows you to program spreadsheets using .rxls views"
14
- s.email = "asanghi@me.com"
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib".freeze]
13
+ s.authors = ["Aditya Sanghi".freeze]
14
+ s.date = "2023-03-01"
15
+ s.description = "Allows you to program spreadsheets using .rxls views".freeze
16
+ s.email = "asanghi@me.com".freeze
15
17
  s.extra_rdoc_files = [
16
18
  "LICENSE",
17
19
  "README"
@@ -29,18 +31,8 @@ Gem::Specification.new do |s|
29
31
  "test/helper.rb",
30
32
  "test/test_excel_rails.rb"
31
33
  ]
32
- s.homepage = "http://github.com/asanghi/excel_rails"
33
- s.require_paths = ["lib"]
34
- s.rubygems_version = "1.8.11"
35
- s.summary = "Hook rxls to generate Excel documents in Rails 3"
36
-
37
- if s.respond_to? :specification_version then
38
- s.specification_version = 3
39
-
40
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
41
- else
42
- end
43
- else
44
- end
34
+ s.homepage = "http://github.com/asanghi/excel_rails".freeze
35
+ s.rubygems_version = "3.0.3.1".freeze
36
+ s.summary = "Hook rxls to generate Excel documents in Rails 3".freeze
45
37
  end
46
38
 
data/lib/excel_rails.rb CHANGED
@@ -18,7 +18,7 @@ module Spreadsheet
18
18
  def disposition(download, filename)
19
19
  download = true if (filename && download == nil)
20
20
  disposition = download ? "attachment;" : "inline;"
21
- disposition += " filename=#{filename}" if filename
21
+ disposition += " filename=\"#{filename}\"" if filename
22
22
  headers["Content-Disposition"] = disposition
23
23
  end
24
24
  end
@@ -26,8 +26,9 @@ module Spreadsheet
26
26
  class TemplateHandler
27
27
  class_attribute :default_format
28
28
  self.default_format = :xls
29
- def self.call(template)
30
- "sio = StringIO.new; #{template.source.strip}.write(sio); sio.string"
29
+ def self.call(template, source = nil)
30
+ text = source || template.source
31
+ "sio = StringIO.new; #{text.strip}.write(sio); sio.string"
31
32
  end
32
33
  end
33
34
  end
metadata CHANGED
@@ -1,34 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: excel_rails
3
- version: !ruby/object:Gem::Version
4
- hash: 19
5
- prerelease:
6
- segments:
7
- - 0
8
- - 3
9
- - 0
10
- version: 0.3.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.1
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Aditya Sanghi
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2012-01-27 00:00:00 Z
11
+ date: 2023-03-01 00:00:00.000000000 Z
19
12
  dependencies: []
20
-
21
13
  description: Allows you to program spreadsheets using .rxls views
22
14
  email: asanghi@me.com
23
15
  executables: []
24
-
25
16
  extensions: []
26
-
27
- extra_rdoc_files:
17
+ extra_rdoc_files:
28
18
  - LICENSE
29
19
  - README
30
- files:
31
- - .document
20
+ files:
21
+ - ".document"
32
22
  - LICENSE
33
23
  - README
34
24
  - Rakefile
@@ -41,36 +31,24 @@ files:
41
31
  - test/test_excel_rails.rb
42
32
  homepage: http://github.com/asanghi/excel_rails
43
33
  licenses: []
44
-
34
+ metadata: {}
45
35
  post_install_message:
46
36
  rdoc_options: []
47
-
48
- require_paths:
37
+ require_paths:
49
38
  - lib
50
- required_ruby_version: !ruby/object:Gem::Requirement
51
- none: false
52
- requirements:
39
+ required_ruby_version: !ruby/object:Gem::Requirement
40
+ requirements:
53
41
  - - ">="
54
- - !ruby/object:Gem::Version
55
- hash: 3
56
- segments:
57
- - 0
58
- version: "0"
59
- required_rubygems_version: !ruby/object:Gem::Requirement
60
- none: false
61
- requirements:
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ required_rubygems_version: !ruby/object:Gem::Requirement
45
+ requirements:
62
46
  - - ">="
63
- - !ruby/object:Gem::Version
64
- hash: 3
65
- segments:
66
- - 0
67
- version: "0"
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
68
49
  requirements: []
69
-
70
- rubyforge_project:
71
- rubygems_version: 1.8.11
50
+ rubygems_version: 3.0.3.1
72
51
  signing_key:
73
- specification_version: 3
52
+ specification_version: 4
74
53
  summary: Hook rxls to generate Excel documents in Rails 3
75
54
  test_files: []
76
-