Permalink
Browse files

resolve deprecation due to use of class_inheritable_accessor

makes the gem buildable from source adding a gemspec
  • Loading branch information...
1 parent 524fb87 commit f6bd20d48496a0b89b990a3f88085437d0be5520 @andreacfm andreacfm committed Dec 29, 2011
View
@@ -1,2 +1,6 @@
+*.gem
+.bundle
+Gemfile.lock
+pkg/*
*.log
*.sqlite3
View
@@ -1,3 +1,4 @@
+require 'bundler/gem_tasks'
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
View
@@ -1,3 +1,7 @@
+require "userstamp/stamper"
+require "userstamp/stampable"
+require "userstamp/migration_helper"
+
module Ddb
module Controller
# The Userstamp module, when included into a controller, adds a before filter
File renamed without changes.
@@ -26,26 +26,26 @@ def self.included(base) #:nodoc:
include InstanceMethods
# Should ActiveRecord record userstamps? Defaults to true.
- class_inheritable_accessor :record_userstamp
+ class_attribute :record_userstamp
self.record_userstamp = true
# Which class is responsible for stamping? Defaults to :user.
- class_inheritable_accessor :stamper_class_name
+ class_attribute :stamper_class_name
# What column should be used for the creator stamp?
# Defaults to :creator_id when compatibility mode is off
# Defaults to :created_by when compatibility mode is on
- class_inheritable_accessor :creator_attribute
+ class_attribute :creator_attribute
# What column should be used for the updater stamp?
# Defaults to :updater_id when compatibility mode is off
# Defaults to :updated_by when compatibility mode is on
- class_inheritable_accessor :updater_attribute
+ class_attribute :updater_attribute
# What column should be used for the deleter stamp?
# Defaults to :deleter_id when compatibility mode is off
# Defaults to :deleted_by when compatibility mode is on
- class_inheritable_accessor :deleter_attribute
+ class_attribute :deleter_attribute
self.stampable
end
File renamed without changes.
@@ -0,0 +1,3 @@
+module Userstamp
+ VERSION = 2.0
+end
View
@@ -0,0 +1,25 @@
+# -*- encoding: utf-8 -*-
+
+$:.push File.expand_path("../lib", __FILE__)
+require "userstamp/version"
+
+Gem::Specification.new do |s|
+ s.name = "userstamp"
+ s.version = Userstamp::VERSION
+ s.authors = ["delynn"]
+ s.email = [""]
+ s.homepage = ""
+ s.summary = ""
+ s.description = %q{This Rails plugin extends ActiveRecord::Base to add automatic updating of created_by and updated_by attributes of your models in much the same way that the ActiveRecord::Timestamp module updates created_(at/on) and updated_(at/on) attributes.}
+
+ s.rubyforge_project = "userstamp"
+
+ s.files = `git ls-files`.split("\n")
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
+ s.require_paths = ["lib"]
+
+ # specify any dependencies here; for example:
+ # s.add_development_dependency "rspec"
+ # s.add_runtime_dependency "rest-client"
+end

0 comments on commit f6bd20d

Please sign in to comment.