plugin_test_helper 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,5 +1,9 @@
1
1
  *SVN*
2
2
 
3
+ *0.1.4* (June 22nd, 2008)
4
+
5
+ * Remove log files from gems
6
+
3
7
  *0.1.3* (May 5th, 2008)
4
8
 
5
9
  * Update documentation
data/README CHANGED
@@ -187,7 +187,7 @@ Example:
187
187
 
188
188
  == Dependencies
189
189
 
190
- None.
190
+ Rails 2.1 or later
191
191
 
192
192
  == References
193
193
 
data/Rakefile CHANGED
@@ -4,7 +4,7 @@ require 'rake/gempackagetask'
4
4
  require 'rake/contrib/sshpublisher'
5
5
 
6
6
  PKG_NAME = 'plugin_test_helper'
7
- PKG_VERSION = '0.1.3'
7
+ PKG_VERSION = '0.1.4'
8
8
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
9
9
  RUBY_FORGE_PROJECT = 'pluginaweek'
10
10
 
@@ -22,6 +22,7 @@ desc 'Generate documentation for the plugin_test_helper plugin.'
22
22
  Rake::RDocTask.new(:rdoc) do |rdoc|
23
23
  rdoc.rdoc_dir = 'rdoc'
24
24
  rdoc.title = 'PluginTestHelper'
25
+ rdoc.template = '../rdoc_template.rb'
25
26
  rdoc.options << '--line-numbers' << '--inline-source'
26
27
  rdoc.rdoc_files.include('README')
27
28
  rdoc.rdoc_files.include('lib/**/*.rb')
@@ -33,7 +34,7 @@ spec = Gem::Specification.new do |s|
33
34
  s.platform = Gem::Platform::RUBY
34
35
  s.summary = 'Simplifies plugin testing by creating an isolated Rails environment that simulates its usage in a real application.'
35
36
 
36
- s.files = FileList['{generators,lib,test}/**/*'].to_a + %w(CHANGELOG init.rb MIT-LICENSE Rakefile README)
37
+ s.files = FileList['{generators,lib,test}/**/*'].to_a - FileList['generators/plugin_test_structure/templates/app_root/log/*'].to_a + %w(CHANGELOG init.rb MIT-LICENSE Rakefile README)
37
38
  s.require_path = 'lib'
38
39
  s.autorequire = 'plugin_test_helper'
39
40
  s.has_rdoc = true
@@ -61,13 +62,13 @@ task :pdoc => [:rdoc] do
61
62
  end
62
63
 
63
64
  desc 'Publish the API docs and gem'
64
- task :publish => [:pdoc, :release]
65
+ task :publish => [:pgem, :pdoc, :release]
65
66
 
66
67
  desc 'Publish the release files to RubyForge.'
67
68
  task :release => [:gem, :package] do
68
69
  require 'rubyforge'
69
70
 
70
- ruby_forge = RubyForge.new
71
+ ruby_forge = RubyForge.new.configure
71
72
  ruby_forge.login
72
73
 
73
74
  %w( gem tgz zip ).each do |ext|
@@ -6,4 +6,4 @@ require 'rubygems'
6
6
  require 'plugin_test_helper'
7
7
 
8
8
  # Run the migrations (optional)
9
- # ActiveRecord::Migrator.migrate("#{RAILS_ROOT}/db/migrate")
9
+ # ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
@@ -1,3 +1,3 @@
1
- (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(RAILS_ROOT, '../fixtures/*.{yml,csv}'))).each do |fixture_file|
2
- Fixtures.create_fixtures(File.join(RAILS_ROOT, '../fixtures'), File.basename(fixture_file, '.*'))
1
+ (ENV['FIXTURES'] ? ENV['FIXTURES'].split(/,/) : Dir.glob(File.join(Rails.root, '../fixtures/*.{yml,csv}'))).each do |fixture_file|
2
+ Fixtures.create_fixtures(File.join(Rails.root, '../fixtures'), File.basename(fixture_file, '.*'))
3
3
  end
@@ -14,8 +14,8 @@ module PluginAWeek #:nodoc:
14
14
 
15
15
  # Load routes from either the helper or the plugin
16
16
  def reload_with_test_helper
17
- if @routes_last_modified && defined?(RAILS_ROOT)
18
- routes_path = File.join("#{RAILS_ROOT}/config/routes.rb")
17
+ if @routes_last_modified && defined?(Rails.root)
18
+ routes_path = File.join("#{Rails.root}/config/routes.rb")
19
19
  routes_path = File.join("#{HELPER_RAILS_ROOT}/config/routes.rb") unless File.exists?(routes_path)
20
20
 
21
21
  mtime = File.stat(routes_path).mtime
@@ -29,8 +29,8 @@ module PluginAWeek #:nodoc:
29
29
 
30
30
  # Load routes from either the helper or the plugin
31
31
  def load_routes_with_test_helper!
32
- if defined?(RAILS_ROOT) && defined?(::ActionController::Routing::Routes) && self == ::ActionController::Routing::Routes
33
- routes_path = File.join("#{RAILS_ROOT}/config/routes.rb")
32
+ if defined?(Rails.root) && defined?(::ActionController::Routing::Routes) && self == ::ActionController::Routing::Routes
33
+ routes_path = File.join("#{Rails.root}/config/routes.rb")
34
34
  routes_path = File.join("#{HELPER_RAILS_ROOT}/config/routes.rb") unless File.exists?(routes_path)
35
35
 
36
36
  load File.join(routes_path)
@@ -26,5 +26,5 @@ silence_warnings {RAILS_ENV = ENV['RAILS_ENV']}
26
26
  class Test::Unit::TestCase #:nodoc:
27
27
  self.use_transactional_fixtures = true
28
28
  self.use_instantiated_fixtures = false
29
- self.fixture_path = "#{RAILS_ROOT}/../fixtures"
29
+ self.fixture_path = "#{Rails.root}/../fixtures"
30
30
  end
@@ -48,14 +48,14 @@ class PluginTestHelperTest < Test::Unit::TestCase
48
48
  def test_should_load_with_migration
49
49
  setup_app('with_migration')
50
50
 
51
- ActiveRecord::Migrator.migrate("#{RAILS_ROOT}/db/migrate")
51
+ ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
52
52
  assert Person.table_exists?
53
53
  end
54
54
 
55
55
  def test_should_load_with_fixtures
56
56
  setup_app('with_fixtures')
57
57
 
58
- ActiveRecord::Migrator.migrate("#{RAILS_ROOT}/db/migrate")
58
+ ActiveRecord::Migrator.migrate("#{Rails.root}/db/migrate")
59
59
 
60
60
  fixtures_path = "#{File.dirname(__FILE__)}/../fixtures"
61
61
  Dir.glob("#{fixtures_path}/*.yml").each do |fixture_file|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: plugin_test_helper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Pfeifer
@@ -9,7 +9,7 @@ autorequire: plugin_test_helper
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-05 00:00:00 -04:00
12
+ date: 2008-06-22 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -22,76 +22,93 @@ extensions: []
22
22
  extra_rdoc_files: []
23
23
 
24
24
  files:
25
- - generators/plugin_test_migration
26
- - generators/plugin_test_migration/templates
27
- - generators/plugin_test_migration/templates/migration.rb
28
- - generators/plugin_test_migration/plugin_test_migration_generator.rb
25
+ - generators/plugin_test_console
26
+ - generators/plugin_test_console/plugin_test_console_generator.rb
27
+ - generators/plugin_test_console/templates
28
+ - generators/plugin_test_console/templates/console
29
+ - generators/plugin_test_helper
30
+ - generators/plugin_test_helper/templates
31
+ - generators/plugin_test_helper/templates/test_helper.rb
32
+ - generators/plugin_test_helper/plugin_test_helper_generator.rb
29
33
  - generators/plugin_test_structure
30
34
  - generators/plugin_test_structure/templates
31
35
  - generators/plugin_test_structure/templates/app_root
36
+ - generators/plugin_test_structure/templates/app_root/app
37
+ - generators/plugin_test_structure/templates/app_root/app/controllers
38
+ - generators/plugin_test_structure/templates/app_root/app/controllers/application.rb
39
+ - generators/plugin_test_structure/templates/app_root/lib
32
40
  - generators/plugin_test_structure/templates/app_root/config
33
- - generators/plugin_test_structure/templates/app_root/config/routes.rb
34
41
  - generators/plugin_test_structure/templates/app_root/config/environment.rb
35
- - generators/plugin_test_structure/templates/app_root/config/boot.rb
36
42
  - generators/plugin_test_structure/templates/app_root/config/environments
37
- - generators/plugin_test_structure/templates/app_root/config/environments/sqlite.rb
38
- - generators/plugin_test_structure/templates/app_root/config/environments/sqlite3.rb
39
- - generators/plugin_test_structure/templates/app_root/config/environments/in_memory.rb
40
43
  - generators/plugin_test_structure/templates/app_root/config/environments/mysql.rb
44
+ - generators/plugin_test_structure/templates/app_root/config/environments/sqlite3.rb
45
+ - generators/plugin_test_structure/templates/app_root/config/environments/sqlite.rb
41
46
  - generators/plugin_test_structure/templates/app_root/config/environments/postgresql.rb
47
+ - generators/plugin_test_structure/templates/app_root/config/environments/in_memory.rb
48
+ - generators/plugin_test_structure/templates/app_root/config/boot.rb
49
+ - generators/plugin_test_structure/templates/app_root/config/routes.rb
42
50
  - generators/plugin_test_structure/templates/app_root/config/database.yml
43
- - generators/plugin_test_structure/templates/app_root/app
44
- - generators/plugin_test_structure/templates/app_root/app/controllers
45
- - generators/plugin_test_structure/templates/app_root/app/controllers/application.rb
46
- - generators/plugin_test_structure/templates/app_root/lib
51
+ - generators/plugin_test_structure/templates/app_root/log
47
52
  - generators/plugin_test_structure/plugin_test_structure_generator.rb
53
+ - generators/plugin_test_migration
54
+ - generators/plugin_test_migration/templates
55
+ - generators/plugin_test_migration/templates/migration.rb
56
+ - generators/plugin_test_migration/plugin_test_migration_generator.rb
48
57
  - generators/plugin_test_controller
49
58
  - generators/plugin_test_controller/templates
50
- - generators/plugin_test_controller/templates/view.html.erb
51
59
  - generators/plugin_test_controller/templates/controller.rb
60
+ - generators/plugin_test_controller/templates/view.html.erb
52
61
  - generators/plugin_test_controller/plugin_test_controller_generator.rb
53
62
  - generators/plugin_test_model
63
+ - generators/plugin_test_model/plugin_test_model_generator.rb
54
64
  - generators/plugin_test_model/templates
55
65
  - generators/plugin_test_model/templates/model.rb
56
66
  - generators/plugin_test_model/templates/fixtures.yml
57
67
  - generators/plugin_test_model/templates/migration.rb
58
- - generators/plugin_test_model/plugin_test_model_generator.rb
59
- - generators/plugin_test_console
60
- - generators/plugin_test_console/templates
61
- - generators/plugin_test_console/templates/console
62
- - generators/plugin_test_console/plugin_test_console_generator.rb
63
- - generators/plugin_test_helper
64
- - generators/plugin_test_helper/templates
65
- - generators/plugin_test_helper/templates/test_helper.rb
66
- - generators/plugin_test_helper/plugin_test_helper_generator.rb
67
68
  - lib/plugin_test_helper.rb
68
69
  - lib/plugin_test_helper
69
- - lib/plugin_test_helper/plugin_locator.rb
70
- - lib/plugin_test_helper/generator.rb
71
70
  - lib/plugin_test_helper/console_with_fixtures.rb
71
+ - lib/plugin_test_helper/plugin_locator.rb
72
72
  - lib/plugin_test_helper/extensions
73
- - lib/plugin_test_helper/extensions/initializer.rb
74
73
  - lib/plugin_test_helper/extensions/routing.rb
74
+ - lib/plugin_test_helper/extensions/initializer.rb
75
+ - lib/plugin_test_helper/generator.rb
76
+ - test/app_root
75
77
  - test/fixtures
76
78
  - test/fixtures/people.yml
77
- - test/app_root
78
79
  - test/functional
79
80
  - test/functional/plugin_test_helper_test.rb
80
81
  - test/test_helper.rb
81
82
  - test/app_roots
82
- - test/app_roots/empty
83
- - test/app_roots/empty/empty
83
+ - test/app_roots/with_model
84
+ - test/app_roots/with_model/app
85
+ - test/app_roots/with_model/app/models
86
+ - test/app_roots/with_model/app/models/person.rb
84
87
  - test/app_roots/with_migration
85
- - test/app_roots/with_migration/db
86
- - test/app_roots/with_migration/db/migrate
87
- - test/app_roots/with_migration/db/migrate/001_create_people.rb
88
88
  - test/app_roots/with_migration/app
89
89
  - test/app_roots/with_migration/app/models
90
90
  - test/app_roots/with_migration/app/models/person.rb
91
- - test/app_roots/with_custom_application_controller
92
- - test/app_roots/with_custom_application_controller/app
93
- - test/app_roots/with_custom_application_controller/app/controllers
94
- - test/app_roots/with_custom_application_controller/app/controllers/application.rb
91
+ - test/app_roots/with_migration/db
92
+ - test/app_roots/with_migration/db/migrate
93
+ - test/app_roots/with_migration/db/migrate/001_create_people.rb
94
+ - test/app_roots/with_routes
95
+ - test/app_roots/with_routes/config
96
+ - test/app_roots/with_routes/config/routes.rb
97
+ - test/app_roots/with_fixtures
98
+ - test/app_roots/with_fixtures/app
99
+ - test/app_roots/with_fixtures/app/models
100
+ - test/app_roots/with_fixtures/app/models/person.rb
101
+ - test/app_roots/with_fixtures/db
102
+ - test/app_roots/with_fixtures/db/migrate
103
+ - test/app_roots/with_fixtures/db/migrate/001_create_people.rb
104
+ - test/app_roots/with_helper
105
+ - test/app_roots/with_helper/app
106
+ - test/app_roots/with_helper/app/helpers
107
+ - test/app_roots/with_helper/app/helpers/people_helper.rb
108
+ - test/app_roots/with_controller
109
+ - test/app_roots/with_controller/app
110
+ - test/app_roots/with_controller/app/controllers
111
+ - test/app_roots/with_controller/app/controllers/people_controller.rb
95
112
  - test/app_roots/with_custom_config
96
113
  - test/app_roots/with_custom_config/vendor
97
114
  - test/app_roots/with_custom_config/vendor/plugins
@@ -101,28 +118,12 @@ files:
101
118
  - test/app_roots/with_custom_config/vendor/plugins/acts_as_foo/lib/acts_as_foo.rb
102
119
  - test/app_roots/with_custom_config/config
103
120
  - test/app_roots/with_custom_config/config/environment.rb
104
- - test/app_roots/with_helper
105
- - test/app_roots/with_helper/app
106
- - test/app_roots/with_helper/app/helpers
107
- - test/app_roots/with_helper/app/helpers/people_helper.rb
108
- - test/app_roots/with_model
109
- - test/app_roots/with_model/app
110
- - test/app_roots/with_model/app/models
111
- - test/app_roots/with_model/app/models/person.rb
112
- - test/app_roots/with_controller
113
- - test/app_roots/with_controller/app
114
- - test/app_roots/with_controller/app/controllers
115
- - test/app_roots/with_controller/app/controllers/people_controller.rb
116
- - test/app_roots/with_routes
117
- - test/app_roots/with_routes/config
118
- - test/app_roots/with_routes/config/routes.rb
119
- - test/app_roots/with_fixtures
120
- - test/app_roots/with_fixtures/db
121
- - test/app_roots/with_fixtures/db/migrate
122
- - test/app_roots/with_fixtures/db/migrate/001_create_people.rb
123
- - test/app_roots/with_fixtures/app
124
- - test/app_roots/with_fixtures/app/models
125
- - test/app_roots/with_fixtures/app/models/person.rb
121
+ - test/app_roots/empty
122
+ - test/app_roots/empty/empty
123
+ - test/app_roots/with_custom_application_controller
124
+ - test/app_roots/with_custom_application_controller/app
125
+ - test/app_roots/with_custom_application_controller/app/controllers
126
+ - test/app_roots/with_custom_application_controller/app/controllers/application.rb
126
127
  - test/unit
127
128
  - test/unit/plugin_locator_test.rb
128
129
  - CHANGELOG
@@ -152,7 +153,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
153
  requirements: []
153
154
 
154
155
  rubyforge_project:
155
- rubygems_version: 1.1.0
156
+ rubygems_version: 1.1.1
156
157
  signing_key:
157
158
  specification_version: 2
158
159
  summary: Simplifies plugin testing by creating an isolated Rails environment that simulates its usage in a real application.