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

class_inheritable_accessor and co. are deprecated in rails 3.1 and removed from rails 3.2, replaced with class_attribute #4

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
120 changes: 92 additions & 28 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,36 +1,100 @@
GEM
remote: http://rubygems.org/
specs:
actionmailer (2.3.8)
actionpack (= 2.3.8)
actionpack (2.3.8)
activesupport (= 2.3.8)
rack (~> 1.1.0)
activerecord (2.3.8)
activesupport (= 2.3.8)
activeresource (2.3.8)
activesupport (= 2.3.8)
activesupport (2.3.8)
gemcutter (0.6.1)
actionmailer (3.2.0)
actionpack (= 3.2.0)
mail (~> 2.4.0)
actionpack (3.2.0)
activemodel (= 3.2.0)
activesupport (= 3.2.0)
builder (~> 3.0.0)
erubis (~> 2.7.0)
journey (~> 1.0.0)
rack (~> 1.4.0)
rack-cache (~> 1.1)
rack-test (~> 0.6.1)
sprockets (~> 2.1.2)
activemodel (3.2.0)
activesupport (= 3.2.0)
builder (~> 3.0.0)
activerecord (3.2.0)
activemodel (= 3.2.0)
activesupport (= 3.2.0)
arel (~> 3.0.0)
tzinfo (~> 0.3.29)
activeresource (3.2.0)
activemodel (= 3.2.0)
activesupport (= 3.2.0)
activesupport (3.2.0)
i18n (~> 0.6)
multi_json (~> 1.0)
arel (3.0.0)
builder (3.0.0)
diff-lcs (1.1.3)
erubis (2.7.0)
git (1.2.5)
jeweler (1.4.0)
gemcutter (>= 0.1.0)
hike (1.2.1)
i18n (0.6.0)
jeweler (1.8.3)
bundler (~> 1.0)
git (>= 1.2.5)
rubyforge (>= 2.0.0)
json_pure (1.4.6)
rack (1.1.0)
rails (2.3.8)
actionmailer (= 2.3.8)
actionpack (= 2.3.8)
activerecord (= 2.3.8)
activeresource (= 2.3.8)
activesupport (= 2.3.8)
rake (>= 0.8.3)
rake (0.8.7)
rspec (1.3.1)
rubyforge (2.0.4)
json_pure (>= 1.1.7)
sqlite3-ruby (1.3.0)
rake
rdoc
journey (1.0.1)
json (1.6.5)
mail (2.4.1)
i18n (>= 0.4.0)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.17.2)
multi_json (1.0.4)
polyglot (0.3.3)
rack (1.4.1)
rack-cache (1.1)
rack (>= 0.4)
rack-ssl (1.3.2)
rack
rack-test (0.6.1)
rack (>= 1.0)
rails (3.2.0)
actionmailer (= 3.2.0)
actionpack (= 3.2.0)
activerecord (= 3.2.0)
activeresource (= 3.2.0)
activesupport (= 3.2.0)
bundler (~> 1.0)
railties (= 3.2.0)
railties (3.2.0)
actionpack (= 3.2.0)
activesupport (= 3.2.0)
rack-ssl (~> 1.3.2)
rake (>= 0.8.7)
rdoc (~> 3.4)
thor (~> 0.14.6)
rake (0.9.2.2)
rdoc (3.12)
json (~> 1.4)
rspec (2.8.0)
rspec-core (~> 2.8.0)
rspec-expectations (~> 2.8.0)
rspec-mocks (~> 2.8.0)
rspec-core (2.8.0)
rspec-expectations (2.8.0)
diff-lcs (~> 1.1.2)
rspec-mocks (2.8.0)
sprockets (2.1.2)
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.5)
sqlite3-ruby (1.3.3)
sqlite3 (>= 1.3.3)
thor (0.14.6)
tilt (1.3.3)
treetop (1.4.10)
polyglot
polyglot (>= 0.3.1)
tzinfo (0.3.31)

PLATFORMS
ruby
Expand Down
4 changes: 2 additions & 2 deletions lib/make_exportable/core.rb
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,8 @@ def make_exportable(options={})
options[:scopes] ||= []

# exportable options will be :formats, :columns, :scopes & find options
write_inheritable_attribute :exportable_options, options
class_inheritable_reader :exportable_options
class_attribute :exportable_options
self.exportable_options = options

extend MakeExportable::ClassMethods
include MakeExportable::InstanceMethods
Expand Down
4 changes: 2 additions & 2 deletions lib/make_exportable/exportable_format.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module MakeExportable #:nodoc:
class ExportableFormat #:nodoc:

class_inheritable_accessor :reference
class_inheritable_accessor :name
class_attribute :reference
class_attribute :name

attr_accessor :long
attr_accessor :mime_type
Expand Down
83 changes: 39 additions & 44 deletions make_exportable.gemspec
Original file line number Diff line number Diff line change
@@ -1,71 +1,66 @@
# Generated by jeweler
# DO NOT EDIT THIS FILE DIRECTLY
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
# -*- encoding: utf-8 -*-

Gem::Specification.new do |s|
s.name = %q{make_exportable}
s.name = "make_exportable"
s.version = "1.0.3"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Kevin Skoglund", "Matthew Bergman"]
s.date = %q{2010-10-13}
s.description = %q{MakeExportable is a Rails gem/plugin to assist in exporting application data as CSV, TSV, JSON, HTML, XML or Excel. Filter and limit the data exported using ActiveRecord. Export returned values from instance methods as easily as database columns.}
s.email = %q{[email protected]}
s.date = "2012-02-10"
s.description = "MakeExportable is a Rails gem/plugin to assist in exporting application data as CSV, TSV, JSON, HTML, XML or Excel. Filter and limit the data exported using ActiveRecord. Export returned values from instance methods as easily as database columns."
s.email = "[email protected]"
s.extra_rdoc_files = [
"README.rdoc"
]
s.files = [
"Gemfile",
"Gemfile.lock",
"MIT-LICENSE",
"README.rdoc",
"Rakefile",
"VERSION",
"lib/make_exportable.rb",
"lib/make_exportable/core.rb",
"lib/make_exportable/errors.rb",
"lib/make_exportable/exportable_format.rb",
"lib/make_exportable/exportable_formats/csv.rb",
"lib/make_exportable/exportable_formats/excel.rb",
"lib/make_exportable/exportable_formats/html.rb",
"lib/make_exportable/exportable_formats/json.rb",
"lib/make_exportable/exportable_formats/tsv.rb",
"lib/make_exportable/exportable_formats/xml.rb",
"lib/make_exportable/make_exportable_helper.rb",
"lib/make_exportable/version.rb",
"rails/init.rb",
"spec/database.yml",
"spec/database.yml.sample",
"spec/make_exportable/formats_spec.rb",
"spec/make_exportable/make_exportable_helper_spec.rb",
"spec/make_exportable/make_exportable_spec.rb",
"spec/models.rb",
"spec/schema.rb",
"spec/spec_helper.rb"
]
s.homepage = %q{http://github.com/novafabrica/make_exportable}
s.rdoc_options = ["--charset=UTF-8"]
s.require_paths = ["lib"]
s.rubygems_version = %q{1.3.7}
s.summary = %q{Makes any Rails model easily exportable}
s.test_files = [
"Gemfile.lock",
"MIT-LICENSE",
"README.rdoc",
"Rakefile",
"VERSION",
"lib/make_exportable.rb",
"lib/make_exportable/core.rb",
"lib/make_exportable/errors.rb",
"lib/make_exportable/exportable_format.rb",
"lib/make_exportable/exportable_formats/csv.rb",
"lib/make_exportable/exportable_formats/excel.rb",
"lib/make_exportable/exportable_formats/html.rb",
"lib/make_exportable/exportable_formats/json.rb",
"lib/make_exportable/exportable_formats/tsv.rb",
"lib/make_exportable/exportable_formats/xml.rb",
"lib/make_exportable/make_exportable_helper.rb",
"lib/make_exportable/version.rb",
"rails/init.rb",
"spec/database.yml.sample",
"spec/make_exportable/formats_spec.rb",
"spec/make_exportable/make_exportable_helper_spec.rb",
"spec/make_exportable/make_exportable_spec.rb",
"spec/models.rb",
"spec/schema.rb",
"spec/spec_helper.rb"
"spec/make_exportable/make_exportable_helper_spec.rb",
"spec/make_exportable/make_exportable_spec.rb",
"spec/models.rb",
"spec/schema.rb",
"spec/spec_helper.rb"
]
s.homepage = "http://github.com/novafabrica/make_exportable"
s.require_paths = ["lib"]
s.rubygems_version = "1.8.10"
s.summary = "Makes any Rails model easily exportable"

if s.respond_to? :specification_version then
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
s.specification_version = 3

if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<rails>, [">= 0"])
s.add_development_dependency(%q<jeweler>, [">= 0"])
else
s.add_dependency(%q<rails>, [">= 0"])
s.add_dependency(%q<jeweler>, [">= 0"])
end
else
s.add_dependency(%q<rails>, [">= 0"])
s.add_dependency(%q<jeweler>, [">= 0"])
end
end