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.
- data/Gemfile +9 -0
- data/Gemfile.lock +35 -0
- data/Rakefile +2 -2
- data/{README → Readme.rdoc} +27 -35
- data/VERSION +1 -1
- data/lib/stampable.rb +18 -15
- data/lib/userstamp.rb +4 -0
- data/rdoc/classes/Ddb/Userstamp.html +4 -4
- data/rdoc/classes/Ddb/Userstamp/Stampable/ClassMethods.html +41 -38
- data/rdoc/classes/Ddb/Userstamp/Stamper/InstanceMethods.html +1 -1
- data/rdoc/classes/Userstamp.html +118 -0
- data/rdoc/created.rid +1 -1
- data/rdoc/files/CHANGELOG.html +1 -1
- data/rdoc/files/LICENSE.html +1 -1
- data/rdoc/files/{README.html → Readme_rdoc.html} +62 -61
- data/rdoc/files/lib/migration_helper_rb.html +1 -1
- data/rdoc/files/lib/stampable_rb.html +1 -1
- data/rdoc/files/lib/stamper_rb.html +1 -1
- data/rdoc/files/lib/userstamp_rb.html +10 -1
- data/rdoc/fr_class_index.html +1 -0
- data/rdoc/fr_file_index.html +1 -1
- data/rdoc/index.html +1 -1
- data/test/compatibility_stamping_test.rb +29 -23
- data/test/helper.rb +61 -0
- data/test/models/comment.rb +1 -0
- data/test/models/foo.rb +3 -0
- data/test/models/post.rb +10 -1
- data/test/schema.rb +6 -8
- data/test/stamping_test.rb +45 -17
- data/test/userstamp_controller_test.rb +24 -39
- data/test/userstamp_test.rb +7 -0
- data/userstamp.gemspec +21 -24
- metadata +28 -24
- data/test/database.yml +0 -4
- data/test/fixtures/comments.yml +0 -16
- data/test/fixtures/people.yml +0 -11
- data/test/fixtures/posts.yml +0 -9
- data/test/fixtures/users.yml +0 -7
- data/test/helpers/functional_test_helper.rb +0 -37
- data/test/helpers/unit_test_helper.rb +0 -29
- data/test/models/ping.rb +0 -7
data/test/database.yml
DELETED
data/test/fixtures/comments.yml
DELETED
@@ -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
|
data/test/fixtures/people.yml
DELETED
data/test/fixtures/posts.yml
DELETED
data/test/fixtures/users.yml
DELETED
@@ -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
|