filthy 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/Manifest +1 -1
  2. data/README.rdoc +38 -0
  3. data/Rakefile +2 -2
  4. data/filthy.gemspec +6 -6
  5. metadata +7 -5
data/Manifest CHANGED
@@ -1,6 +1,6 @@
1
1
  README.md
2
+ README.rdoc
2
3
  Rakefile
3
- filthy.gemspec
4
4
  lib/filthy.rb
5
5
  test/database.yml
6
6
  test/filthy_test.rb
data/README.rdoc ADDED
@@ -0,0 +1,38 @@
1
+ == Filthy
2
+
3
+ Rails gem to check if an attribute was changed on the last save. Useful in after_save callbacks.
4
+
5
+ == Install
6
+
7
+ gem install filthy
8
+
9
+ == Usage
10
+
11
+
12
+ class Movie < ActiveRecord::Base
13
+
14
+ filthy_attributes :title, :director
15
+
16
+ end
17
+
18
+ @movie = Movie.find(1)
19
+ @movie.title = "28 days later"
20
+ @movie.title_filthy?
21
+ => false
22
+ @movie.save
23
+ => true
24
+ @movie.title_filthy?
25
+ => true
26
+ @movie.save
27
+ => true
28
+ @movie.title_filthy?
29
+ => false
30
+
31
+
32
+ == Credits
33
+
34
+ Filthy is maintained by Mike Taylor and is funded by BookRenter.com. Many of the ideas that have inspired Filthy come from practical usage by the Bookrenter software development team and conversations with Bookrenter developers Andrew Wheeler, Michael Pearce, and Philippe Huibonhoa.
35
+
36
+ == Copyright
37
+
38
+ Copyright (c) 2012 Mike Taylor, Bookrenter.com.
data/Rakefile CHANGED
@@ -2,13 +2,13 @@ require 'rubygems'
2
2
  require 'rake'
3
3
  require 'echoe'
4
4
 
5
- Echoe.new('filthy', '1.0.0') do |p|
5
+ Echoe.new('filthy', '1.0.1') do |p|
6
6
  p.description = "Check if an attribute was changed after the last save."
7
7
  p.url = "http://github.com/sealabcore/filthy"
8
8
  p.author = "Mike Taylor"
9
9
  p.email = "michael.taylor@bookrenter.com"
10
10
  p.ignore_pattern = ["tmp/*", "script/*"]
11
- p.development_dependencies = ["sqlite3", "active_record", "active_support", 'test/unit', 'shoulda-context']
11
+ p.development_dependencies = ["sqlite3", "active_record", "active_support", 'test-unit', 'shoulda-context']
12
12
  end
13
13
 
14
14
  Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
data/filthy.gemspec CHANGED
@@ -2,15 +2,15 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "filthy"
5
- s.version = "1.0.0"
5
+ s.version = "1.0.1"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Mike Taylor"]
9
9
  s.date = "2012-01-20"
10
10
  s.description = "Check if an attribute was changed after the last save."
11
11
  s.email = "michael.taylor@bookrenter.com"
12
- s.extra_rdoc_files = ["README.md", "lib/filthy.rb"]
13
- s.files = ["README.md", "Rakefile", "filthy.gemspec", "lib/filthy.rb", "test/database.yml", "test/filthy_test.rb", "test/helper.rb", "Manifest"]
12
+ s.extra_rdoc_files = ["README.md", "README.rdoc", "lib/filthy.rb"]
13
+ s.files = ["README.md", "README.rdoc", "Rakefile", "lib/filthy.rb", "test/database.yml", "test/filthy_test.rb", "test/helper.rb", "Manifest", "filthy.gemspec"]
14
14
  s.homepage = "http://github.com/sealabcore/filthy"
15
15
  s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Filthy", "--main", "README.md"]
16
16
  s.require_paths = ["lib"]
@@ -26,20 +26,20 @@ Gem::Specification.new do |s|
26
26
  s.add_development_dependency(%q<sqlite3>, [">= 0"])
27
27
  s.add_development_dependency(%q<active_record>, [">= 0"])
28
28
  s.add_development_dependency(%q<active_support>, [">= 0"])
29
- s.add_development_dependency(%q<test/unit>, [">= 0"])
29
+ s.add_development_dependency(%q<test-unit>, [">= 0"])
30
30
  s.add_development_dependency(%q<shoulda-context>, [">= 0"])
31
31
  else
32
32
  s.add_dependency(%q<sqlite3>, [">= 0"])
33
33
  s.add_dependency(%q<active_record>, [">= 0"])
34
34
  s.add_dependency(%q<active_support>, [">= 0"])
35
- s.add_dependency(%q<test/unit>, [">= 0"])
35
+ s.add_dependency(%q<test-unit>, [">= 0"])
36
36
  s.add_dependency(%q<shoulda-context>, [">= 0"])
37
37
  end
38
38
  else
39
39
  s.add_dependency(%q<sqlite3>, [">= 0"])
40
40
  s.add_dependency(%q<active_record>, [">= 0"])
41
41
  s.add_dependency(%q<active_support>, [">= 0"])
42
- s.add_dependency(%q<test/unit>, [">= 0"])
42
+ s.add_dependency(%q<test-unit>, [">= 0"])
43
43
  s.add_dependency(%q<shoulda-context>, [">= 0"])
44
44
  end
45
45
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: filthy
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 0
10
- version: 1.0.0
9
+ - 1
10
+ version: 1.0.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mike Taylor
@@ -60,7 +60,7 @@ dependencies:
60
60
  type: :development
61
61
  version_requirements: *id003
62
62
  - !ruby/object:Gem::Dependency
63
- name: test/unit
63
+ name: test-unit
64
64
  prerelease: false
65
65
  requirement: &id004 !ruby/object:Gem::Requirement
66
66
  none: false
@@ -95,16 +95,18 @@ extensions: []
95
95
 
96
96
  extra_rdoc_files:
97
97
  - README.md
98
+ - README.rdoc
98
99
  - lib/filthy.rb
99
100
  files:
100
101
  - README.md
102
+ - README.rdoc
101
103
  - Rakefile
102
- - filthy.gemspec
103
104
  - lib/filthy.rb
104
105
  - test/database.yml
105
106
  - test/filthy_test.rb
106
107
  - test/helper.rb
107
108
  - Manifest
109
+ - filthy.gemspec
108
110
  homepage: http://github.com/sealabcore/filthy
109
111
  licenses: []
110
112