dry_require_spec_helper 0.2.0

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: 414bd1950fc8fd80c9e4c615847ec3e68210dcf0
4
+ data.tar.gz: e5786a562073dea4b47f4327bc864aa23119fcf3
5
+ SHA512:
6
+ metadata.gz: 5bd8085b6d7d4c1e52671e860233d31aaa78c338a5f7e708ae7fb1b0ee68e6e996796a6975bb8415fabc053ba75c5cc8d298490fbc0381824f08abe4ec95ceaf
7
+ data.tar.gz: 6cc8e8cbb39e231da0d67108efce567d4f41712a46bf9cb39ec6e9a547ff3a948bc88691e577fb58aae4505f7647033cc90d0b83d8842c95e28c359d4f4dd376
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (c) 2015 Koichi ITO
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # dry_require_spec_helper
2
+
3
+ DRY (Don't Repeat Yourself) of `require 'spec_helper'`.
4
+
5
+ ## FEATURES
6
+
7
+ * append `--require spec_helper` to .rspec file.
8
+ * remove `require 'spec_helper'` from spec files (i.e. `./spec/**/*.rb` in your current working directory) .
9
+
10
+ ## HOW TO USE
11
+
12
+ ```
13
+ > cd /path/to/dir # recommended git repository
14
+ > dry_require_spec_helper # *** immediate effect ***
15
+ ```
16
+
17
+ ## REQUIREMENTS
18
+
19
+ no requirements
20
+
21
+ ## INSTALL
22
+
23
+ Add these lines to your application's Gemfile:
24
+
25
+ ```
26
+ gem 'dry_require_spec_helper'
27
+ ```
28
+
29
+ And then execute:
30
+
31
+ ```
32
+ $ bundle
33
+ ```
34
+
35
+ Or install it yourself as:
36
+
37
+ ```
38
+ $ gem install dry_require_spec_helper
39
+ ```
40
+
41
+ ## LICENCE
42
+
43
+ The MIT Licence
44
+
45
+ ## Contributing
46
+
47
+ 1. Fork it
48
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
49
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
50
+ 4. Push to the branch (`git push origin my-new-feature`)
51
+ 5. Create new Pull Request
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ unless File.exist?('.rspec')
4
+ puts 'dry_require_spec_helper: .rspec: No such file or directory'
5
+
6
+ exit 1
7
+ end
8
+
9
+ File.open('.rspec', 'a') {|file| file.write("--require spec_helper\n") }
10
+
11
+ Dir['./spec/**/*.rb'].each do |path|
12
+ source = File.read(path)
13
+
14
+ next unless /require +('spec_helper'|"spec_helper")\n*/ === source
15
+
16
+ source.gsub!($&, '')
17
+
18
+ File.open(path, 'w+') {|f| f.write(source) }
19
+ end
@@ -0,0 +1,3 @@
1
+ module DryRequireSpecHelper
2
+ VERSION = '0.2.0'
3
+ end
@@ -0,0 +1 @@
1
+ module DryRequireSpecHelper; end
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dry_require_spec_helper
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ platform: ruby
6
+ authors:
7
+ - Koichi ITO
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-06-16 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: DRY (Don't Repeat Yourself) of require 'spec_helper'.
14
+ email: koic.ito@gmail.com
15
+ executables:
16
+ - dry_require_spec_helper
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - LICENSE
21
+ - README.md
22
+ - bin/dry_require_spec_helper
23
+ - lib/dry_require_spec_helper.rb
24
+ - lib/dry_require_spec_helper/version.rb
25
+ homepage: http://github.com/koic/dry_require_spec_helper
26
+ licenses:
27
+ - MIT
28
+ metadata: {}
29
+ post_install_message:
30
+ rdoc_options: []
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: 2.0.0
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubyforge_project:
45
+ rubygems_version: 2.4.5
46
+ signing_key:
47
+ specification_version: 4
48
+ summary: DRY (Don't Repeat Yourself) of require 'spec_helper'.
49
+ test_files: []