autowow 0.14.2 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1772e8f14876452fcd7f01fd22a7bc774df0b4d1888bbc900c24e6760e57631c
4
- data.tar.gz: 43a04aafdc84035ac82c261b558c5d869c897db60f7852583063f0a6e418aa0c
3
+ metadata.gz: 6977709b3e48a722cc54f85c27effaa49f989e4d5ca55008b2e6f51fbeba7b2d
4
+ data.tar.gz: 33bcead4d992b17cc1ce4153e42c9c18c56e8cd93dacc4247892ac42cb477467
5
5
  SHA512:
6
- metadata.gz: ff463b9060794391491c326930794cd728a48b8212c060252f60dd290d2e90b0d88787872dc255810a76701bc6ffe944ed533f6186a0cd8cb23f38a2fef326cf
7
- data.tar.gz: 6e666d0e67a8e5d3071725042dc0115c91c6f6ac6b18dacd8a3b786e3e8ea75c491cf3f785742eb83c47798fa934e083da541d9bd365e62d85fde2bf4a8533bf
6
+ metadata.gz: 6f3ac3780f7dea271e7db8870d3bbc624ee0cc72c328b65dabeddee069f8d0989dd9009757a1224e5b11b061a1235366c1483887a8beeee3d8bef73e6b391cd2
7
+ data.tar.gz: 0a3b8b6d70db9df67e189c5de59ad63cba5efe635d1fb6e7c3e0ef70a1235e7c527e6a871af75a9b42abad1d3e314ef42f0469287291fdf1803978a250e0ff8a
data/.gitignore CHANGED
@@ -1,14 +1,14 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
-
11
- # rspec failure tracking
12
- .rspec_status
13
-
14
- .idea
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+
11
+ # rspec failure tracking
12
+ .rspec_status
13
+
14
+ .idea
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --format documentation
2
- --color
1
+ --format documentation
2
+ --color
@@ -1,119 +1,119 @@
1
- AllCops:
2
- DisabledByDefault: true
3
- DisplayCopNames: true
4
- Exclude:
5
- - doc/**/*
6
- - vendor/**/*
7
- - spec/fixtures/**/*
8
- - "*.gemspec"
9
- - Gemfile*
10
- TargetRubyVersion: 2.3
11
- Layout/CaseIndentation:
12
- Enabled: true
13
- IndentOneStep: false
14
- Layout/EmptyLineBetweenDefs:
15
- Enabled: true
16
- AllowAdjacentOneLineDefs: true
17
- Layout/EmptyLines:
18
- Enabled: true
19
- Layout/EmptyLinesAroundBeginBody:
20
- Enabled: true
21
- Layout/EmptyLinesAroundBlockBody:
22
- Enabled: true
23
- EnforcedStyle: no_empty_lines
24
- Layout/EmptyLinesAroundClassBody:
25
- Enabled: true
26
- Layout/EmptyLinesAroundMethodBody:
27
- Enabled: true
28
- Layout/EmptyLinesAroundModuleBody:
29
- Enabled: true
30
- Layout/ExtraSpacing:
31
- Exclude:
32
- - Gemfile
33
- Layout/FirstParameterIndentation:
34
- Enabled: true
35
- Layout/IndentationConsistency:
36
- Enabled: true
37
- Layout/IndentationWidth:
38
- Enabled: true
39
- Exclude:
40
- - spec/**/*
41
- Layout/MultilineMethodCallIndentation:
42
- EnforcedStyle: indented_relative_to_receiver
43
- IndentationWidth: 2
44
- Layout/MultilineOperationIndentation:
45
- EnforcedStyle: indented
46
- Layout/SpaceAfterColon:
47
- Enabled: true
48
- Layout/SpaceAfterComma:
49
- Enabled: true
50
- Layout/SpaceAroundEqualsInParameterDefault:
51
- Enabled: true
52
- Layout/SpaceAroundKeyword:
53
- Enabled: true
54
- Layout/SpaceAroundOperators:
55
- Enabled: true
56
- Layout/SpaceBeforeBlockBraces:
57
- Enabled: true
58
- Layout/SpaceBeforeFirstArg:
59
- Enabled: true
60
- Layout/SpaceInsideBlockBraces:
61
- Enabled: true
62
- Layout/SpaceInsideHashLiteralBraces:
63
- Enabled: true
64
- Layout/SpaceInsideParens:
65
- Enabled: true
66
- Layout/Tab:
67
- Enabled: true
68
- Layout/TrailingBlankLines:
69
- Enabled: true
70
- Layout/TrailingWhitespace:
71
- Enabled: true
72
- Lint/EndAlignment:
73
- Enabled: true
74
- EnforcedStyleAlignWith: variable
75
- Lint/RequireParentheses:
76
- Enabled: true
77
- Metrics/AbcSize:
78
- Max: 62
79
- Metrics/ClassLength:
80
- CountComments: false
81
- Max: 1000
82
- Metrics/LineLength:
83
- Exclude:
84
- - spec/**/*
85
- Max: 318
86
- Metrics/MethodLength:
87
- Max: 70
88
- Metrics/ModuleLength:
89
- CountComments: false
90
- Max: 1000
91
- Rails:
92
- Enabled: true
93
- Style/AndOr:
94
- EnforcedStyle: conditionals
95
- Style/BlockDelimiters:
96
- EnforcedStyle: braces_for_chaining
97
- Style/BracesAroundHashParameters:
98
- Enabled: true
99
- EnforcedStyle: context_dependent
100
- Style/ConditionalAssignment:
101
- EnforcedStyle: assign_to_condition
102
- Style/HashSyntax:
103
- Enabled: true
104
- Style/MethodDefParentheses:
105
- Enabled: true
106
- Style/RedundantReturn:
107
- AllowMultipleReturnValues: true
108
- Enabled: true
109
- Style/RegexpLiteral:
110
- EnforcedStyle: percent_r
111
- Style/Semicolon:
112
- AllowAsExpressionSeparator: true
113
- Enabled: true
114
- Style/StringLiterals:
115
- Enabled: true
116
- EnforcedStyle: double_quotes
117
- Style/TrivialAccessors:
118
- Enabled: true
1
+ AllCops:
2
+ DisabledByDefault: true
3
+ DisplayCopNames: true
4
+ Exclude:
5
+ - doc/**/*
6
+ - vendor/**/*
7
+ - spec/fixtures/**/*
8
+ - "*.gemspec"
9
+ - Gemfile*
10
+ TargetRubyVersion: 2.3
11
+ Layout/CaseIndentation:
12
+ Enabled: true
13
+ IndentOneStep: false
14
+ Layout/EmptyLineBetweenDefs:
15
+ Enabled: true
16
+ AllowAdjacentOneLineDefs: true
17
+ Layout/EmptyLines:
18
+ Enabled: true
19
+ Layout/EmptyLinesAroundBeginBody:
20
+ Enabled: true
21
+ Layout/EmptyLinesAroundBlockBody:
22
+ Enabled: true
23
+ EnforcedStyle: no_empty_lines
24
+ Layout/EmptyLinesAroundClassBody:
25
+ Enabled: true
26
+ Layout/EmptyLinesAroundMethodBody:
27
+ Enabled: true
28
+ Layout/EmptyLinesAroundModuleBody:
29
+ Enabled: true
30
+ Layout/ExtraSpacing:
31
+ Exclude:
32
+ - Gemfile
33
+ Layout/FirstParameterIndentation:
34
+ Enabled: true
35
+ Layout/IndentationConsistency:
36
+ Enabled: true
37
+ Layout/IndentationWidth:
38
+ Enabled: true
39
+ Exclude:
40
+ - spec/**/*
41
+ Layout/MultilineMethodCallIndentation:
42
+ EnforcedStyle: indented_relative_to_receiver
43
+ IndentationWidth: 2
44
+ Layout/MultilineOperationIndentation:
45
+ EnforcedStyle: indented
46
+ Layout/SpaceAfterColon:
47
+ Enabled: true
48
+ Layout/SpaceAfterComma:
49
+ Enabled: true
50
+ Layout/SpaceAroundEqualsInParameterDefault:
51
+ Enabled: true
52
+ Layout/SpaceAroundKeyword:
53
+ Enabled: true
54
+ Layout/SpaceAroundOperators:
55
+ Enabled: true
56
+ Layout/SpaceBeforeBlockBraces:
57
+ Enabled: true
58
+ Layout/SpaceBeforeFirstArg:
59
+ Enabled: true
60
+ Layout/SpaceInsideBlockBraces:
61
+ Enabled: true
62
+ Layout/SpaceInsideHashLiteralBraces:
63
+ Enabled: true
64
+ Layout/SpaceInsideParens:
65
+ Enabled: true
66
+ Layout/Tab:
67
+ Enabled: true
68
+ Layout/TrailingBlankLines:
69
+ Enabled: true
70
+ Layout/TrailingWhitespace:
71
+ Enabled: true
72
+ Lint/EndAlignment:
73
+ Enabled: true
74
+ EnforcedStyleAlignWith: variable
75
+ Lint/RequireParentheses:
76
+ Enabled: true
77
+ Metrics/AbcSize:
78
+ Max: 62
79
+ Metrics/ClassLength:
80
+ CountComments: false
81
+ Max: 1000
82
+ Metrics/LineLength:
83
+ Exclude:
84
+ - spec/**/*
85
+ Max: 318
86
+ Metrics/MethodLength:
87
+ Max: 70
88
+ Metrics/ModuleLength:
89
+ CountComments: false
90
+ Max: 1000
91
+ Rails:
92
+ Enabled: true
93
+ Style/AndOr:
94
+ EnforcedStyle: conditionals
95
+ Style/BlockDelimiters:
96
+ EnforcedStyle: braces_for_chaining
97
+ Style/BracesAroundHashParameters:
98
+ Enabled: true
99
+ EnforcedStyle: context_dependent
100
+ Style/ConditionalAssignment:
101
+ EnforcedStyle: assign_to_condition
102
+ Style/HashSyntax:
103
+ Enabled: true
104
+ Style/MethodDefParentheses:
105
+ Enabled: true
106
+ Style/RedundantReturn:
107
+ AllowMultipleReturnValues: true
108
+ Enabled: true
109
+ Style/RegexpLiteral:
110
+ EnforcedStyle: percent_r
111
+ Style/Semicolon:
112
+ AllowAsExpressionSeparator: true
113
+ Enabled: true
114
+ Style/StringLiterals:
115
+ Enabled: true
116
+ EnforcedStyle: double_quotes
117
+ Style/TrivialAccessors:
118
+ Enabled: true
119
119
  ExactNameMatch: true
@@ -1,11 +1,11 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.4.1
5
- before_install:
6
- - gem install bundler -v 1.15.3
7
- # To have access to the whole repo
8
- - git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
9
- - git fetch --unshallow --tags
10
- # To no longer be in a detached HEAD state
11
- - git symbolic-ref --short HEAD || git checkout -b ${TRAVIS_BRANCH}-test $TRAVIS_BRANCH
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.4.1
5
+ before_install:
6
+ - gem install bundler -v 1.15.3
7
+ # To have access to the whole repo
8
+ - git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
9
+ - git fetch --unshallow --tags
10
+ # To no longer be in a detached HEAD state
11
+ - git symbolic-ref --short HEAD || git checkout -b ${TRAVIS_BRANCH}-test $TRAVIS_BRANCH
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in autowow.gemspec
6
- gemspec
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in autowow.gemspec
6
+ gemspec
data/Guardfile CHANGED
@@ -1,22 +1,22 @@
1
- guard "bundler" do
2
- watch("Gemfile")
3
- watch(%r{^(.+)\.gemspec$})
4
- end
5
-
6
- rspec_prefix = File.file?("bin/spring") ? "bundle exec spring" : "bundle exec"
7
- guard "rspec", cmd: "#{rspec_prefix} rspec #{ENV['FOCUS']}", all_after_pass: ENV["FOCUS"].nil? do
8
- watch(%r{^spec/.+_spec\.rb$})
9
- watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
10
- watch("spec/spec_helper.rb") { "spec" }
11
-
12
- watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
13
- watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
14
- watch(%r{^app/models/(.+)\.rb$}) { |m| "spec/builders/#{m[1]}_builder_spec.rb" }
15
- watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
16
- watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
17
- watch(%r{^spec/factories/(.+)\.rb$}) { "spec" }
18
- watch("config/routes.rb") { "spec/routing" }
19
- watch("app/controllers/application_controller.rb") { "spec/controllers" }
20
-
21
- watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
22
- end
1
+ guard "bundler" do
2
+ watch("Gemfile")
3
+ watch(%r{^(.+)\.gemspec$})
4
+ end
5
+
6
+ rspec_prefix = File.file?("bin/spring") ? "bundle exec spring" : "bundle exec"
7
+ guard "rspec", cmd: "#{rspec_prefix} rspec #{ENV['FOCUS']}", all_after_pass: ENV["FOCUS"].nil? do
8
+ watch(%r{^spec/.+_spec\.rb$})
9
+ watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
10
+ watch("spec/spec_helper.rb") { "spec" }
11
+
12
+ watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
13
+ watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
14
+ watch(%r{^app/models/(.+)\.rb$}) { |m| "spec/builders/#{m[1]}_builder_spec.rb" }
15
+ watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
16
+ watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
17
+ watch(%r{^spec/factories/(.+)\.rb$}) { "spec" }
18
+ watch("config/routes.rb") { "spec/routing" }
19
+ watch("app/controllers/application_controller.rb") { "spec/controllers" }
20
+
21
+ watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
22
+ end
@@ -1,21 +1,21 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2017 Csaba Apagyi
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Csaba Apagyi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  #### Set of commands to [auto]mate [w]ay [o]f [w]orking
4
4
 
5
5
  <!--- Version informartion -->
6
- *You are viewing the README of version [v0.14.2](https://github.com/thisismydesign/autowow/releases/tag/v0.14.2). You can find other releases [here](https://github.com/thisismydesign/autowow/releases).*
6
+ *You are viewing the README of version [v0.15.0](https://github.com/thisismydesign/autowow/releases/tag/v0.15.0). You can find other releases [here](https://github.com/thisismydesign/autowow/releases).*
7
7
  <!--- Version informartion end -->
8
8
 
9
9
  | Branch | Status |
@@ -137,6 +137,12 @@ Prerequisites: on master
137
137
 
138
138
  * Runs `rubocop` in parallel mode, autocorrects offenses on single thread
139
139
 
140
+ #### Ruby check
141
+
142
+ `aw rc` / `autowow ruby_check`
143
+
144
+ * Runs `aw rpa && bundle exec rspec && git status`
145
+
140
146
  #### Bundle exec
141
147
 
142
148
  `aw be <cmd>` / `autowow bundle_exec <cmd>`
data/Rakefile CHANGED
@@ -1,59 +1,59 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require "logger"
4
- @logger = Logger.new(STDOUT)
5
-
6
- RSpec::Core::RakeTask.new(:spec)
7
-
8
- desc "Check if source can be required and is correctly required"
9
- task :require do
10
- dir = File.dirname(__FILE__)
11
- gemspec = load_gemspec(dir)
12
-
13
- # Order is important, assert_can_be_required should be run first
14
- assert_can_be_required(dir, gemspec)
15
- check_source_files_required(dir, gemspec)
16
- check_source_files_included(dir, gemspec)
17
- end
18
-
19
- def load_gemspec(dir)
20
- require "bundler/setup"
21
- Gem::Specification.find do |spec|
22
- spec.full_gem_path.include?(File.dirname(__FILE__))
23
- end
24
- end
25
-
26
- def check_source_files_required(dir, gemspec)
27
- require_gem(gemspec)
28
- ruby_files = Dir.glob("#{dir}/**/*.rb").reject { |f| f.include?("/spec/") }
29
- required_ruby_files = $LOADED_FEATURES.select { |f| f.include?(dir) }
30
- (ruby_files - required_ruby_files).each do |file|
31
- @logger.warn("Source file not required when loading gem: #{file.sub("#{dir}/", '')}")
32
- end
33
- end
34
-
35
- def check_source_files_included(dir, gemspec)
36
- ruby_files_relative = Dir.glob("#{dir}/**/*.rb").reject { |f| f.include?("/spec/") }.map { |f| f.sub("#{dir}/", "") }
37
- (ruby_files_relative - gemspec.files.select { |f| f.end_with?(".rb") }).each do |file|
38
- @logger.warn("File ignored when building gem because it's not added to git: #{file}")
39
- end
40
- end
41
-
42
- def assert_can_be_required(dir, gemspec)
43
- local_load_paths = $LOAD_PATH.select { |path| path.include?(dir) }
44
- $LOAD_PATH.reject! { |path| local_load_paths.include?(path) }
45
- begin
46
- require_gem(gemspec)
47
- rescue LoadError => e
48
- @logger.error("Gem source cannot be required relatively: #{e}")
49
- raise
50
- ensure
51
- $LOAD_PATH.push(*local_load_paths)
52
- end
53
- end
54
-
55
- def require_gem(gemspec)
56
- require_relative "lib/#{gemspec.name.gsub('-', '/')}"
57
- end
58
-
59
- task default: [:require, :spec]
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+ require "logger"
4
+ @logger = Logger.new(STDOUT)
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ desc "Check if source can be required and is correctly required"
9
+ task :require do
10
+ dir = File.dirname(__FILE__)
11
+ gemspec = load_gemspec(dir)
12
+
13
+ # Order is important, assert_can_be_required should be run first
14
+ assert_can_be_required(dir, gemspec)
15
+ check_source_files_required(dir, gemspec)
16
+ check_source_files_included(dir, gemspec)
17
+ end
18
+
19
+ def load_gemspec(dir)
20
+ require "bundler/setup"
21
+ Gem::Specification.find do |spec|
22
+ spec.full_gem_path.include?(File.dirname(__FILE__))
23
+ end
24
+ end
25
+
26
+ def check_source_files_required(dir, gemspec)
27
+ require_gem(gemspec)
28
+ ruby_files = Dir.glob("#{dir}/**/*.rb").reject { |f| f.include?("/spec/") }
29
+ required_ruby_files = $LOADED_FEATURES.select { |f| f.include?(dir) }
30
+ (ruby_files - required_ruby_files).each do |file|
31
+ @logger.warn("Source file not required when loading gem: #{file.sub("#{dir}/", '')}")
32
+ end
33
+ end
34
+
35
+ def check_source_files_included(dir, gemspec)
36
+ ruby_files_relative = Dir.glob("#{dir}/**/*.rb").reject { |f| f.include?("/spec/") }.map { |f| f.sub("#{dir}/", "") }
37
+ (ruby_files_relative - gemspec.files.select { |f| f.end_with?(".rb") }).each do |file|
38
+ @logger.warn("File ignored when building gem because it's not added to git: #{file}")
39
+ end
40
+ end
41
+
42
+ def assert_can_be_required(dir, gemspec)
43
+ local_load_paths = $LOAD_PATH.select { |path| path.include?(dir) }
44
+ $LOAD_PATH.reject! { |path| local_load_paths.include?(path) }
45
+ begin
46
+ require_gem(gemspec)
47
+ rescue LoadError => e
48
+ @logger.error("Gem source cannot be required relatively: #{e}")
49
+ raise
50
+ ensure
51
+ $LOAD_PATH.push(*local_load_paths)
52
+ end
53
+ end
54
+
55
+ def require_gem(gemspec)
56
+ require_relative "lib/#{gemspec.name.gsub('-', '/')}"
57
+ end
58
+
59
+ task default: [:require, :spec]