persistize 0.1.3 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.rdoc CHANGED
@@ -52,22 +52,16 @@ These examples are just some of the possible applications of this pattern, your
52
52
 
53
53
  ==Install
54
54
 
55
- ===As a gem
55
+ Just add it to your +Gemfile+:
56
56
 
57
- # in config/environment.rb
58
- config.gem "persistize"
57
+ gem "persistize"
59
58
 
60
- And then:
61
-
62
- $ [sudo] rake gems:install
63
-
64
- ===As a plugin
65
-
66
- $ script/plugin install git://github.com/porras/persistize.git
59
+ And run:
67
60
 
61
+ $ bundle install
62
+
68
63
  ==To-do
69
64
 
70
- * More kinds of dependencies (+has_one+, <del>has_many :through</del>)
71
65
  * Make cache optional (cache can cause records to be inconsistent if changed and not saved so it would be nice to be able to deactivate it)
72
66
 
73
- Copyright (c) 2008 Luismi Cavallé & Sergio Gil, released under the MIT license
67
+ Copyright (c) 2008-2011 Luismi Cavallé & Sergio Gil, released under the MIT license
data/Rakefile CHANGED
@@ -1,6 +1,4 @@
1
1
  require "rake/testtask"
2
- require "rake/rdoctask"
3
-
4
2
  Rake::TestTask.new do |t|
5
3
  t.libs << "test"
6
4
  t.test_files = FileList["test/**/*_test.rb"]
@@ -9,6 +7,7 @@ end
9
7
 
10
8
  task :default => ["test"]
11
9
 
10
+ require "rake/rdoctask"
12
11
  Rake::RDocTask.new do |rd|
13
12
  rd.main = "README.rdoc"
14
13
  rd.rdoc_files.include("README.rdoc", "lib/**/*.rb")
data/lib/persistize.rb CHANGED
@@ -69,6 +69,8 @@ module Persistize
69
69
  RUBY
70
70
  end
71
71
 
72
+ alias_method :generate_has_one_callback, :generate_has_many_callback # implementation is just the same :)
73
+
72
74
  def generate_has_many_through_callback(association, update_method, callback_name)
73
75
  association.klass.class_eval <<-RUBY, __FILE__, __LINE__ + 1
74
76
  def #{callback_name} # def _update_completed_in_person_callback
data/persistize.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "persistize"
5
- s.version = "0.1.3"
5
+ s.version = "0.2.0"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Sergio Gil", "Luismi Cavallé"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: persistize
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 1
9
- - 3
10
- version: 0.1.3
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sergio Gil