Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Straydogstudio master #11

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
gemfiles/*.lock
Gemfile.lock
.ruby-version
acts_as_xlsx.sqlite3.db
Gemfile.lock
20 changes: 17 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
bundler_args: --binstubs
rvm:
- 1.8.7
- 1.9.2
- 1.9.3
- 2.0.0
- 2.1.1
gemfile:
- gemfiles/2.3.gemfile
- gemfiles/3.1.gemfile
- gemfiles/4.1.gemfile

matrix:
exclude:
- rvm: 2.0.0
gemfile: gemfiles/2.3.gemfile
- rvm: 2.1.1
gemfile: gemfiles/2.3.gemfile


script: "bundle exec rake test"

notifications:
irc: "irc.freenode.org#axlsx
irc: "irc.freenode.org#axlsx"

15 changes: 15 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# must exclude Ruby over 1.9.3
appraise "2.3" do
gem "activerecord", "~> 2.3.8"
gem "acts_as_xlsx", :path => "../"
end

appraise "3.1" do
gem "activerecord", "~> 3.1.0"
gem "acts_as_xlsx", :path => "../"
end

appraise "4.1" do
gem "activerecord", "~> 4.1.0"
gem "acts_as_xlsx", :path => "../"
end
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
source :rubygems
gemspec
source 'https://rubygems.org'
gemspec
45 changes: 29 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,29 @@ Acts as xlsx: Office Open XML Spreadsheet Generation plugin for active record
====================================
[![Build Status](https://secure.travis-ci.org/randym/acts_as_xlsx.png)](http://travis-ci.org/randym/acts_as_xlsx/)

**IRC**: [irc.freenode.net / #axlsx](irc://irc.freenode.net/axlsx)
**Git**: [http://github.com/randym/acts_as_xlsx](http://github.com/randym/acts_as_xlsx)
**Author**: Randy Morgan
**Copyright**: 2011
**License**: MIT License
**Latest Version**: 1.0.6
**Ruby Version**: 1.8.7 - 1.9.3
**Release Date**: July 27th 2012
**IRC**: [irc.freenode.net / #axlsx](irc://irc.freenode.net/axlsx)
**Git**: [http://github.com/randym/acts_as_xlsx](http://github.com/randym/acts_as_xlsx)
**Author**: Randy Morgan
**Copyright**: 2011
**License**: MIT License
**Latest Version**: 2.0.0
**Ruby Version**: 1.9.3 - 2.1.0
**Release Date**: June 16th 2014

Synopsis
--------

Acts_as_xlsx is an active record plugin for Axlsx. It makes generating excel spreadsheets from any subclass of ActiveRecord::Base as simple as a couple of lines of code.


Feature List
------------

**1. Mixes into active record base to provide to_xlsx

**2. Can work at the end of any series of finder methods.
**3. Can accept any set of find options

**3. Can accept any set of find options

**4. Automates localization of column heading with i18n support

Expand All @@ -37,28 +38,32 @@ Feature List

**9. Allows you to specify the Axlsx package to add your data to so you can create a single workbook with a sheet for each to_xlsx call.


Installing
----------

To install, use the following command:

$ gem install acts_as_xlsx



Usage
-----

###Examples

See the Guides here:

See the Guides here:

[http://axlsx.blogspot.com/] (http://axlsx.blogspot.com/)

For examples on how to use axlsx for custom styles, charts, images and more see:

[http://github.com/randym/axlsx](http://github.com/randym/axlsx)
[http://github.com/randym/axlsx](http://github.com/randym/axlsx)

###Documentation


This gem is 100% documented with YARD, an exceptional documentation library. To see documentation for this, and all the gems installed on your system use:

gem install yard
Expand All @@ -68,9 +73,15 @@ This gem is 100% documented with YARD, an exceptional documentation library. To
###Specs

This gem has 100% coverage using Test::Unit



Changelog
---------
- ** June.17.14** 1.1.0 release
- Added support for ActvieRecord > 2.3.8, which removed support for ::Base#all
- Added where and order options for more recent versions of ActiveRecord
- Added skip_humanization option to allow you to output the sheet and column names directly.

- **July.27.12**: 1.0.6 release
- conditionaly register XLSX mime type

Expand All @@ -85,8 +96,10 @@ Changelog
Please see the {file:CHANGELOG.md} document for past release information.



Copyright
---------

Acts_as_xlsx © 2011 by [Randy Morgan](mailto:[email protected]). Acts_as_xlsx is
Acts_as_xlsx © 201l-2014 by [Randy Morgan](mailto:[email protected]). Acts_as_xlsx is
licensed under the MIT license. Please see the {file:LICENSE} document for more information.

11 changes: 7 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
require "bundler/setup"
require 'appraisal'
require File.expand_path(File.dirname(__FILE__) + '/lib/acts_as_xlsx/version.rb')

task :build => :gendoc do
system "gem build acts_as_xlsx.gemspec"
end

task :gendoc do
task :gendoc do
system "yardoc"
end

task :test do
task :test do
require 'rake/testtask'
Rake::TestTask.new do |t|
t.libs << 'test'
Expand All @@ -21,4 +22,6 @@ task :release => :build do
system "gem push acts_as_xlsx-#{Axlsx::Ar::VERSION}.gem"
end

task :default => :test
if !ENV["APPRAISAL_INITIALIZED"] && !ENV["TRAVIS"]
task :default => :appraisal
end
14 changes: 7 additions & 7 deletions acts_as_xlsx.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ Gem::Specification.new do |s|
s.author = "Randy Morgan"
s.email = '[email protected]'
s.homepage = 'https://github.com/randym/acts_as_xlsx'
s.platform = Gem::Platform::RUBY
s.platform = Gem::Platform::RUBY
s.date = Time.now.strftime('%Y-%m-%d')
s.summary = "ActiveRecord support for Axlsx"
s.has_rdoc = 'acts_as_xlsx'
s.license = 'MIT'
s.description = <<-eof
acts_as_xlsx lets you turn any ActiveRecord::Base inheriting class into an excel spreadsheet.
It can be added to any finder method or scope chain and can use localized column and sheet names with I18n.
Expand All @@ -18,16 +19,15 @@ Gem::Specification.new do |s|
s.test_files = Dir.glob("{test/**/*}")

s.add_runtime_dependency 'axlsx', '>= 1.0.13'
s.add_runtime_dependency 'activerecord', '>= 2.3.9'
s.add_runtime_dependency 'activerecord', '>= 2.3.8'
s.add_runtime_dependency 'i18n', '>= 0.4.1'
s.add_development_dependency 'rake', "0.8.7" if RUBY_VERSION == "1.9.2"
s.add_development_dependency 'rake', "~> 0.9" if ["1.9.3", "1.8.7"].include?(RUBY_VERSION)

s.add_development_dependency('appraisal')
s.add_development_dependency 'rake'
s.add_development_dependency 'bundler'
s.add_development_dependency 'sqlite3', "~> 1.3.5"
s.add_development_dependency 'yard'
s.add_development_dependency 'rdiscount'

s.required_ruby_version = '>= 1.8.7'
s.required_ruby_version = '>= 1.9.3'
s.require_path = 'lib'
end
8 changes: 8 additions & 0 deletions gemfiles/2.3.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activerecord", "~> 2.3.8"
gem "acts_as_xlsx", :path => "../"

gemspec :path => "../"
8 changes: 8 additions & 0 deletions gemfiles/3.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activerecord", "~> 3.1.0"
gem "acts_as_xlsx", :path => "../"

gemspec :path => "../"
58 changes: 58 additions & 0 deletions gemfiles/3.1.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
PATH
remote: ..
specs:
acts_as_xlsx (1.0.6)
activerecord (>= 2.1.0)
axlsx (>= 1.0.13)
i18n (>= 0.4.1)

GEM
remote: https://rubygems.org/
specs:
activemodel (3.1.12)
activesupport (= 3.1.12)
builder (~> 3.0.0)
i18n (~> 0.6)
activerecord (3.1.12)
activemodel (= 3.1.12)
activesupport (= 3.1.12)
arel (~> 2.2.3)
tzinfo (~> 0.3.29)
activesupport (3.1.12)
multi_json (~> 1.0)
appraisal (1.0.0)
bundler
rake
thor (>= 0.14.0)
arel (2.2.3)
axlsx (2.0.1)
htmlentities (~> 4.3.1)
nokogiri (>= 1.4.1)
rubyzip (~> 1.0.0)
builder (3.0.4)
htmlentities (4.3.2)
i18n (0.6.9)
mini_portile (0.6.0)
multi_json (1.10.1)
nokogiri (1.6.2.1)
mini_portile (= 0.6.0)
rake (10.3.2)
rdiscount (2.1.7.1)
rubyzip (1.0.0)
sqlite3 (1.3.9)
thor (0.19.1)
tzinfo (0.3.39)
yard (0.8.7.4)

PLATFORMS
ruby

DEPENDENCIES
activerecord (~> 3.1.0)
acts_as_xlsx!
appraisal
bundler
rake
rdiscount
sqlite3 (~> 1.3.5)
yard
8 changes: 8 additions & 0 deletions gemfiles/4.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activerecord", "~> 4.1.0"
gem "acts_as_xlsx", :path => "../"

gemspec :path => "../"
63 changes: 63 additions & 0 deletions gemfiles/4.1.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
PATH
remote: ..
specs:
acts_as_xlsx (1.0.6)
activerecord (>= 2.3.8)
axlsx (>= 1.0.13)
i18n (>= 0.4.1)

GEM
remote: https://rubygems.org/
specs:
activemodel (4.1.1)
activesupport (= 4.1.1)
builder (~> 3.1)
activerecord (4.1.1)
activemodel (= 4.1.1)
activesupport (= 4.1.1)
arel (~> 5.0.0)
activesupport (4.1.1)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
appraisal (1.0.0)
bundler
rake
thor (>= 0.14.0)
arel (5.0.1.20140414130214)
axlsx (2.0.1)
htmlentities (~> 4.3.1)
nokogiri (>= 1.4.1)
rubyzip (~> 1.0.0)
builder (3.2.2)
htmlentities (4.3.2)
i18n (0.6.9)
json (1.8.1)
mini_portile (0.6.0)
minitest (5.3.4)
nokogiri (1.6.2.1)
mini_portile (= 0.6.0)
rake (10.3.2)
rdiscount (2.1.7.1)
rubyzip (1.0.0)
sqlite3 (1.3.9)
thor (0.19.1)
thread_safe (0.3.4)
tzinfo (1.2.1)
thread_safe (~> 0.1)
yard (0.8.7.4)

PLATFORMS
ruby

DEPENDENCIES
activerecord (~> 4.1.0)
acts_as_xlsx!
appraisal
bundler
rake
rdiscount
sqlite3 (~> 1.3.5)
yard
Loading