autotest-spec 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: c1f461e3d214e313f5e07af4d50b1b8ebd1afe7a
4
+ data.tar.gz: 78683f0cab2cec20a302c283308d4e585cf8d4a3
5
+ SHA512:
6
+ metadata.gz: 587ca1b296d661f62567082489f4586c3c7212e6b7f68fed98554480c6a153c745a494ae779d4c99b7ecbd7b21173df2265be9206f18f1c181f80b5191c6b63d
7
+ data.tar.gz: 68b3fa370d503f33c981473cb269217ad0265aac2adcdb76332e3e3f030b14cfb45eeacc0faf90c3300847e732dcb7e9dce67f6d6b1ce3831923e753a2e98ac9
data/.autotest ADDED
@@ -0,0 +1,8 @@
1
+ # -*- ruby -*-
2
+
3
+ require "autotest/restart"
4
+ require "autotest/spec"
5
+
6
+ Autotest.add_hook :initialize do |at|
7
+ at.testlib = "minitest/autorun"
8
+ end
data/.gitignore ADDED
@@ -0,0 +1,3 @@
1
+ doc
2
+ pkg
3
+ Gemfile.lock
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in git-duo.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Teo Ljungberg
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,54 @@
1
+ autotest-spec
2
+ ===============
3
+
4
+ Enable specs in Autotest
5
+
6
+ Description
7
+ -----------
8
+
9
+ Autotest plugin to enable spec-style test filenames.
10
+
11
+ Usage
12
+ -----
13
+
14
+ Install the gem:
15
+
16
+ $ gem install autotest-spec
17
+
18
+ Add the following line to your `.autotest` file:
19
+
20
+ require "autotest/spec"
21
+
22
+ Now you can name your test files using the spec convention of `foo_spec.rb`
23
+
24
+ Contributing
25
+ ------------
26
+
27
+ After checking out the source, run:
28
+
29
+ $ rake newb
30
+
31
+ This task will install any missing dependencies, and run the tests.
32
+ Now you are ready to create and submit a patch.
33
+
34
+ Create an issue or pull request on the
35
+ [teoljungberg/autotest-spec](https://github.com/teoljungberg/autotest-spec) repo
36
+ that links to a branch on your repo or a gist of your patch.
37
+
38
+ ## Contributing
39
+
40
+ 1. Fork it
41
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
42
+
43
+ After checking out the source, run:
44
+
45
+ ```bash
46
+ $ rake newb
47
+ ````
48
+
49
+ This task will install any missing dependencies, and run the tests.
50
+ Now you are ready to create and submit a patch.
51
+
52
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
53
+ 4. Push to the branch (`git push origin my-new-feature`)
54
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ desc 'Setup a new dev computer'
4
+ task newb: [:install_deps, :install] do
5
+ puts
6
+ puts 'Happy hacking'
7
+ end
8
+
9
+ task :install_deps do
10
+ puts '--- installing dependencies'
11
+ system 'bundle install'
12
+ end
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "autotest-spec"
7
+ spec.version = "0.0.1"
8
+ spec.authors = ["Teo Ljungberg"]
9
+ spec.email = ["teo.ljungberg@gmail.com"]
10
+ spec.description = %q{Autotest plugin to enable spec-style test filenames.}
11
+ spec.summary = %q{Enable specs in Autotest}
12
+
13
+ spec.homepage = "https://github.com/teoljungberg/autotest-spec"
14
+ spec.license = "MIT"
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "minitest"
23
+ spec.add_development_dependency "rake"
24
+ end
@@ -0,0 +1,3 @@
1
+ Autotest.add_discovery do
2
+ "spec" if Dir.glob("spec/**/*_spec.rb").length > 0
3
+ end
@@ -0,0 +1,17 @@
1
+ require "autotest"
2
+
3
+ class Autotest::Spec < Autotest
4
+ def initialize # :nodoc:
5
+ super
6
+
7
+ clear_mappings
8
+
9
+ add_mapping %r%^lib/(.*)\.rb$% do |_, m|
10
+ files_matching %r%^spec/#{m[1]}.*_spec.rb$%
11
+ end
12
+
13
+ add_mapping %r%^spec/.*_spec\.rb$% do |filename, _|
14
+ filename
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,8 @@
1
+ require 'autotest/spec'
2
+ require 'minitest/spec'
3
+
4
+ describe Autotest::Spec do
5
+ it 'tests sanity' do
6
+ assert 'I SEE YOU!'
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: autotest-spec
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Teo Ljungberg
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-03-17 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: minitest
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Autotest plugin to enable spec-style test filenames.
56
+ email:
57
+ - teo.ljungberg@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - ".autotest"
63
+ - ".gitignore"
64
+ - Gemfile
65
+ - LICENSE.txt
66
+ - README.md
67
+ - Rakefile
68
+ - autotest-spec.gemspec
69
+ - lib/autotest/discover.rb
70
+ - lib/autotest/spec.rb
71
+ - spec/autotest/suffix_spec.rb
72
+ homepage: https://github.com/teoljungberg/autotest-spec
73
+ licenses:
74
+ - MIT
75
+ metadata: {}
76
+ post_install_message:
77
+ rdoc_options: []
78
+ require_paths:
79
+ - lib
80
+ required_ruby_version: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ">="
83
+ - !ruby/object:Gem::Version
84
+ version: '0'
85
+ required_rubygems_version: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ requirements: []
91
+ rubyforge_project:
92
+ rubygems_version: 2.2.2
93
+ signing_key:
94
+ specification_version: 4
95
+ summary: Enable specs in Autotest
96
+ test_files:
97
+ - spec/autotest/suffix_spec.rb