guard-konacha-rails 1.1.3 → 1.1.4

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
  SHA1:
3
- metadata.gz: a8a890c50cbc98c75a40a6a632ffdeb3197ace6c
4
- data.tar.gz: 0ba84c984b6fbd45262c6db966cfd116feac996d
3
+ metadata.gz: eec06e6ac7c9abf20b8587b9c73647c3db60c27a
4
+ data.tar.gz: 9dff5d18b7c1063752c32f78c07f3c7853d867be
5
5
  SHA512:
6
- metadata.gz: d678ac2a87d5e23843710345a382651a274190b9046725ee35658e799f2d2cdc8b81bafcbe222d5a3b2859a4cf06c50c557e018ebeca70491ee5b8bd48f587fe
7
- data.tar.gz: 7153ee6184bf06f9f466dc818dc4fdcf92655af7bf61b612e819702f5b65d35726e5d81b72f0ec66982aac17e9f60d15073ba45b79a89be89694d2159568ee1a
6
+ metadata.gz: ef342bdcd95db0b8f365860e1a565277eaf747c758c3edd6f59eb4a9f6341e321064c906822f1314841896785b14f9bf75590addec4f64ebd5b0db2e25720b05
7
+ data.tar.gz: 54e7ad80446d9713f97ab2588525716aeb21956f1060fb1ebbfe1a8117e82744c603ab160733bc34e92a245babb7d39175531852be278a15a6e1f252ce6ad993
data/.travis.yml CHANGED
@@ -1,9 +1,9 @@
1
1
  language: ruby
2
- before_install:
3
- - travis_retry gem install bundler
4
2
  rvm:
3
+ - 1.9.3
5
4
  - 2.0.0
6
- - 2.1
5
+ - 2.1.5
6
+ - 2.2.0
7
7
  - ruby-head
8
8
  - jruby
9
9
  - rbx-2
data/Gemfile CHANGED
@@ -1,6 +1,4 @@
1
- source 'http://rubygems.org'
2
-
3
- gem 'rdoc'
1
+ source 'https://rubygems.org'
4
2
 
5
3
  # Specify your gem's dependencies in guard-konacha-rails.gemspec
6
4
  gemspec
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2014 Leonid Beder
3
+ Copyright (c) 2015 Leonid Beder
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy of
6
6
  this software and associated documentation files (the "Software"), to deal in
data/Readme.md CHANGED
@@ -1,4 +1,4 @@
1
- # Rediska
1
+ # guard-konacha-rails
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/guard-konacha-rails.png)](http://badge.fury.io/rb/guard-konacha-rails)
4
4
  [![Build Status](https://travis-ci.org/lbeder/guard-konacha-rails.png)](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
- gem 'guard-konacha-rails'
15
+ group :development do
16
+ gem 'guard-konacha-rails'
17
+ end
16
18
  ```
17
19
 
18
- Then run:
20
+ Then add the configuration to the Guardfile:
19
21
 
20
22
  ```bash
21
- $ bundle install
23
+ $ bundle exec guard init konacha-rails
22
24
  ```
23
25
 
24
- Otherwise install the gem:
26
+ Then to run:
25
27
 
26
28
  ```bash
27
- $ gem install guard-konacha-rails
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
+ ```
@@ -1,9 +1,11 @@
1
- $:.push File.expand_path('../lib', __FILE__)
2
- require 'guard/konacha/rails/version'
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::KonachaRails::VERSION
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("\n")
16
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
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.2'
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
@@ -2,7 +2,7 @@ require 'rails'
2
2
  require 'konacha'
3
3
 
4
4
  module Guard
5
- module KonachaRails
5
+ class KonachaRails
6
6
  class Formatter < ::Konacha::Formatter
7
7
  def initialize
8
8
  super($stdout)
@@ -1,5 +1,5 @@
1
1
  module Guard
2
- module KonachaRails
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::Konacha Initialized'
28
+ UI.info 'Guard::KonachaRails Initialized'
29
29
  end
30
30
 
31
31
  def start
@@ -1,7 +1,7 @@
1
1
  require 'rack/builder'
2
2
 
3
3
  module Guard
4
- module KonachaRails
4
+ class KonachaRails
5
5
  class Server < ::Rack::Builder
6
6
  def self.new
7
7
  super do
@@ -1,10 +1,10 @@
1
- ### Guard::Konacha
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 :konacha do
8
- watch(%r{^app/assets/javascripts/(.*)\.js(\.coffee)?$}) { |m| "#{m[1]}_spec.js" }
9
- watch(%r{^spec/javascripts/.+_spec(\.js|\.js\.coffee)$})
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,5 @@
1
+ module Guard
2
+ module KonachaRailsVersion
3
+ VERSION = '1.1.4'.freeze
4
+ end
5
+ 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
@@ -1,8 +1,8 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe Guard::Konacha do
3
+ describe Guard::KonachaRails do
4
4
  rails_env_file = File.expand_path('../../dummy/config/environment', __FILE__)
5
- subject { Guard::Konacha.new(rails_environment_file: rails_env_file) }
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::Konacha.new(rails_environment_file: nil, spec_dir: 'spec/assets')
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
@@ -3,7 +3,7 @@ ENV['RAILS_ENV'] ||= 'test'
3
3
  require 'rspec'
4
4
  require 'coveralls'
5
5
  require 'timecop'
6
- require 'guard/konacha'
6
+ require 'guard/konacha-rails'
7
7
  require 'guard/compat/test/helper'
8
8
 
9
9
  Coveralls.wear!
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.3
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-03 00:00:00.000000000 Z
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.2'
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.2'
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/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
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
@@ -1,5 +0,0 @@
1
- module Guard
2
- module KonachaRails
3
- VERSION = '1.1.3'.freeze
4
- end
5
- end