dry-core 0.3.1 → 0.3.2

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: c6b9aba5ba2645ca6591d2977bf2a0935c155b09
4
- data.tar.gz: 5df5c9727cc9c1a12c217d159928cafc30dab865
3
+ metadata.gz: 9900b0336362ab35e8b3795824dde725a18198ba
4
+ data.tar.gz: 010c02d36e777f775e9bfb9bf45e1a4b6ada5282
5
5
  SHA512:
6
- metadata.gz: 45f58100a89f1132d5f9d0e456e7a498b33ee5545f0688828bae2b13762a8825b013d352f624dd6ba1ae22a15aced47c278dd0242df6cef23eea6bb297aa57f4
7
- data.tar.gz: 35233a2424d7ae2672d74707e0f0c1e333fcf5f7a50c61e574965d6c35a78d64d1c2e7b35cc24f51ff02cfe4fb89e2dcc173dff476ae862f4b9bf0fb87ceb90a
6
+ metadata.gz: 4dd54c97efc6be9e4c8a79994928b26bf062d45d702e2dc6ea0ca8066b28aad26488e0699390974438730c95cb0065df7d9b59413b7f0fb560375b72ff00ee50
7
+ data.tar.gz: 734598387cbac30a2688d8eb6f97beea74fc43f140a71af16893d3a5fd7be4aba4d75eaac1394e648a32080e45ce8bbaa3e8de58ed990be9ea0a75b470a4ccb1
@@ -1,10 +1,16 @@
1
- # v0.3.1 to-be-released
1
+ # v0.3.2 2017-08-31
2
+
3
+ ### Added
4
+
5
+ * Accept an existing logger object in `Dry::Core::Deprecations.set_logger!` (flash-gordon)
6
+
7
+ # v0.3.1 2017-05-27
2
8
 
3
9
  ### Added
4
10
 
5
11
  * Support for building classes within an existing namespace (flash-gordon)
6
12
 
7
- [Compare v0.3.0...master](https://github.com/dry-rb/dry-core/compare/v0.3.0...master)
13
+ [Compare v0.3.0...v0.3.1](https://github.com/dry-rb/dry-core/compare/v0.3.0...v0.3.1)
8
14
 
9
15
  # v0.3.0 2017-05-05
10
16
 
@@ -0,0 +1,29 @@
1
+ # Issue Guidelines
2
+
3
+ ## Reporting bugs
4
+
5
+ If you found a bug, report an issue and describe what's the expected behavior versus what actually happens. If the bug causes a crash, attach a full backtrace. If possible, a reproduction script showing the problem is highly appreciated.
6
+
7
+ ## Reporting feature requests
8
+
9
+ Report a feature request **only after discussing it first on [discuss.dry-rb.org](https://discuss.dry-rb.org)** where it was accepted. Please provide a concise description of the feature, don't link to a discussion thread, and instead summarize what was discussed.
10
+
11
+ ## Reporting questions, support requests, ideas, concerns etc.
12
+
13
+ **PLEASE DON'T** - use [discuss.dry-rb.org](http://discuss.dry-rb.org) instead.
14
+
15
+ # Pull Request Guidelines
16
+
17
+ A Pull Request will only be accepted if it addresses a specific issue that was reported previously, or fixes typos, mistakes in documentation etc.
18
+
19
+ Other requirements:
20
+
21
+ 1) Do not open a pull request if you can't provide tests along with it. If you have problems writing tests, ask for help in the related issue.
22
+ 2) Follow the style conventions of the surrounding code. In most cases, this is standard ruby style.
23
+ 3) Add API documentation if it's a new feature
24
+ 4) Update API documentation if it changes an existing feature
25
+ 5) Bonus points for sending a PR to [github.com/dry-rb/dry-rb.org](github.com/dry-rb/dry-rb.org) which updates user documentation and guides
26
+
27
+ # Asking for help
28
+
29
+ If these guidelines aren't helpful, and you're stuck, please post a message on [discuss.dry-rb.org](https://discuss.dry-rb.org).
@@ -86,11 +86,24 @@ module Dry
86
86
 
87
87
  # Sets a custom logger. This is a global setting.
88
88
  #
89
- # @option [IO] output output stream for messages
89
+ # @overload set_logger!(output)
90
+ # @param [IO] output Stream for messages
91
+ #
92
+ # @overload set_logger!
93
+ # Stream messages to stdout
94
+ #
95
+ # @overload set_logger!(logger)
96
+ # @param [#warn] logger
97
+ #
98
+ # @api public
90
99
  def set_logger!(output = nil)
91
- @logger = Logger.new(output || $stdout)
92
- @logger.formatter = proc { |_severity, _datetime, _progname, msg| "#{msg}\n" }
93
- @logger
100
+ if output.respond_to?(:warn)
101
+ @logger = output
102
+ else
103
+ @logger = Logger.new(output || $stdout).tap do |logger|
104
+ logger.formatter = proc { |_, _, _, msg| "#{ msg }\n" }
105
+ end
106
+ end
94
107
  end
95
108
 
96
109
  def [](tag)
@@ -1,5 +1,5 @@
1
1
  module Dry
2
2
  module Core
3
- VERSION = '0.3.1'.freeze
3
+ VERSION = '0.3.2'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nikita Shilnikov
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-05-27 00:00:00.000000000 Z
11
+ date: 2017-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -79,6 +79,7 @@ files:
79
79
  - ".rubocop.yml"
80
80
  - ".travis.yml"
81
81
  - CHANGELOG.md
82
+ - CONTRIBUTING.md
82
83
  - Gemfile
83
84
  - LICENSE.txt
84
85
  - README.md