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

Rails 3 support: active_model integration #3

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
22 changes: 0 additions & 22 deletions LICENSE

This file was deleted.

1 change: 0 additions & 1 deletion README

This file was deleted.

12 changes: 5 additions & 7 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,17 @@ By acting nearly identically to ActiveRecord models, ActivePresenter makes prese

== Get It

As a gem:
As a gem (Gemfile):

$ sudo gem install active_presenter
gem 'active_presenter', :git => 'git://github.com/galetahub/active_presenter.git'

As a rails gem dependency:
As a rails plugin:

config.gem 'active_presenter'
rails install plugin git://github.com/galetahub/active_presenter.git

Or get the source from github:

$ git clone git://github.com/giraffesoft/active_presenter.git

(or fork it at http://github.com/giraffesoft/active_presenter)
$ git clone git://github.com/galetahub/active_presenter.git

== Usage

Expand Down
22 changes: 18 additions & 4 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,24 @@
# encoding: utf-8
require 'rake'
require 'rake/testtask'
require 'rake/rdoctask'
require File.dirname(__FILE__)+'/lib/active_presenter'
Dir.glob(File.dirname(__FILE__)+'/lib/tasks/**/*.rake').each { |l| load l }

desc 'Default: run unit tests.'
task :default => :test

task :test do
Dir['test/**/*_test.rb'].each { |l| require l }
desc 'Test the active_presenter plugin.'
Rake::TestTask.new(:test) do |t|
t.libs << 'lib'
t.libs << 'test'
t.pattern = 'test/**/*_test.rb'
t.verbose = true
end

desc 'Generate documentation for the active_presenter plugin.'
Rake::RDocTask.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'ActivePresenter'
rdoc.options << '--line-numbers' << '--inline-source'
rdoc.rdoc_files.include('README')
rdoc.rdoc_files.include('lib/**/*.rb')
end
3 changes: 0 additions & 3 deletions TODO

This file was deleted.

22 changes: 22 additions & 0 deletions active_presenter.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "active_presenter/version"

Gem::Specification.new do |s|
s.name = "galetahub-active_presenter"
s.version = ActivePresenter::VERSION.dup
s.platform = Gem::Platform::RUBY
s.summary = "ActivePresenter is the presenter library"
s.description = "ActivePresenter is the presenter library you already know! (...if you know ActiveRecord)"
s.authors = ["James Golick", "Daniel Haran", "Igor Galeta"]
s.email = "galeta.igor@gmail.com"
s.rubyforge_project = "active_presenter"
s.homepage = "https://github.com/galetahub/active_presenter"

s.files = Dir["{app,lib}/**/*"] + ["Rakefile", "README.rdoc"]
s.test_files = Dir["{test}/**/*"]
s.extra_rdoc_files = ["README.rdoc"]
s.require_paths = ["lib"]

s.add_dependency("activerecord", ">= 0")
end
4 changes: 2 additions & 2 deletions lib/active_presenter.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require 'rubygems'
require 'active_record'
Dir.glob(File.dirname(__FILE__)+'/active_presenter/**/*.rb').each { |l| require l }

module ActivePresenter
NAME = 'active_presenter'
autoload :Base, 'active_presenter/base'
autoload :Version, 'active_presenter/version'
end
Loading