guard-rack 2.2.0 → 2.2.1

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
- SHA1:
3
- metadata.gz: 1027a4c30df921126d63d31e33a24640bb0324f2
4
- data.tar.gz: d41f10eab3a4f8e824963a2554438887112d4827
2
+ SHA256:
3
+ metadata.gz: 53c0864f391556b9e375ed32de234b7022ca68b7227bad2a2c3ccf5c5ddf9789
4
+ data.tar.gz: 40fb4b8846aaff09318f9d7569ac5e9c26ab04be5145ce2ae308aa71fb31f10b
5
5
  SHA512:
6
- metadata.gz: 17708fee8472eb67659aea02a64821f3a4b125b81539e147518bd9aaabf524fdcc04ea419df9c8cce122a5aafc481861229072297ee3437d584db5450f630232
7
- data.tar.gz: d23e966a7226cc183d3040cc23492b09be2ccc4beeaca75ca2e40c88c1be313f41611c55ea518748b5be4d98f4f709c884ee8562d0bbcd7d1720cfa098236c1b
6
+ metadata.gz: 462a0378b92a5f30293bc83b332713e7383140a44ba38799134e3eaf2ce8251a49176d627fd342b366129c5ceb98bd401d885ef3b937192bcc2dc5ab5a6f928f
7
+ data.tar.gz: 1f3fbb06a298748deca9ae015c5c7f02ddf93378010b3aa7438f3f3d0276f958485a07c90bd79072de2141069e84b677b9daf9bd9d8c64a4d910430867bd96c5
@@ -1,6 +1,12 @@
1
1
  AllCops:
2
- Excludes:
2
+ Exclude:
3
3
  - vendor/**
4
4
  - bin/**
5
5
 
6
+ Metrics:
7
+ Enabled: false
8
+
9
+ Style/Documentation:
10
+ Enabled: false
11
+
6
12
  inherit_from: .rubocop_todo.yml
@@ -1,33 +1,23 @@
1
- # This configuration was generated by `rubocop --auto-gen-config`
2
- # on 2015-01-01 18:05:17 -0500 using RuboCop version 0.27.1.
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2019-04-30 10:21:07 -0400 using RuboCop version 0.68.0.
3
4
  # The point is for the user to remove these configuration records
4
5
  # one by one as the offenses are removed from the code base.
5
6
  # Note that changes in the inspected code, or installation of new
6
7
  # versions of RuboCop, may require this file to be generated again.
7
8
 
8
- # Offense count: 2
9
- Metrics/AbcSize:
10
- Max: 25
11
-
12
- # Offense count: 14
13
- # Configuration parameters: AllowURI, URISchemes.
14
- Metrics/LineLength:
15
- Max: 155
16
-
17
- # Offense count: 2
18
- # Configuration parameters: CountComments.
19
- Metrics/MethodLength:
20
- Max: 17
21
-
22
- # Offense count: 3
23
- Style/Documentation:
24
- Enabled: false
25
-
26
9
  # Offense count: 1
27
- # Configuration parameters: Exclude.
28
- Style/FileName:
29
- Enabled: false
10
+ # Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
11
+ # AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
12
+ Naming/FileName:
13
+ Exclude:
14
+ - 'lib/guard-rack.rb'
30
15
 
31
- # Offense count: 3
32
- Style/RegexpLiteral:
33
- MaxSlashes: 0
16
+ # Offense count: 1
17
+ # Cop supports --auto-correct.
18
+ # Configuration parameters: AutoCorrect, EnforcedStyle, IgnoredMethods.
19
+ # SupportedStyles: predicate, comparison
20
+ Style/NumericPredicate:
21
+ Exclude:
22
+ - 'spec/**/*'
23
+ - 'lib/guard/rack/custom_process.rb'
@@ -1,9 +1,11 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.1.2
5
- - 1.9.3
6
- - jruby-19mode
4
+ - 2.4.0
5
+ - 2.3.3
6
+ - 2.5.3
7
+ - 2.6.3
8
+ - jruby
7
9
  - ruby-head
8
10
  - jruby-head
9
11
 
@@ -1,7 +1,12 @@
1
+ 2.2.1 (4/30/2019)
2
+ =================
3
+
4
+ * [#24](https://github.com/dblock/guard-rack/pull/24): Use absolute module namespace to prevent conflict with Guard::Process - [@cristianbica](https://github.com/cristianbica).
5
+
1
6
  2.2.0 (4/16/2016)
2
7
  =================
3
8
 
4
- * [#23](https://github.com/dblock/guard-rack/pull/23) Added Windows support - [@jonyeezs](https://github.com/jonyeezs).
9
+ * [#23](https://github.com/dblock/guard-rack/pull/23): Added Windows support - [@jonyeezs](https://github.com/jonyeezs).
5
10
 
6
11
  2.1.1 (03/07/2015)
7
12
  ============
data/Gemfile CHANGED
@@ -3,14 +3,14 @@ source 'http://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  gem 'ffi'
6
- gem 'spoon'
7
6
  gem 'guard', '~> 2.3.0'
7
+ gem 'spoon'
8
8
 
9
9
  group :development, :test do
10
- gem 'guard-rspec', '~> 4.2.5'
11
10
  gem 'growl'
12
- gem 'rb-inotify', require: false
13
- gem 'rb-fsevent', require: false
11
+ gem 'guard-rspec', '~> 4.2.5'
14
12
  gem 'rb-fchange', require: false
15
- gem 'rubocop', '0.27.1'
13
+ gem 'rb-fsevent', require: false
14
+ gem 'rb-inotify', require: false
15
+ gem 'rubocop', '0.68.0'
16
16
  end
data/LICENSE.md CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2012 Daniel Doubrovkine
3
+ Copyright (c) 2012-2019 Daniel Doubrovkine and Contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining
6
6
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -38,5 +38,5 @@ Copyright and License
38
38
 
39
39
  MIT License, see [LICENSE](http://github.com/dblock/guard-rack/raw/master/LICENSE.md) for details.
40
40
 
41
- (c) 2012-2015 [Daniel Doubrovkine](http://github.com/dblock) and [Contributors](https://github.com/dblock/guard-rack/graphs/contributors).
41
+ (c) 2012-2019 [Daniel Doubrovkine](http://github.com/dblock) and [Contributors](https://github.com/dblock/guard-rack/graphs/contributors).
42
42
 
data/Rakefile CHANGED
@@ -1,13 +1,13 @@
1
1
  require 'rubygems'
2
2
  require 'bundler/gem_tasks'
3
3
 
4
- require File.expand_path('../lib/guard/rack/version', __FILE__)
4
+ require File.expand_path('lib/guard/rack/version', __dir__)
5
5
 
6
6
  begin
7
7
  Bundler.setup(:default, :development)
8
8
  rescue Bundler::BundlerError => e
9
- $stderr.puts e.message
10
- $stderr.puts 'Run `bundle install` to install missing gems'
9
+ warn e.message
10
+ warn 'Run `bundle install` to install missing gems'
11
11
  exit e.status_code
12
12
  end
13
13
 
@@ -23,4 +23,4 @@ require 'rainbow/ext/string' unless String.respond_to?(:color)
23
23
  require 'rubocop/rake_task'
24
24
  RuboCop::RakeTask.new(:rubocop)
25
25
 
26
- task default: [:rubocop, :spec]
26
+ task default: %i[rubocop spec]
@@ -1,5 +1,4 @@
1
- # -*- encoding: utf-8 -*-
2
- require File.expand_path('../lib/guard/rack/version', __FILE__)
1
+ require File.expand_path('lib/guard/rack/version', __dir__)
3
2
 
4
3
  Gem::Specification.new do |gem|
5
4
  gem.authors = ['Daniel Doubrovkine']
@@ -15,14 +14,19 @@ Gem::Specification.new do |gem|
15
14
  gem.files = `git ls-files`.split("\n")
16
15
  gem.version = Guard::RackVersion::VERSION
17
16
 
18
- gem.add_dependency 'guard', '~> 2.3'
19
17
  gem.add_dependency 'ffi'
18
+ gem.add_dependency 'guard', '~> 2.3'
20
19
  gem.add_dependency 'spoon'
21
20
 
22
- gem.add_development_dependency 'rake'
23
21
  gem.add_development_dependency 'bundler'
24
- gem.add_development_dependency 'rspec', '~> 3.0'
25
22
  gem.add_development_dependency 'fakefs'
26
23
  gem.add_development_dependency 'mocha', '~> 1.1'
27
- gem.add_development_dependency 'rack'
24
+ gem.add_development_dependency 'rake', '< 11'
25
+ gem.add_development_dependency 'rspec', '~> 3.0'
26
+
27
+ if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.2.0')
28
+ gem.add_development_dependency 'rack', '< 2'
29
+ else
30
+ gem.add_development_dependency 'rack', '~> 2'
31
+ end
28
32
  end
@@ -8,16 +8,16 @@ module Guard
8
8
  attr_reader :options, :runner
9
9
 
10
10
  DEFAULT_OPTIONS = {
11
- port: 9292,
12
- host: '0.0.0.0',
13
- environment: 'development',
11
+ port: 9292,
12
+ host: '0.0.0.0',
13
+ environment: 'development',
14
14
  start_on_start: true,
15
- force_run: false,
16
- timeout: 20,
17
- debugger: false,
18
- config: 'config.ru',
19
- cmd: 'rackup'
20
- }
15
+ force_run: false,
16
+ timeout: 20,
17
+ debugger: false,
18
+ config: 'config.ru',
19
+ cmd: 'rackup'
20
+ }.freeze
21
21
 
22
22
  def initialize(options = {})
23
23
  super
@@ -6,11 +6,11 @@ module Guard
6
6
  attr_reader :options
7
7
 
8
8
  def self.new(options = {})
9
- if Gem.win_platform?
10
- os_instance = Windows.allocate
11
- else
12
- os_instance = Nix.allocate
13
- end
9
+ os_instance = if Gem.win_platform?
10
+ Windows.allocate
11
+ else
12
+ Nix.allocate
13
+ end
14
14
  os_instance.send :initialize, options
15
15
  os_instance
16
16
  end
@@ -24,10 +24,10 @@ module Guard
24
24
  result = -1
25
25
  UI.debug("Trying to kill Rack (PID #{pid})...")
26
26
  unless force
27
- Process.kill('INT', pid)
27
+ ::Process.kill('INT', pid)
28
28
  begin
29
29
  Timeout.timeout(options[:timeout]) do
30
- _, status = Process.wait2(pid)
30
+ _, status = ::Process.wait2(pid)
31
31
  result = status.exitstatus
32
32
  UI.debug("Killed Rack (Exit status: #{result})")
33
33
  end
@@ -36,7 +36,7 @@ module Guard
36
36
  force = true
37
37
  end
38
38
  end
39
- Process.kill('TERM', pid) if force
39
+ ::Process.kill('TERM', pid) if force
40
40
  result
41
41
  end
42
42
  end
@@ -1,5 +1,5 @@
1
1
  module Guard
2
2
  module RackVersion
3
- VERSION = '2.2.0'
3
+ VERSION = '2.2.1'.freeze
4
4
  end
5
5
  end
@@ -1,9 +1,9 @@
1
1
  class HelloWorld
2
- def call(env)
3
- return [
2
+ def call(_env)
3
+ [
4
4
  200,
5
- {'Content-Type' => 'text/html'},
6
- ["Hello world!"]
5
+ { 'Content-Type' => 'text/html' },
6
+ ['Hello world!']
7
7
  ]
8
8
  end
9
9
  end
@@ -51,7 +51,7 @@ describe Guard::Rack::CustomProcess do
51
51
  end
52
52
 
53
53
  it 'should return true' do
54
- expect(subject.kill pid).to eq(0)
54
+ expect(subject.kill(pid)).to eq(0)
55
55
  end
56
56
  end
57
57
 
@@ -63,7 +63,7 @@ describe Guard::Rack::CustomProcess do
63
63
  end
64
64
 
65
65
  it 'should return false' do
66
- expect(subject.kill pid).to eq(1)
66
+ expect(subject.kill(pid)).to eq(1)
67
67
  end
68
68
  end
69
69
 
@@ -74,7 +74,7 @@ describe Guard::Rack::CustomProcess do
74
74
  end
75
75
 
76
76
  it 'should return false' do
77
- expect(subject.kill pid).to eq(-1)
77
+ expect(subject.kill(pid)).to eq(-1)
78
78
  end
79
79
  end
80
80
  end
@@ -99,7 +99,7 @@ describe Guard::Rack::CustomProcess do
99
99
  end
100
100
 
101
101
  it 'should result in 0' do
102
- expect(subject.kill pid).to eq(0)
102
+ expect(subject.kill(pid)).to eq(0)
103
103
  end
104
104
  end
105
105
  end
metadata CHANGED
@@ -1,43 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: guard-rack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.0
4
+ version: 2.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Daniel Doubrovkine
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-16 00:00:00.000000000 Z
11
+ date: 2019-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: guard
14
+ name: ffi
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.3'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '2.3'
26
+ version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: ffi
28
+ name: guard
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ">="
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '0'
33
+ version: '2.3'
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: '0'
40
+ version: '2.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: spoon
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rake
56
+ name: bundler
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: bundler
70
+ name: fakefs
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,61 +81,61 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: rspec
84
+ name: mocha
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '3.0'
89
+ version: '1.1'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '3.0'
96
+ version: '1.1'
97
97
  - !ruby/object:Gem::Dependency
98
- name: fakefs
98
+ name: rake
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">="
101
+ - - "<"
102
102
  - !ruby/object:Gem::Version
103
- version: '0'
103
+ version: '11'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ">="
108
+ - - "<"
109
109
  - !ruby/object:Gem::Version
110
- version: '0'
110
+ version: '11'
111
111
  - !ruby/object:Gem::Dependency
112
- name: mocha
112
+ name: rspec
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: '1.1'
117
+ version: '3.0'
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: '1.1'
124
+ version: '3.0'
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: rack
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
- - - ">="
129
+ - - "~>"
130
130
  - !ruby/object:Gem::Version
131
- version: '0'
131
+ version: '2'
132
132
  type: :development
133
133
  prerelease: false
134
134
  version_requirements: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - ">="
136
+ - - "~>"
137
137
  - !ruby/object:Gem::Version
138
- version: '0'
138
+ version: '2'
139
139
  description: Automatically reloads your Rack based app on file change using Guard.
140
140
  email:
141
141
  - dblock@dblock.org
@@ -189,8 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  - !ruby/object:Gem::Version
190
190
  version: '0'
191
191
  requirements: []
192
- rubyforge_project:
193
- rubygems_version: 2.4.8
192
+ rubygems_version: 3.0.3
194
193
  signing_key:
195
194
  specification_version: 4
196
195
  summary: Automatically reloads your Rack based app on file change using Guard.