plugin_test_helper 0.3.0 → 0.3.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.
@@ -1,5 +1,11 @@
1
1
  == master
2
2
 
3
+ == 0.3.1 / 2010-03-07
4
+
5
+ * Release gems via rake-gemcutter instead of rubyforge
6
+ * Fix HELPER_RAILS_ROOT path resulting in incorrect load_once_paths in Ruby 1.9+
7
+ * Update migration template to match Rails template
8
+
3
9
  == 0.3.0 / 2009-04-13
4
10
 
5
11
  * Fix environment being loaded twice when generators are loaded
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2006-2009 Aaron Pfeifer
1
+ Copyright (c) 2006-2010 Aaron Pfeifer
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/Rakefile CHANGED
@@ -1,13 +1,15 @@
1
+ require 'rubygems'
2
+ require 'rake'
1
3
  require 'rake/testtask'
2
4
  require 'rake/rdoctask'
3
5
  require 'rake/gempackagetask'
4
- require 'rake/contrib/sshpublisher'
5
6
 
6
7
  spec = Gem::Specification.new do |s|
7
8
  s.name = 'plugin_test_helper'
8
- s.version = '0.3.0'
9
+ s.version = '0.3.1'
9
10
  s.platform = Gem::Platform::RUBY
10
11
  s.summary = 'Simplifies plugin testing by creating an isolated Rails environment that simulates its usage in a real application.'
12
+ s.description = s.summary
11
13
 
12
14
  s.files = FileList['{generators,lib,test}/**/*'] + %w(CHANGELOG.rdoc LICENSE Rakefile README.rdoc) - FileList['generators/plugin_test_structure/templates/app_root/{log,log/*,script,script/*}']
13
15
  s.require_path = 'lib'
@@ -52,20 +54,27 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
52
54
  rdoc.options << '--line-numbers' << '--inline-source'
53
55
  rdoc.rdoc_files.include('README.rdoc', 'CHANGELOG.rdoc', 'LICENSE', 'lib/**/*.rb')
54
56
  end
55
-
57
+
58
+ desc 'Generate a gemspec file.'
59
+ task :gemspec do
60
+ File.open("#{spec.name}.gemspec", 'w') do |f|
61
+ f.write spec.to_ruby
62
+ end
63
+ end
64
+
56
65
  Rake::GemPackageTask.new(spec) do |p|
57
66
  p.gem_spec = spec
58
- p.need_tar = true
59
- p.need_zip = true
60
67
  end
61
68
 
62
69
  desc 'Publish the beta gem.'
63
70
  task :pgem => [:package] do
71
+ require 'rake/contrib/sshpublisher'
64
72
  Rake::SshFilePublisher.new('aaron@pluginaweek.org', '/home/aaron/gems.pluginaweek.org/public/gems', 'pkg', "#{spec.name}-#{spec.version}.gem").upload
65
73
  end
66
74
 
67
75
  desc 'Publish the API documentation.'
68
76
  task :pdoc => [:rdoc] do
77
+ require 'rake/contrib/sshpublisher'
69
78
  Rake::SshDirPublisher.new('aaron@pluginaweek.org', "/home/aaron/api.pluginaweek.org/public/#{spec.name}", 'rdoc').upload
70
79
  end
71
80
 
@@ -74,15 +83,8 @@ task :publish => [:pgem, :pdoc, :release]
74
83
 
75
84
  desc 'Publish the release files to RubyForge.'
76
85
  task :release => [:gem, :package] do
77
- require 'rubyforge'
78
-
79
- ruby_forge = RubyForge.new.configure
80
- ruby_forge.login
86
+ require 'rake/gemcutter'
81
87
 
82
- %w(gem tgz zip).each do |ext|
83
- file = "pkg/#{spec.name}-#{spec.version}.#{ext}"
84
- puts "Releasing #{File.basename(file)}..."
85
-
86
- ruby_forge.add_release(spec.rubyforge_project, spec.name, spec.version, file)
87
- end
88
+ Rake::Gemcutter::Tasks.new(spec)
89
+ Rake::Task['gem:push'].invoke
88
90
  end
@@ -3,6 +3,9 @@ class <%= migration_name %> < ActiveRecord::Migration
3
3
  create_table :<%= table_name %> do |t|
4
4
  <% for attribute in attributes -%>
5
5
  t.<%= attribute.type %> :<%= attribute.name %>
6
+ <% end -%>
7
+ <% unless options[:skip_timestamps] %>
8
+ t.timestamps
6
9
  <% end -%>
7
10
  end
8
11
  end
@@ -1,5 +1,5 @@
1
1
  # Make sure our default RAILS_ROOT from the helper plugin is in the load path
2
- HELPER_RAILS_ROOT = "#{File.dirname(__FILE__)}/../generators/plugin_test_structure/templates/app_root" unless defined?(HELPER_RAILS_ROOT)
2
+ HELPER_RAILS_ROOT = File.expand_path('../generators/plugin_test_structure/templates/app_root', File.dirname(__FILE__)) unless defined?(HELPER_RAILS_ROOT)
3
3
  $:.unshift(HELPER_RAILS_ROOT)
4
4
 
5
5
  # Determine the plugin's root test directory and add it to the load path
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.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aaron Pfeifer
@@ -9,11 +9,11 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-04-13 00:00:00 -04:00
12
+ date: 2010-03-07 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
16
- description:
16
+ description: Simplifies plugin testing by creating an isolated Rails environment that simulates its usage in a real application.
17
17
  email: aaron@pluginaweek.org
18
18
  executables: []
19
19
 
@@ -22,128 +22,74 @@ extensions: []
22
22
  extra_rdoc_files: []
23
23
 
24
24
  files:
25
- - generators/plugin_test_console
26
- - generators/plugin_test_console/templates
27
- - generators/plugin_test_console/templates/console
28
- - generators/plugin_test_console/plugin_test_console_generator.rb
29
- - generators/plugin_test_console/USAGE
30
- - generators/plugin_test_model
31
- - generators/plugin_test_model/templates
32
- - generators/plugin_test_model/templates/migration.rb
33
- - generators/plugin_test_model/templates/fixtures.yml
34
- - generators/plugin_test_model/templates/model.rb
35
- - generators/plugin_test_model/plugin_test_model_generator.rb
36
- - generators/plugin_test_model/USAGE
37
- - generators/plugin_test_helper
38
- - generators/plugin_test_helper/templates
39
- - generators/plugin_test_helper/templates/test_helper.rb
40
- - generators/plugin_test_helper/plugin_test_helper_generator.rb
41
- - generators/plugin_test_helper/USAGE
42
- - generators/plugin_test_structure
43
- - generators/plugin_test_structure/templates
44
- - generators/plugin_test_structure/templates/test_helper.rb
45
- - generators/plugin_test_structure/templates/app_root
46
- - generators/plugin_test_structure/templates/app_root/lib
25
+ - generators/plugin_test_controller/USAGE
26
+ - generators/plugin_test_controller/plugin_test_controller_generator.rb
27
+ - generators/plugin_test_controller/templates/view.html.erb
28
+ - generators/plugin_test_controller/templates/controller.rb
29
+ - generators/plugin_test_structure/USAGE
30
+ - generators/plugin_test_structure/plugin_test_structure_generator.rb
47
31
  - generators/plugin_test_structure/templates/app_root/lib/console_with_fixtures.rb
48
- - generators/plugin_test_structure/templates/app_root/config
32
+ - generators/plugin_test_structure/templates/app_root/app/controllers/application_controller.rb
33
+ - generators/plugin_test_structure/templates/app_root/config/boot.rb
49
34
  - generators/plugin_test_structure/templates/app_root/config/environment.rb
50
- - generators/plugin_test_structure/templates/app_root/config/environments
51
- - generators/plugin_test_structure/templates/app_root/config/environments/in_memory.rb
35
+ - generators/plugin_test_structure/templates/app_root/config/routes.rb
52
36
  - generators/plugin_test_structure/templates/app_root/config/environments/sqlite.rb
53
37
  - generators/plugin_test_structure/templates/app_root/config/environments/postgresql.rb
54
- - generators/plugin_test_structure/templates/app_root/config/environments/sqlite3.rb
38
+ - generators/plugin_test_structure/templates/app_root/config/environments/in_memory.rb
55
39
  - generators/plugin_test_structure/templates/app_root/config/environments/mysql.rb
56
- - generators/plugin_test_structure/templates/app_root/config/boot.rb
40
+ - generators/plugin_test_structure/templates/app_root/config/environments/sqlite3.rb
57
41
  - generators/plugin_test_structure/templates/app_root/config/database.yml
58
- - generators/plugin_test_structure/templates/app_root/config/routes.rb
59
- - generators/plugin_test_structure/templates/app_root/app
60
- - generators/plugin_test_structure/templates/app_root/app/controllers
61
- - generators/plugin_test_structure/templates/app_root/app/controllers/application_controller.rb
62
- - generators/plugin_test_structure/plugin_test_structure_generator.rb
63
- - generators/plugin_test_structure/USAGE
64
- - generators/plugin_test_controller
65
- - generators/plugin_test_controller/templates
66
- - generators/plugin_test_controller/templates/view.html.erb
67
- - generators/plugin_test_controller/templates/controller.rb
68
- - generators/plugin_test_controller/plugin_test_controller_generator.rb
69
- - generators/plugin_test_controller/USAGE
70
- - generators/plugin_test_migration
71
- - generators/plugin_test_migration/templates
72
- - generators/plugin_test_migration/templates/migration.rb
73
- - generators/plugin_test_migration/USAGE
42
+ - generators/plugin_test_structure/templates/test_helper.rb
74
43
  - generators/plugin_test_migration/plugin_test_migration_generator.rb
75
- - lib/plugin_test_helper.rb
76
- - lib/plugin_test_helper
44
+ - generators/plugin_test_migration/USAGE
45
+ - generators/plugin_test_migration/templates/migration.rb
46
+ - generators/plugin_test_console/USAGE
47
+ - generators/plugin_test_console/plugin_test_console_generator.rb
48
+ - generators/plugin_test_console/templates/console
49
+ - generators/plugin_test_helper/USAGE
50
+ - generators/plugin_test_helper/plugin_test_helper_generator.rb
51
+ - generators/plugin_test_helper/templates/test_helper.rb
52
+ - generators/plugin_test_model/USAGE
53
+ - generators/plugin_test_model/plugin_test_model_generator.rb
54
+ - generators/plugin_test_model/templates/fixtures.yml
55
+ - generators/plugin_test_model/templates/model.rb
56
+ - generators/plugin_test_model/templates/migration.rb
77
57
  - lib/plugin_test_helper/plugin_locator.rb
78
- - lib/plugin_test_helper/extensions
79
- - lib/plugin_test_helper/extensions/configuration.rb
80
58
  - lib/plugin_test_helper/generator.rb
81
59
  - lib/plugin_test_helper/console_with_fixtures.rb
82
- - test/fixtures
83
- - test/fixtures/people.yml
84
- - test/test_helper.rb
85
- - test/functional
86
- - test/functional/plugin_test_migration_generator_test.rb
87
- - test/functional/plugin_test_structure_generator_test.rb
88
- - test/functional/plugin_test_model_generator_test.rb
89
- - test/functional/plugin_test_helper_test.rb
90
- - test/functional/plugin_test_console_generator_test.rb
91
- - test/functional/plugin_test_controller_generator_test.rb
92
- - test/functional/plugin_test_helper_generator_test.rb
93
- - test/app_roots
94
- - test/app_roots/empty
60
+ - lib/plugin_test_helper/extensions/configuration.rb
61
+ - lib/plugin_test_helper.rb
62
+ - test/unit/plugin_locator_test.rb
63
+ - test/app_roots/with_custom_application_controller/app/controllers/application_controller.rb
64
+ - test/app_roots/with_helper/app/helpers/people_helper.rb
65
+ - test/app_roots/with_custom_config/vendor/plugins/acts_as_foo/init.rb
66
+ - test/app_roots/with_custom_config/vendor/plugins/acts_as_foo/lib/acts_as_foo.rb
67
+ - test/app_roots/with_custom_config/config/environment.rb
95
68
  - test/app_roots/empty/empty
96
- - test/app_roots/with_fixtures
97
- - test/app_roots/with_fixtures/db
98
- - test/app_roots/with_fixtures/db/migrate
99
69
  - test/app_roots/with_fixtures/db/migrate/001_create_people.rb
100
- - test/app_roots/with_fixtures/app
101
- - test/app_roots/with_fixtures/app/models
102
70
  - test/app_roots/with_fixtures/app/models/person.rb
103
- - test/app_roots/with_controller
104
- - test/app_roots/with_controller/app
105
- - test/app_roots/with_controller/app/controllers
106
71
  - test/app_roots/with_controller/app/controllers/people_controller.rb
107
- - test/app_roots/with_custom_config
108
- - test/app_roots/with_custom_config/config
109
- - test/app_roots/with_custom_config/config/environment.rb
110
- - test/app_roots/with_custom_config/vendor
111
- - test/app_roots/with_custom_config/vendor/plugins
112
- - test/app_roots/with_custom_config/vendor/plugins/acts_as_foo
113
- - test/app_roots/with_custom_config/vendor/plugins/acts_as_foo/lib
114
- - test/app_roots/with_custom_config/vendor/plugins/acts_as_foo/lib/acts_as_foo.rb
115
- - test/app_roots/with_custom_config/vendor/plugins/acts_as_foo/init.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_helper
120
- - test/app_roots/with_helper/app
121
- - test/app_roots/with_helper/app/helpers
122
- - test/app_roots/with_helper/app/helpers/people_helper.rb
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_controller.rb
127
- - test/app_roots/with_model
128
- - test/app_roots/with_model/app
129
- - test/app_roots/with_model/app/models
130
72
  - test/app_roots/with_model/app/models/person.rb
131
- - test/app_roots/with_migration
132
- - test/app_roots/with_migration/db
133
- - test/app_roots/with_migration/db/migrate
73
+ - test/app_roots/with_routes/config/routes.rb
134
74
  - test/app_roots/with_migration/db/migrate/001_create_people.rb
135
- - test/app_roots/with_migration/app
136
- - test/app_roots/with_migration/app/models
137
75
  - test/app_roots/with_migration/app/models/person.rb
138
- - test/unit
139
- - test/unit/plugin_locator_test.rb
140
- - test/app_root
76
+ - test/test_helper.rb
77
+ - test/fixtures/people.yml
78
+ - test/functional/plugin_test_console_generator_test.rb
79
+ - test/functional/plugin_test_helper_generator_test.rb
80
+ - test/functional/plugin_test_controller_generator_test.rb
81
+ - test/functional/plugin_test_model_generator_test.rb
82
+ - test/functional/plugin_test_migration_generator_test.rb
83
+ - test/functional/plugin_test_structure_generator_test.rb
84
+ - test/functional/plugin_test_helper_test.rb
141
85
  - CHANGELOG.rdoc
142
86
  - LICENSE
143
87
  - Rakefile
144
88
  - README.rdoc
145
89
  has_rdoc: true
146
90
  homepage: http://www.pluginaweek.org
91
+ licenses: []
92
+
147
93
  post_install_message:
148
94
  rdoc_options: []
149
95
 
@@ -164,16 +110,16 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
110
  requirements: []
165
111
 
166
112
  rubyforge_project: pluginaweek
167
- rubygems_version: 1.3.1
113
+ rubygems_version: 1.3.5
168
114
  signing_key:
169
- specification_version: 2
115
+ specification_version: 3
170
116
  summary: Simplifies plugin testing by creating an isolated Rails environment that simulates its usage in a real application.
171
117
  test_files:
118
+ - test/unit/plugin_locator_test.rb
119
+ - test/functional/plugin_test_console_generator_test.rb
120
+ - test/functional/plugin_test_helper_generator_test.rb
121
+ - test/functional/plugin_test_controller_generator_test.rb
122
+ - test/functional/plugin_test_model_generator_test.rb
172
123
  - test/functional/plugin_test_migration_generator_test.rb
173
124
  - test/functional/plugin_test_structure_generator_test.rb
174
- - test/functional/plugin_test_model_generator_test.rb
175
125
  - test/functional/plugin_test_helper_test.rb
176
- - test/functional/plugin_test_console_generator_test.rb
177
- - test/functional/plugin_test_controller_generator_test.rb
178
- - test/functional/plugin_test_helper_generator_test.rb
179
- - test/unit/plugin_locator_test.rb