arbs 0.0.1 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README CHANGED
@@ -14,6 +14,23 @@ You can download arbs from here[http://rubyforge.org/projects/arbs] or install i
14
14
 
15
15
  You may use, copy and redistribute this library under the same terms as Ruby itself (see http://www.ruby-lang.org/en/LICENSE.txt).
16
16
 
17
+ == Usage
18
+
19
+ To use arbs all you need to do is include the following 2 lines.
20
+
21
+ require 'arbs'
22
+ ArbsGenerator.run("[path to]/schema.rb")
23
+
24
+ The following ActiveRecord::Base methods are supported
25
+
26
+ Class methods: before_save, belongs_to, has_many, serialize, validates_confirmation_of, validates_presence_of, validates_uniqueness_of
27
+ Instance methods: read_attribute, write_attribute
28
+
29
+ The following ActiveRecord::Schema methods are supported
30
+
31
+ Class methods: define
32
+ Instance methods: add_foreign_key, add_index, create_table
33
+
17
34
  == Contributors
18
35
 
19
36
  George Malamidis
@@ -1,6 +1,7 @@
1
- module ActiveRecord
2
- class Base
3
- stub_class_methods :belongs_to, :has_many, :before_save, :validates_presence_of, :validates_uniqueness_of, :validates_confirmation_of, :serialize
1
+ module ActiveRecord #:nodoc:
2
+ class Base #:nodoc:
3
+ stub_class_methods :belongs_to, :has_many, :before_save, :validates_presence_of, :validates_uniqueness_of,
4
+ :validates_confirmation_of, :serialize, :validates_length_of, :before_save, :attr_accessible
4
5
 
5
6
  def initialize(attributes={})
6
7
  attributes.each do |key, value|
@@ -1,5 +1,5 @@
1
- module ActiveRecord
2
- class Schema
1
+ module ActiveRecord #:nodoc:
2
+ class Schema #:nodoc:
3
3
  stub_instance_methods :add_index, :add_foreign_key
4
4
 
5
5
  def self.define(hash, &block)
@@ -1,4 +1,4 @@
1
- class ArbsGenerator
1
+ class ArbsGenerator #:nodoc:
2
2
  def self.run(schema_path)
3
3
  load schema_path
4
4
  end
@@ -1,4 +1,4 @@
1
- class BehaviorAppender
1
+ class BehaviorAppender #:nodoc:
2
2
  attr_accessor :klass
3
3
  def initialize(klass)
4
4
  self.klass = klass
@@ -1,7 +1,7 @@
1
- module ClassExtensions
1
+ module ClassExtensions #:nodoc:
2
2
  end
3
3
 
4
- class Class
4
+ class Class #:nodoc:
5
5
  include ClassExtensions
6
6
 
7
7
  def stub_class_methods(*args)
data/rakefile.rb CHANGED
@@ -16,6 +16,13 @@ Rake::RDocTask.new do |task|
16
16
  task.rdoc_files.include('README', 'lib/**/*.rb')
17
17
  end
18
18
 
19
+ task :rdoc => :readme
20
+
21
+ desc "Generate README"
22
+ task :readme do
23
+ %x[erb README_TEMPLATE > README]
24
+ end
25
+
19
26
  desc "Upload RDoc to RubyForge"
20
27
  task :publish_rdoc => [:rdoc] do
21
28
  Rake::SshDirPublisher.new("jaycfields@rubyforge.org", "/var/www/gforge-projects/arbs", "doc").upload
@@ -26,7 +33,7 @@ Gem::manage_gems
26
33
  specification = Gem::Specification.new do |s|
27
34
  s.name = "arbs"
28
35
  s.summary = "A duck that acts like ActiveRecord::Base, but doesn't have any of the AR::B functionality."
29
- s.version = "0.0.1"
36
+ s.version = "0.0.3"
30
37
  s.author = 'Jay Fields'
31
38
  s.description = "A duck that acts like ActiveRecord::Base, but doesn't have any of the AR::B functionality."
32
39
  s.homepage = 'http://arbs.rubyforge.org'
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: arbs
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.0.1
7
- date: 2007-10-27 00:00:00 +01:00
6
+ version: 0.0.3
7
+ date: 2007-11-28 00:00:00 -05:00
8
8
  summary: A duck that acts like ActiveRecord::Base, but doesn't have any of the AR::B functionality.
9
9
  require_paths:
10
10
  - lib