silent_stream 1.0.3 → 1.0.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
  SHA256:
3
- metadata.gz: 872712543036f927970b5db4dc0bd6150f99d4ca7f007088b7e3b59cf45e5bfc
4
- data.tar.gz: f280efeb2946ccd1b10cff5549f65ab96134b8285a50b25a162cc1a328720439
3
+ metadata.gz: 581f8331c54a02eb5c1f2d0dd6a88839e536a9edea6fb13f138e101ce24b2df9
4
+ data.tar.gz: f81efd11329e60efef6d0f15d7c76045597ff6607ab5c88928e27e1398286b36
5
5
  SHA512:
6
- metadata.gz: da90cd10a4bfc1262074ed98a5fefcced9c2c3c012f10d55e71e7047ff2a9db48c9f6f53b4737974ca1dd874ba0f9928c0983df7b8a60e686ee09bd48b5f03b6
7
- data.tar.gz: cef8cd44a1418c94d4bd7fe24158a94bdde2c94796269b796c86742232bdb2757c74edc38437022ad7ce6b8a58d0fc9b1bd76b46c08904afdeb4ca11a7015f5b
6
+ metadata.gz: ba1b3f6cd0b8a360f30dde8e5e1a26cfa2a70fc645ac93710b548da4cd81437302d6bedd8b9991e0979f3ea9352b5e0851a05fb083b8acec9a7fe941d48641c4
7
+ data.tar.gz: 9645c3f257de602d761aea9733ba96f67101e49ad900fb6280a62b7a98b62dad0d6ebb6b5e82a7adc6d7c4db1871a24d5db2c2699ae4c71d0687efc908c0fb3b
data/.travis.yml CHANGED
@@ -27,6 +27,6 @@ bundler_args: --no-deployment --jobs 3 --retry 3
27
27
  language: ruby
28
28
  cache: bundler
29
29
  rvm:
30
- - 2.3.7
31
- - 2.4.4
32
- - 2.5.1
30
+ - 2.3.7
31
+ - 2.4.4
32
+ - 2.5.1
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
data/README.md CHANGED
@@ -6,7 +6,7 @@ Since July 2014 `silence_stream`, `silence_stderr`, `capture`, `silence`, and `q
6
6
 
7
7
  This gem was taken out of Rails but it is *not* Rails dependent. The extraction was total (**even the tests**!), and this is now a pure Ruby library, which can be used in any Ruby project without encumbrances.
8
8
 
9
- | Project | RequireBench |
9
+ | Project | SilentStream |
10
10
  |------------------------ | ----------------------- |
11
11
  | gem name | [silent_stream](https://rubygems.org/gems/silent_stream) |
12
12
  | license | [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT) |
data/Rakefile CHANGED
@@ -1,7 +1,11 @@
1
- require 'bundler/gem_tasks'
1
+ # frozen_string_literal: true
2
2
 
3
- task :default => [ :test ]
3
+ require 'bundler/gem_tasks'
4
+ require 'rake/testtask'
4
5
 
5
- task :test do
6
- ruby '-Ilib tests/silent_stream_test.rb'
6
+ Rake::TestTask.new do |t|
7
+ t.test_files = FileList['tests/**/test_*.rb']
7
8
  end
9
+ desc 'Run tests'
10
+
11
+ task default: :test
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'silent_stream'
data/lib/silent_stream.rb CHANGED
@@ -1,6 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'silent_stream/version'
2
4
 
3
5
  require 'tempfile'
6
+ require 'logger'
4
7
 
5
8
  module SilentStream
6
9
  def self.included(base)
@@ -56,7 +59,7 @@ module SilentStream
56
59
  # This method is not thread-safe.
57
60
  def silence_stream(stream)
58
61
  old_stream = stream.dup
59
- stream.reopen(RbConfig::CONFIG['host_os'] =~ /mswin|mingw/ ? 'NUL:' : '/dev/null')
62
+ stream.reopen(/mswin|mingw/.match?(RbConfig::CONFIG['host_os']) ? 'NUL:' : '/dev/null')
60
63
  stream.sync = true
61
64
  yield
62
65
  ensure
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module SilentStream
2
- VERSION = '1.0.3'.freeze
4
+ VERSION = '1.0.4'
3
5
  end
@@ -1,38 +1,40 @@
1
+ # frozen_string_literal: true
2
+
1
3
  lib = File.expand_path('lib', __dir__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
5
  require 'silent_stream/version'
4
6
 
5
7
  Gem::Specification.new do |spec|
6
- authors = [
7
- # Everyone who touched the files extracted from Rails:
8
- ['jeremy', 'Jeremy Daer'],
9
- ['dhh', 'David Heinemeier Hansson'],
10
- ['pixeltrix', 'Andrew White'],
11
- ['spastorino', 'Santiago Pastorino'],
12
- ['sstephenson', 'Sam Stephenson'],
13
- ['amatsuda', 'Akira Matsuda'],
14
- ['Raphomet', 'Raphael Lee'],
15
- ['rafaelfranca', 'Rafael França'],
16
- ['mariovisic', 'Mario Visic'],
17
- ['krekoten', "Мар'ян Крекотень"],
18
- ['lest', 'Sergey Nartimov'],
19
- ['joshk', 'Josh Kalderimis'],
20
- ['fxn', 'Xavier Noria'],
21
- ['deivid-rodriguez', 'David Rodríguez'],
22
- ['route', 'Dmitry Vorotilin'],
23
- ['tenderlove', 'Aaron Patterson'],
24
- ['guilleiguaran', 'Guillermo Iguaran'],
25
- ['gazay', 'Alexey Gaziev'],
26
- ['wycats', 'Yehuda Katz'],
27
- ['tommeier', 'Tom Meier'],
28
- ['lifo', 'Pratik Naik'],
29
- ['charliesome', 'Charlie Somerville'],
30
- ['atambo', 'Alex Tambellini'],
31
- ['arthurnn', 'Arthur Nogueira Neves'],
32
- ['anildigital', 'Anil Wadghule'],
33
- # Author/Maintainer of this gem:
34
- ['pboling', 'Peter Boling']
35
- ]
8
+ authors = [
9
+ # Everyone who touched the files extracted from Rails:
10
+ ['jeremy', 'Jeremy Daer'],
11
+ ['dhh', 'David Heinemeier Hansson'],
12
+ ['pixeltrix', 'Andrew White'],
13
+ ['spastorino', 'Santiago Pastorino'],
14
+ ['sstephenson', 'Sam Stephenson'],
15
+ ['amatsuda', 'Akira Matsuda'],
16
+ ['Raphomet', 'Raphael Lee'],
17
+ ['rafaelfranca', 'Rafael França'],
18
+ ['mariovisic', 'Mario Visic'],
19
+ ['krekoten', "Мар'ян Крекотень"],
20
+ ['lest', 'Sergey Nartimov'],
21
+ ['joshk', 'Josh Kalderimis'],
22
+ ['fxn', 'Xavier Noria'],
23
+ ['deivid-rodriguez', 'David Rodríguez'],
24
+ ['route', 'Dmitry Vorotilin'],
25
+ ['tenderlove', 'Aaron Patterson'],
26
+ ['guilleiguaran', 'Guillermo Iguaran'],
27
+ ['gazay', 'Alexey Gaziev'],
28
+ ['wycats', 'Yehuda Katz'],
29
+ ['tommeier', 'Tom Meier'],
30
+ ['lifo', 'Pratik Naik'],
31
+ ['charliesome', 'Charlie Somerville'],
32
+ ['atambo', 'Alex Tambellini'],
33
+ ['arthurnn', 'Arthur Nogueira Neves'],
34
+ ['anildigital', 'Anil Wadghule'],
35
+ # Author/Maintainer of this gem:
36
+ ['pboling', 'Peter Boling']
37
+ ]
36
38
 
37
39
  spec.name = 'silent_stream'
38
40
  spec.version = SilentStream::VERSION
@@ -58,7 +60,10 @@ authors = [
58
60
  else
59
61
  spec.add_development_dependency 'rake'
60
62
  end
61
- spec.add_development_dependency 'test-unit', '~> 3.2'
62
- spec.add_development_dependency 'minitest', '~> 5.10'
63
63
  spec.add_development_dependency 'bundler', '~> 1.16'
64
+ spec.add_development_dependency 'minitest', '~> 5.10'
65
+ spec.add_development_dependency 'minitest-reporters'
66
+ spec.add_development_dependency 'mocha'
67
+ spec.add_development_dependency 'simplecov', '~> 0.16'
68
+ spec.add_development_dependency 'test-unit', '~> 3.2'
64
69
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: silent_stream
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Daer
@@ -33,7 +33,7 @@ authors:
33
33
  autorequire:
34
34
  bindir: exe
35
35
  cert_chain: []
36
- date: 2018-09-25 00:00:00.000000000 Z
36
+ date: 2018-10-06 00:00:00.000000000 Z
37
37
  dependencies:
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: rake
@@ -50,19 +50,19 @@ dependencies:
50
50
  - !ruby/object:Gem::Version
51
51
  version: '0'
52
52
  - !ruby/object:Gem::Dependency
53
- name: test-unit
53
+ name: bundler
54
54
  requirement: !ruby/object:Gem::Requirement
55
55
  requirements:
56
56
  - - "~>"
57
57
  - !ruby/object:Gem::Version
58
- version: '3.2'
58
+ version: '1.16'
59
59
  type: :development
60
60
  prerelease: false
61
61
  version_requirements: !ruby/object:Gem::Requirement
62
62
  requirements:
63
63
  - - "~>"
64
64
  - !ruby/object:Gem::Version
65
- version: '3.2'
65
+ version: '1.16'
66
66
  - !ruby/object:Gem::Dependency
67
67
  name: minitest
68
68
  requirement: !ruby/object:Gem::Requirement
@@ -78,19 +78,61 @@ dependencies:
78
78
  - !ruby/object:Gem::Version
79
79
  version: '5.10'
80
80
  - !ruby/object:Gem::Dependency
81
- name: bundler
81
+ name: minitest-reporters
82
+ requirement: !ruby/object:Gem::Requirement
83
+ requirements:
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ type: :development
88
+ prerelease: false
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: mocha
96
+ requirement: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ type: :development
102
+ prerelease: false
103
+ version_requirements: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ - !ruby/object:Gem::Dependency
109
+ name: simplecov
82
110
  requirement: !ruby/object:Gem::Requirement
83
111
  requirements:
84
112
  - - "~>"
85
113
  - !ruby/object:Gem::Version
86
- version: '1.16'
114
+ version: '0.16'
87
115
  type: :development
88
116
  prerelease: false
89
117
  version_requirements: !ruby/object:Gem::Requirement
90
118
  requirements:
91
119
  - - "~>"
92
120
  - !ruby/object:Gem::Version
93
- version: '1.16'
121
+ version: '0.16'
122
+ - !ruby/object:Gem::Dependency
123
+ name: test-unit
124
+ requirement: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - "~>"
127
+ - !ruby/object:Gem::Version
128
+ version: '3.2'
129
+ type: :development
130
+ prerelease: false
131
+ version_requirements: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - "~>"
134
+ - !ruby/object:Gem::Version
135
+ version: '3.2'
94
136
  description: ActiveSupport Kernel Reporting Detritus with a few enhancements
95
137
  email:
96
138
  - peter.boling@gmail.com