rails-excel-writeexcel-strategy 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/Gemfile +4 -0
- data/README.md +20 -0
- data/Rakefile +1 -0
- data/lib/rails-excel-writeexcel-strategy.rb +2 -0
- data/lib/rails-excel/strategies/write_excel.rb +16 -0
- data/lib/rails-excel/strategies/write_excel/version.rb +7 -0
- data/rails-excel-writeexcel-strategy.gemspec +27 -0
- metadata +81 -0
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# Rails Excel strategy with [WriteExcel](https://github.com/cxn03651/writeexcel) gem
|
2
|
+
|
3
|
+
Use this gem with [RailsExcel](https://github.com/hallelujah/rails-excel) gem
|
4
|
+
|
5
|
+
In your Gemfile
|
6
|
+
|
7
|
+
```ruby
|
8
|
+
gem 'rails-excel'
|
9
|
+
gem 'rails-excel-writeexcel-strategy'
|
10
|
+
```
|
11
|
+
|
12
|
+
In your config/initializers/rails-excel.rb
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
RailsExcel.configure do |config|
|
16
|
+
config.strategy = :write_excel
|
17
|
+
end
|
18
|
+
```
|
19
|
+
|
20
|
+
See [RailsExcel](https://github.com/hallelujah/rails-excel) gem for more information
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'writeexcel'
|
2
|
+
module RailsExcel
|
3
|
+
module Strategies
|
4
|
+
|
5
|
+
class WriteExcel
|
6
|
+
def compile(io,&block)
|
7
|
+
workbook = ::WriteExcel.new(io)
|
8
|
+
yield(workbook)
|
9
|
+
workbook.close
|
10
|
+
end
|
11
|
+
|
12
|
+
::RailsExcel.add_strategy :write_excel, self
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "rails-excel/strategies/write_excel/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "rails-excel-writeexcel-strategy"
|
7
|
+
s.version = RailsExcel::Strategies::WriteExcel::VERSION
|
8
|
+
s.authors = ["Hallelujah"]
|
9
|
+
s.email = ["hery@rails-royce.org"]
|
10
|
+
s.homepage = "https://github.com/hallelujah/rails-excel-writeexcel-strategy"
|
11
|
+
s.summary = %q{Rails Excel strategy to write xlsx files through writeexcel gem}
|
12
|
+
s.description = %q{Rails Excel strategy to write xlsx files through writeexcel gem}
|
13
|
+
|
14
|
+
s.rubyforge_project = "rails-excel-writeexcel-strategy"
|
15
|
+
|
16
|
+
s.files = `git ls-files`.split("\n")
|
17
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
+
s.require_paths = ["lib"]
|
20
|
+
|
21
|
+
s.add_dependency 'writeexcel', '>= 0.6.8'
|
22
|
+
s.add_development_dependency "rake"
|
23
|
+
|
24
|
+
# specify any dependencies here; for example:
|
25
|
+
# s.add_development_dependency "rspec"
|
26
|
+
# s.add_runtime_dependency "rest-client"
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: rails-excel-writeexcel-strategy
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Hallelujah
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2012-01-02 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: writeexcel
|
16
|
+
requirement: &17195700 !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 0.6.8
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: *17195700
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rake
|
27
|
+
requirement: &17194880 !ruby/object:Gem::Requirement
|
28
|
+
none: false
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
33
|
+
type: :development
|
34
|
+
prerelease: false
|
35
|
+
version_requirements: *17194880
|
36
|
+
description: Rails Excel strategy to write xlsx files through writeexcel gem
|
37
|
+
email:
|
38
|
+
- hery@rails-royce.org
|
39
|
+
executables: []
|
40
|
+
extensions: []
|
41
|
+
extra_rdoc_files: []
|
42
|
+
files:
|
43
|
+
- .gitignore
|
44
|
+
- Gemfile
|
45
|
+
- README.md
|
46
|
+
- Rakefile
|
47
|
+
- lib/rails-excel-writeexcel-strategy.rb
|
48
|
+
- lib/rails-excel/strategies/write_excel.rb
|
49
|
+
- lib/rails-excel/strategies/write_excel/version.rb
|
50
|
+
- rails-excel-writeexcel-strategy.gemspec
|
51
|
+
homepage: https://github.com/hallelujah/rails-excel-writeexcel-strategy
|
52
|
+
licenses: []
|
53
|
+
post_install_message:
|
54
|
+
rdoc_options: []
|
55
|
+
require_paths:
|
56
|
+
- lib
|
57
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
58
|
+
none: false
|
59
|
+
requirements:
|
60
|
+
- - ! '>='
|
61
|
+
- !ruby/object:Gem::Version
|
62
|
+
version: '0'
|
63
|
+
segments:
|
64
|
+
- 0
|
65
|
+
hash: -3418013147482018812
|
66
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ! '>='
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: '0'
|
72
|
+
segments:
|
73
|
+
- 0
|
74
|
+
hash: -3418013147482018812
|
75
|
+
requirements: []
|
76
|
+
rubyforge_project: rails-excel-writeexcel-strategy
|
77
|
+
rubygems_version: 1.8.10
|
78
|
+
signing_key:
|
79
|
+
specification_version: 3
|
80
|
+
summary: Rails Excel strategy to write xlsx files through writeexcel gem
|
81
|
+
test_files: []
|