userstamp 2.0.0 → 2.0.1

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.
Files changed (41) hide show
  1. data/Gemfile +9 -0
  2. data/Gemfile.lock +35 -0
  3. data/Rakefile +2 -2
  4. data/{README → Readme.rdoc} +27 -35
  5. data/VERSION +1 -1
  6. data/lib/stampable.rb +18 -15
  7. data/lib/userstamp.rb +4 -0
  8. data/rdoc/classes/Ddb/Userstamp.html +4 -4
  9. data/rdoc/classes/Ddb/Userstamp/Stampable/ClassMethods.html +41 -38
  10. data/rdoc/classes/Ddb/Userstamp/Stamper/InstanceMethods.html +1 -1
  11. data/rdoc/classes/Userstamp.html +118 -0
  12. data/rdoc/created.rid +1 -1
  13. data/rdoc/files/CHANGELOG.html +1 -1
  14. data/rdoc/files/LICENSE.html +1 -1
  15. data/rdoc/files/{README.html → Readme_rdoc.html} +62 -61
  16. data/rdoc/files/lib/migration_helper_rb.html +1 -1
  17. data/rdoc/files/lib/stampable_rb.html +1 -1
  18. data/rdoc/files/lib/stamper_rb.html +1 -1
  19. data/rdoc/files/lib/userstamp_rb.html +10 -1
  20. data/rdoc/fr_class_index.html +1 -0
  21. data/rdoc/fr_file_index.html +1 -1
  22. data/rdoc/index.html +1 -1
  23. data/test/compatibility_stamping_test.rb +29 -23
  24. data/test/helper.rb +61 -0
  25. data/test/models/comment.rb +1 -0
  26. data/test/models/foo.rb +3 -0
  27. data/test/models/post.rb +10 -1
  28. data/test/schema.rb +6 -8
  29. data/test/stamping_test.rb +45 -17
  30. data/test/userstamp_controller_test.rb +24 -39
  31. data/test/userstamp_test.rb +7 -0
  32. data/userstamp.gemspec +21 -24
  33. metadata +28 -24
  34. data/test/database.yml +0 -4
  35. data/test/fixtures/comments.yml +0 -16
  36. data/test/fixtures/people.yml +0 -11
  37. data/test/fixtures/posts.yml +0 -9
  38. data/test/fixtures/users.yml +0 -7
  39. data/test/helpers/functional_test_helper.rb +0 -37
  40. data/test/helpers/unit_test_helper.rb +0 -29
  41. data/test/models/ping.rb +0 -7
@@ -1,4 +0,0 @@
1
- test:
2
- adapter: sqlite3
3
- database: userstamp_plugin_test.sqlite3
4
- timeout: 5000
@@ -1,16 +0,0 @@
1
- # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
- first_comment:
3
- id: 1
4
- post_id: 1
5
- comment: First Comment
6
- created_by: 1
7
- second_comment:
8
- id: 2
9
- post_id: 1
10
- comment: Second Comment
11
- created_by: 2
12
- third_comment:
13
- id: 3
14
- post_id: 2
15
- comment: Third Comment
16
- created_by: 1
@@ -1,11 +0,0 @@
1
- # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
- delynn:
3
- id: 1
4
- name: DeLynn
5
- creator_id: 1
6
- updater_id: 1
7
- nicole:
8
- id: 2
9
- name: Nicole
10
- creator_id: 2
11
- updater_id: 2
@@ -1,9 +0,0 @@
1
- # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
- first_post:
3
- id: 1
4
- title: First Post
5
- creator_id: 1
6
- second_post:
7
- id: 2
8
- title: Second Post
9
- creator_id: 1
@@ -1,7 +0,0 @@
1
- # Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
2
- zeus:
3
- id: 1
4
- name: Zeus
5
- hera:
6
- id: 2
7
- name: Hera
@@ -1,37 +0,0 @@
1
- $:.unshift(File.dirname(__FILE__) + '/../..')
2
- $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
- schema_file = File.join(File.dirname(__FILE__), '..', 'schema.rb')
4
- ENV["RAILS_ENV"] = "test"
5
- require 'rubygems'
6
- require 'test/unit'
7
- require 'active_support'
8
- require 'active_support/test_case'
9
- require 'active_record'
10
- require 'active_record/fixtures'
11
- require 'action_controller'
12
- require 'action_controller/test_case'
13
- require 'action_controller/test_process'
14
- require 'action_controller/integration'
15
- require 'init'
16
-
17
- config = YAML::load(IO.read(File.join(File.dirname(__FILE__), '..', 'database.yml')))[ENV['DB'] || 'test']
18
- ActiveRecord::Base.configurations = config
19
- ActiveRecord::Base.establish_connection(config)
20
-
21
- ActiveRecord::Base.logger = Logger.new(File.dirname(__FILE__) + "/models.log")
22
- ActionController::Base.logger = Logger.new(File.dirname(__FILE__) + "/controllers.log")
23
-
24
- load(schema_file) if File.exist?(schema_file)
25
-
26
- Test::Unit::TestCase.fixture_path = File.join(File.dirname(__FILE__), '..', 'fixtures')
27
- $:.unshift(Test::Unit::TestCase.fixture_path)
28
-
29
- class Test::Unit::TestCase
30
- # Turn off transactional fixtures if you're working with MyISAM tables in MySQL
31
- self.use_transactional_fixtures = true
32
-
33
- # Instantiated fixtures are slow, but give you @david where you otherwise would need people(:david)
34
- self.use_instantiated_fixtures = true
35
-
36
- # Add more helper methods to be used by all tests here...
37
- end
@@ -1,29 +0,0 @@
1
- $:.unshift(File.dirname(__FILE__) + '/../..')
2
- $:.unshift(File.dirname(__FILE__) + '/../../lib')
3
- schema_file = File.join(File.dirname(__FILE__), '..', 'schema.rb')
4
-
5
- require 'rubygems'
6
- require 'test/unit'
7
- require 'active_record'
8
- require 'active_record/fixtures'
9
- require 'active_support'
10
- require 'init'
11
-
12
- config = YAML::load(IO.read(File.join(File.dirname(__FILE__), '..', 'database.yml')))[ENV['DB'] || 'test']
13
- ActiveRecord::Base.configurations = config
14
- ActiveRecord::Base.establish_connection(config)
15
-
16
- load(schema_file) if File.exist?(schema_file)
17
-
18
- Test::Unit::TestCase.fixture_path = File.join(File.dirname(__FILE__), '..', 'fixtures')
19
- $:.unshift(Test::Unit::TestCase.fixture_path)
20
-
21
- class Test::Unit::TestCase #:nodoc:
22
- # Turn off transactional fixtures if you're working with MyISAM tables in MySQL
23
- self.use_transactional_fixtures = true
24
-
25
- # Instantiated fixtures are slow, but give you @david where you otherwise would need people(:david)
26
- self.use_instantiated_fixtures = true
27
-
28
- # Add more helper methods to be used by all tests here...
29
- end
@@ -1,7 +0,0 @@
1
- class Ping < ActiveRecord::Base
2
- stampable :stamper_class_name => :person,
3
- :creator_attribute => :creator_name,
4
- :updater_attribute => :updater_name,
5
- :deleter_attribute => :deleter_name
6
- belongs_to :post
7
- end