autotest-rails 4.1.0

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.
@@ -0,0 +1,3 @@
1
+ �N����ےY���
2
+ ׹�B9�,-�� �'�g^� ���#�і�03n�nk?/���j�[)�8R'&���݊�Z$���4�I��"2�� Q6-%9=�?� �G쑘���B�ۃM�SaI��-� 1�oW���e�B���U����˶`x�Nj��B>6�� �y7̧��7��HQ�����k�}]��#'�Bс���%��J�V;� ���8Mb\�������5����c��&�_���٣7g
3
+ �tb�
@@ -0,0 +1,23 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'autotest/restart'
4
+
5
+ # Autotest.add_hook :initialize do |at|
6
+ # at.extra_files << "../some/external/dependency.rb"
7
+ #
8
+ # at.libs << ":../some/external"
9
+ #
10
+ # at.add_exception 'vendor'
11
+ #
12
+ # at.add_mapping(/dependency.rb/) do |f, _|
13
+ # at.files_matching(/test_.*rb$/)
14
+ # end
15
+ #
16
+ # %w(TestA TestB).each do |klass|
17
+ # at.extra_class_map[klass] = "test/test_misc.rb"
18
+ # end
19
+ # end
20
+
21
+ # Autotest.add_hook :run_command do |at|
22
+ # system "rake build"
23
+ # end
@@ -0,0 +1,5 @@
1
+ === 4.1.0 / 2009-06-03
2
+
3
+ * 1 major enhancement
4
+
5
+ * Birthday! well... split from ZenTest
@@ -0,0 +1,9 @@
1
+ .autotest
2
+ History.txt
3
+ Manifest.txt
4
+ README.txt
5
+ Rakefile
6
+ lib/autotest/discover.rb
7
+ lib/autotest/fixtures.rb
8
+ lib/autotest/migrate.rb
9
+ lib/autotest/rails.rb
@@ -0,0 +1,49 @@
1
+ = autotest-rails
2
+
3
+ * http://rubyforge.org/projects/zentest
4
+
5
+ == DESCRIPTION:
6
+
7
+ This is an autotest plugin to provide rails support. It provides basic
8
+ rails support and extra plugins for migrations and fixtures.
9
+
10
+ == FEATURES/PROBLEMS:
11
+
12
+ * same old plugin you know and love. Just in its own package now.
13
+
14
+ == SYNOPSIS:
15
+
16
+ There is no synopsis. This just works.
17
+
18
+ == REQUIREMENTS:
19
+
20
+ * ZenTest for autotest
21
+
22
+ == INSTALL:
23
+
24
+ * sudo gem install autotest-rails
25
+
26
+ == LICENSE:
27
+
28
+ (The MIT License)
29
+
30
+ Copyright (c) 2009 Ryan Davis, seattle.rb
31
+
32
+ Permission is hereby granted, free of charge, to any person obtaining
33
+ a copy of this software and associated documentation files (the
34
+ 'Software'), to deal in the Software without restriction, including
35
+ without limitation the rights to use, copy, modify, merge, publish,
36
+ distribute, sublicense, and/or sell copies of the Software, and to
37
+ permit persons to whom the Software is furnished to do so, subject to
38
+ the following conditions:
39
+
40
+ The above copyright notice and this permission notice shall be
41
+ included in all copies or substantial portions of the Software.
42
+
43
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
44
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
45
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
46
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
47
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
48
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
49
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,14 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'hoe'
5
+
6
+ Hoe.spec 'autotest-rails' do
7
+ developer('Ryan Davis', 'ryand-ruby@zenspider.com')
8
+
9
+ self.rubyforge_name = 'zentest'
10
+
11
+ extra_deps << 'ZenTest'
12
+ end
13
+
14
+ # vim: syntax=ruby
@@ -0,0 +1,5 @@
1
+ Autotest.add_discovery do
2
+ style = []
3
+ style << "rails" if File.exist? 'config/environment.rb'
4
+ style
5
+ end
@@ -0,0 +1,12 @@
1
+ # -*- ruby -*-
2
+
3
+ # This is an example of how to change the mappings of file that
4
+ # changed to tests to run for a project.
5
+
6
+ module Autotest::Fixtures
7
+ Autotest.add_hook :initialize do |at|
8
+ at.test_mappings['^test/fixtures/(.*)s.yml'] = proc { |filename, matches|
9
+ at.files_matching(/test\/\w+\/#{matches[1]}(_\w+)?.*_test.rb$/)
10
+ }
11
+ end
12
+ end
@@ -0,0 +1,7 @@
1
+ # -*- ruby -*-
2
+
3
+ module Autotest::Migrate
4
+ Autotest.add_hook(:run) do |autotest|
5
+ system "rake db:migrate" if autotest.class.to_s == "RailsAutotest"
6
+ end
7
+ end
@@ -0,0 +1,82 @@
1
+ require 'autotest'
2
+
3
+ class Autotest::Rails < Autotest
4
+ VERSION = '4.1.0'
5
+
6
+ def initialize # :nodoc:
7
+ super
8
+
9
+ add_exception %r%^\./(?:db|doc|log|public|script|tmp|vendor)%
10
+
11
+ clear_mappings
12
+
13
+ self.add_mapping(/^lib\/.*\.rb$/) do |filename, _|
14
+ impl = File.basename(filename, '.rb')
15
+ files_matching %r%^test/unit/#{impl}_test.rb$%
16
+ # TODO: (unit|functional|integration) maybe?
17
+ end
18
+
19
+ add_mapping %r%^test/fixtures/(.*)s.yml% do |_, m|
20
+ ["test/unit/#{m[1]}_test.rb",
21
+ "test/controllers/#{m[1]}_controller_test.rb",
22
+ "test/views/#{m[1]}_view_test.rb",
23
+ "test/functional/#{m[1]}_controller_test.rb"]
24
+ end
25
+
26
+ add_mapping %r%^test/(unit|integration|controllers|views|functional)/.*rb$% do |filename, _|
27
+ filename
28
+ end
29
+
30
+ add_mapping %r%^app/models/(.*)\.rb$% do |_, m|
31
+ "test/unit/#{m[1]}_test.rb"
32
+ end
33
+
34
+ add_mapping %r%^app/helpers/application_helper.rb% do
35
+ files_matching %r%^test/(views|functional)/.*_test\.rb$%
36
+ end
37
+
38
+ add_mapping %r%^app/helpers/(.*)_helper.rb% do |_, m|
39
+ if m[1] == "application" then
40
+ files_matching %r%^test/(views|functional)/.*_test\.rb$%
41
+ else
42
+ ["test/views/#{m[1]}_view_test.rb",
43
+ "test/functional/#{m[1]}_controller_test.rb"]
44
+ end
45
+ end
46
+
47
+ add_mapping %r%^app/views/(.*)/% do |_, m|
48
+ ["test/views/#{m[1]}_view_test.rb",
49
+ "test/functional/#{m[1]}_controller_test.rb"]
50
+ end
51
+
52
+ add_mapping %r%^app/controllers/(.*)\.rb$% do |_, m|
53
+ if m[1] == "application" then
54
+ files_matching %r%^test/(controllers|views|functional)/.*_test\.rb$%
55
+ else
56
+ ["test/controllers/#{m[1]}_test.rb",
57
+ "test/functional/#{m[1]}_test.rb"]
58
+ end
59
+ end
60
+
61
+ add_mapping %r%^app/views/layouts/% do
62
+ "test/views/layouts_view_test.rb"
63
+ end
64
+
65
+ add_mapping %r%^config/routes.rb$% do # FIX:
66
+ files_matching %r%^test/(controllers|views|functional)/.*_test\.rb$%
67
+ end
68
+
69
+ add_mapping %r%^test/test_helper.rb|config/((boot|environment(s/test)?).rb|database.yml)% do
70
+ files_matching %r%^test/(unit|controllers|views|functional)/.*_test\.rb$%
71
+ end
72
+ end
73
+
74
+ # Convert the pathname s to the name of class.
75
+ def path_to_classname(s)
76
+ sep = File::SEPARATOR
77
+ f = s.sub(/^test#{sep}((unit|functional|integration|views|controllers|helpers)#{sep})?/, '').sub(/\.rb$/, '').split(sep)
78
+ f = f.map { |path| path.split(/_/).map { |seg| seg.capitalize }.join }
79
+ f = f.map { |path| path =~ /Test$/ ? path : "#{path}Test" }
80
+ f.join('::')
81
+ end
82
+ end
metadata ADDED
@@ -0,0 +1,109 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: autotest-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 4.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Ryan Davis
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDPjCCAiagAwIBAgIBADANBgkqhkiG9w0BAQU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mIg7Cyqz23sLM4mCOoTGIy5OcZ8TdyiyINUHtb5ej/T
30
+ FBHgymkyj/AOSqKRIpXPhjC6
31
+ -----END CERTIFICATE-----
32
+
33
+ date: 2009-06-03 00:00:00 -07:00
34
+ default_executable:
35
+ dependencies:
36
+ - !ruby/object:Gem::Dependency
37
+ name: ZenTest
38
+ type: :runtime
39
+ version_requirement:
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ version: "0"
45
+ version:
46
+ - !ruby/object:Gem::Dependency
47
+ name: hoe
48
+ type: :development
49
+ version_requirement:
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 2.0.0
55
+ version:
56
+ description: |-
57
+ This is an autotest plugin to provide rails support. It provides basic
58
+ rails support and extra plugins for migrations and fixtures.
59
+ email:
60
+ - ryand-ruby@zenspider.com
61
+ executables: []
62
+
63
+ extensions: []
64
+
65
+ extra_rdoc_files:
66
+ - History.txt
67
+ - Manifest.txt
68
+ - README.txt
69
+ files:
70
+ - .autotest
71
+ - History.txt
72
+ - Manifest.txt
73
+ - README.txt
74
+ - Rakefile
75
+ - lib/autotest/discover.rb
76
+ - lib/autotest/fixtures.rb
77
+ - lib/autotest/migrate.rb
78
+ - lib/autotest/rails.rb
79
+ has_rdoc: true
80
+ homepage: http://rubyforge.org/projects/zentest
81
+ licenses: []
82
+
83
+ post_install_message:
84
+ rdoc_options:
85
+ - --main
86
+ - README.txt
87
+ require_paths:
88
+ - lib
89
+ required_ruby_version: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: "0"
94
+ version:
95
+ required_rubygems_version: !ruby/object:Gem::Requirement
96
+ requirements:
97
+ - - ">="
98
+ - !ruby/object:Gem::Version
99
+ version: "0"
100
+ version:
101
+ requirements: []
102
+
103
+ rubyforge_project: zentest
104
+ rubygems_version: 1.3.4
105
+ signing_key:
106
+ specification_version: 3
107
+ summary: This is an autotest plugin to provide rails support
108
+ test_files: []
109
+
Binary file