guard-konacha-rails 1.1.3 → 1.1.4
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.
- checksums.yaml +4 -4
- data/.travis.yml +3 -3
- data/Gemfile +1 -3
- data/LICENSE +1 -1
- data/Readme.md +9 -30
- data/guard-konacha-rails.gemspec +9 -7
- data/lib/guard/konacha-rails.rb +40 -0
- data/lib/guard/{konacha/rails → konacha-rails}/formatter.rb +1 -1
- data/lib/guard/{konacha/rails → konacha-rails}/runner.rb +2 -2
- data/lib/guard/{konacha/rails → konacha-rails}/server.rb +1 -1
- data/lib/guard/{konacha/rails → konacha-rails}/templates/Guardfile +4 -4
- data/lib/guard/konacha-rails/version.rb +5 -0
- data/spec/dummy/config/environments/test.rb +31 -0
- data/spec/guard/{konacha → konacha-rails}/rails/formatter_spec.rb +0 -0
- data/spec/guard/{konacha → konacha-rails}/rails/runner_spec.rb +0 -0
- data/spec/guard/{konacha → konacha-rails}/rails/server_spec.rb +0 -0
- data/spec/guard/konacha_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -1
- metadata +18 -16
- data/lib/guard/konacha.rb +0 -31
- data/lib/guard/konacha/rails/version.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eec06e6ac7c9abf20b8587b9c73647c3db60c27a
|
4
|
+
data.tar.gz: 9dff5d18b7c1063752c32f78c07f3c7853d867be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef342bdcd95db0b8f365860e1a565277eaf747c758c3edd6f59eb4a9f6341e321064c906822f1314841896785b14f9bf75590addec4f64ebd5b0db2e25720b05
|
7
|
+
data.tar.gz: 54e7ad80446d9713f97ab2588525716aeb21956f1060fb1ebbfe1a8117e82744c603ab160733bc34e92a245babb7d39175531852be278a15a6e1f252ce6ad993
|
data/.travis.yml
CHANGED
data/Gemfile
CHANGED
data/LICENSE
CHANGED
data/Readme.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# guard-konacha-rails
|
2
2
|
|
3
3
|
[](http://badge.fury.io/rb/guard-konacha-rails)
|
4
4
|
[](https://travis-ci.org/lbeder/guard-konacha-rails)
|
@@ -12,40 +12,19 @@ Automatically run your [Konacha](https://github.com/jfirebaugh/konacha) tests th
|
|
12
12
|
If you are using bundler add guard-konacha-rails to your Gemfile:
|
13
13
|
|
14
14
|
``` ruby
|
15
|
-
|
15
|
+
group :development do
|
16
|
+
gem 'guard-konacha-rails'
|
17
|
+
end
|
16
18
|
```
|
17
19
|
|
18
|
-
Then
|
20
|
+
Then add the configuration to the Guardfile:
|
19
21
|
|
20
22
|
```bash
|
21
|
-
$ bundle
|
23
|
+
$ bundle exec guard init konacha-rails
|
22
24
|
```
|
23
25
|
|
24
|
-
|
26
|
+
Then to run:
|
25
27
|
|
26
28
|
```bash
|
27
|
-
$
|
28
|
-
```
|
29
|
-
|
30
|
-
## License
|
31
|
-
|
32
|
-
The MIT License (MIT)
|
33
|
-
|
34
|
-
Copyright (c) 2013
|
35
|
-
|
36
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
37
|
-
this software and associated documentation files (the "Software"), to deal in
|
38
|
-
the Software without restriction, including without limitation the rights to
|
39
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
40
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
41
|
-
subject to the following conditions:
|
42
|
-
|
43
|
-
The above copyright notice and this permission notice shall be included in all
|
44
|
-
copies or substantial portions of the Software.
|
45
|
-
|
46
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
47
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
48
|
-
FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
49
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
50
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
51
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
29
|
+
$ bundle exec guard
|
30
|
+
```
|
data/guard-konacha-rails.gemspec
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'guard/konacha-rails/version'
|
3
5
|
|
4
6
|
Gem::Specification.new do |s|
|
5
7
|
s.name = 'guard-konacha-rails'
|
6
|
-
s.version = Guard::
|
8
|
+
s.version = Guard::KonachaRailsVersion::VERSION
|
7
9
|
s.platform = Gem::Platform::RUBY
|
8
10
|
s.authors = ['Leonid Beder']
|
9
11
|
s.email = ['leonid.beder@gmail.com']
|
@@ -12,13 +14,13 @@ Gem::Specification.new do |s|
|
|
12
14
|
s.summary = 'Guard plugin for the konacha testing framework'
|
13
15
|
s.description = 'Guard plugin for the konacha testing framework.'
|
14
16
|
|
15
|
-
s.files = `git ls-files`.split("\
|
16
|
-
s.
|
17
|
-
s.
|
17
|
+
s.files = `git ls-files -z`.split("\x0")
|
18
|
+
s.executables = s.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
18
20
|
s.require_paths = ['lib']
|
19
21
|
|
20
22
|
s.add_dependency 'guard', '>= 2'
|
21
|
-
s.add_dependency 'rails', '>= 4.
|
23
|
+
s.add_dependency 'rails', '>= 4.0'
|
22
24
|
s.add_dependency 'konacha', '>= 3.0'
|
23
25
|
s.add_dependency 'guard-compat'
|
24
26
|
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'guard/compat/plugin'
|
2
|
+
require 'rails'
|
3
|
+
require 'konacha'
|
4
|
+
|
5
|
+
module Guard
|
6
|
+
class KonachaRails < Plugin
|
7
|
+
require 'guard/konacha-rails/formatter'
|
8
|
+
require 'guard/konacha-rails/runner'
|
9
|
+
require 'guard/konacha-rails/server'
|
10
|
+
|
11
|
+
attr_accessor :runner
|
12
|
+
|
13
|
+
def initialize(options = {})
|
14
|
+
super
|
15
|
+
|
16
|
+
@runner = Guard::KonachaRails::Runner.new(options)
|
17
|
+
end
|
18
|
+
|
19
|
+
def start
|
20
|
+
runner.start
|
21
|
+
end
|
22
|
+
|
23
|
+
def run_all
|
24
|
+
runner.run
|
25
|
+
end
|
26
|
+
|
27
|
+
def run_on_changes(paths = [])
|
28
|
+
runner.run(paths)
|
29
|
+
end
|
30
|
+
|
31
|
+
def self.template(plugin_location)
|
32
|
+
File.read(template_path(plugin_location))
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.template_path(plugin_location)
|
36
|
+
# workaround because Guard discards the '-' when detecting template path
|
37
|
+
File.join(plugin_location, 'lib', 'guard', 'konacha-rails', 'templates', 'Guardfile')
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Guard
|
2
|
-
|
2
|
+
class KonachaRails
|
3
3
|
class Runner
|
4
4
|
DEFAULT_OPTIONS = {
|
5
5
|
run_all_on_start: true,
|
@@ -25,7 +25,7 @@ module Guard
|
|
25
25
|
|
26
26
|
::Konacha.mode = :runner
|
27
27
|
|
28
|
-
UI.info 'Guard::
|
28
|
+
UI.info 'Guard::KonachaRails Initialized'
|
29
29
|
end
|
30
30
|
|
31
31
|
def start
|
@@ -1,10 +1,10 @@
|
|
1
|
-
### Guard::
|
1
|
+
### Guard::KonachaRails
|
2
2
|
# available options:
|
3
3
|
# - :run_all_on_start, defaults to true
|
4
4
|
# - :notification, defaults to true
|
5
5
|
# - :rails_environment_file, location of rails environment file,
|
6
6
|
# should be able to find it automatically
|
7
|
-
guard
|
8
|
-
watch(%r{^app/assets/javascripts/(.*)\.js
|
9
|
-
watch(%r{^spec/javascripts/.+
|
7
|
+
guard 'konacha-rails' do
|
8
|
+
watch(%r{^app/assets/javascripts/(.*)\.(js|coffee)?$}) { |m| "#{m[1]}_spec.js" }
|
9
|
+
watch(%r{^(test|spec)/javascripts/.+_(test|spec)\.(js|coffee)$})
|
10
10
|
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# The test environment is used exclusively to run your application's
|
3
|
+
# test suite. You never need to work with it otherwise. Remember that
|
4
|
+
# your test database is "scratch space" for the test suite and is wiped
|
5
|
+
# and recreated between test runs. Don't rely on the data there!
|
6
|
+
config.cache_classes = true
|
7
|
+
|
8
|
+
# Do not eager load code on boot. This avoids loading your whole application
|
9
|
+
# just for the purpose of running a single test. If you are using a tool that
|
10
|
+
# preloads Rails for running tests, you may have to set it to true.
|
11
|
+
config.eager_load = false
|
12
|
+
|
13
|
+
# Configure static file server for tests with Cache-Control for performance.
|
14
|
+
config.serve_static_files = true
|
15
|
+
|
16
|
+
# Show full error reports and disable caching.
|
17
|
+
config.consider_all_requests_local = true
|
18
|
+
config.action_controller.perform_caching = false
|
19
|
+
|
20
|
+
# Raise exceptions instead of rendering exception templates.
|
21
|
+
config.action_dispatch.show_exceptions = false
|
22
|
+
|
23
|
+
# Disable request forgery protection in test environment.
|
24
|
+
config.action_controller.allow_forgery_protection = false
|
25
|
+
|
26
|
+
# Randomize the order test cases are executed.
|
27
|
+
config.active_support.test_order = :random
|
28
|
+
|
29
|
+
# Print deprecation notices to the stderr.
|
30
|
+
config.active_support.deprecation = :stderr
|
31
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
data/spec/guard/konacha_spec.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Guard::
|
3
|
+
describe Guard::KonachaRails do
|
4
4
|
rails_env_file = File.expand_path('../../dummy/config/environment', __FILE__)
|
5
|
-
subject { Guard::
|
5
|
+
subject { Guard::KonachaRails.new(rails_environment_file: rails_env_file) }
|
6
6
|
|
7
7
|
before do
|
8
8
|
# Silence UI.info output.
|
@@ -14,7 +14,7 @@ describe Guard::Konacha do
|
|
14
14
|
expect(Guard::KonachaRails::Runner).to receive(:new).with(rails_environment_file: nil,
|
15
15
|
spec_dir: 'spec/assets')
|
16
16
|
|
17
|
-
Guard::
|
17
|
+
Guard::KonachaRails.new(rails_environment_file: nil, spec_dir: 'spec/assets')
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: guard-konacha-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonid Beder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-02-
|
11
|
+
date: 2015-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '4.
|
33
|
+
version: '4.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '4.
|
40
|
+
version: '4.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: konacha
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,22 +137,23 @@ files:
|
|
137
137
|
- Rakefile
|
138
138
|
- Readme.md
|
139
139
|
- guard-konacha-rails.gemspec
|
140
|
-
- lib/guard/konacha.rb
|
141
|
-
- lib/guard/konacha
|
142
|
-
- lib/guard/konacha
|
143
|
-
- lib/guard/konacha
|
144
|
-
- lib/guard/konacha
|
145
|
-
- lib/guard/konacha
|
140
|
+
- lib/guard/konacha-rails.rb
|
141
|
+
- lib/guard/konacha-rails/formatter.rb
|
142
|
+
- lib/guard/konacha-rails/runner.rb
|
143
|
+
- lib/guard/konacha-rails/server.rb
|
144
|
+
- lib/guard/konacha-rails/templates/Guardfile
|
145
|
+
- lib/guard/konacha-rails/version.rb
|
146
146
|
- spec/dummy/config.ru
|
147
147
|
- spec/dummy/config/application.rb
|
148
148
|
- spec/dummy/config/boot.rb
|
149
149
|
- spec/dummy/config/environment.rb
|
150
150
|
- spec/dummy/config/environments/development.rb
|
151
|
+
- spec/dummy/config/environments/test.rb
|
151
152
|
- spec/dummy/config/initializers/konacha.rb
|
152
153
|
- spec/dummy/config/initializers/secret_token.rb
|
153
|
-
- spec/guard/konacha/rails/formatter_spec.rb
|
154
|
-
- spec/guard/konacha/rails/runner_spec.rb
|
155
|
-
- spec/guard/konacha/rails/server_spec.rb
|
154
|
+
- spec/guard/konacha-rails/rails/formatter_spec.rb
|
155
|
+
- spec/guard/konacha-rails/rails/runner_spec.rb
|
156
|
+
- spec/guard/konacha-rails/rails/server_spec.rb
|
156
157
|
- spec/guard/konacha_spec.rb
|
157
158
|
- spec/spec_helper.rb
|
158
159
|
homepage: https://github.com/lbeder/guard-konacha-rails
|
@@ -185,10 +186,11 @@ test_files:
|
|
185
186
|
- spec/dummy/config/boot.rb
|
186
187
|
- spec/dummy/config/environment.rb
|
187
188
|
- spec/dummy/config/environments/development.rb
|
189
|
+
- spec/dummy/config/environments/test.rb
|
188
190
|
- spec/dummy/config/initializers/konacha.rb
|
189
191
|
- spec/dummy/config/initializers/secret_token.rb
|
190
|
-
- spec/guard/konacha/rails/formatter_spec.rb
|
191
|
-
- spec/guard/konacha/rails/runner_spec.rb
|
192
|
-
- spec/guard/konacha/rails/server_spec.rb
|
192
|
+
- spec/guard/konacha-rails/rails/formatter_spec.rb
|
193
|
+
- spec/guard/konacha-rails/rails/runner_spec.rb
|
194
|
+
- spec/guard/konacha-rails/rails/server_spec.rb
|
193
195
|
- spec/guard/konacha_spec.rb
|
194
196
|
- spec/spec_helper.rb
|
data/lib/guard/konacha.rb
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
require 'guard/konacha/rails/formatter'
|
2
|
-
require 'guard/konacha/rails/runner'
|
3
|
-
require 'guard/konacha/rails/server'
|
4
|
-
|
5
|
-
require 'guard/compat/plugin'
|
6
|
-
require 'rails'
|
7
|
-
require 'konacha'
|
8
|
-
|
9
|
-
module Guard
|
10
|
-
class Konacha < Plugin
|
11
|
-
attr_accessor :runner
|
12
|
-
|
13
|
-
def initialize(options = {})
|
14
|
-
super
|
15
|
-
|
16
|
-
@runner = Guard::KonachaRails::Runner.new(options)
|
17
|
-
end
|
18
|
-
|
19
|
-
def start
|
20
|
-
runner.start
|
21
|
-
end
|
22
|
-
|
23
|
-
def run_all
|
24
|
-
runner.run
|
25
|
-
end
|
26
|
-
|
27
|
-
def run_on_changes(paths = [])
|
28
|
-
runner.run(paths)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|