perfume 0.3.0 → 0.3.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
2
  SHA1:
3
- metadata.gz: 03528ec0794024092661cf896356eb5d9cb6c13b
4
- data.tar.gz: 9630838ee4a98b5bcb7572373da237c841390931
3
+ metadata.gz: 6d99dd87c7fb4820f8e8e64e36e9466008ccff6f
4
+ data.tar.gz: 2bce0884b04ac3d49561a8198de202ad38973b13
5
5
  SHA512:
6
- metadata.gz: 1b01545fa77bab4667234b0bc9ff5f55b9542c660e17127b4e8320f7f7ed478d587b6c2fcb722faef136f01b69770c25dd21cf6c9906cc4d3d5970340732297e
7
- data.tar.gz: 1b730f6be75d0ba73521d18d549bd1f5b1e9e398a6a9698e9e1a091895f84061a3d72c96d7678e02c0bbecaba996da21e3a3b32558661b680134d764141add02
6
+ metadata.gz: 221ab7ac093041ceb16f744bc7af4170b913475e288f4ba9dc93e2db914c240d2aa6f5735df06156835d92578e0620d8649d5131a10011df0de0f85f19ec157d
7
+ data.tar.gz: 483c5464ebb97116effc77a978c80e61af3d8b6d087c4b695a58b342d1aa65560e9aac7f462db13c2dfd566b302f1600296f5f1451ed43fa66d914c2b498e694
@@ -6,6 +6,20 @@ This project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
7
  ...
8
8
 
9
+ ## [0.3.1]
10
+
11
+ ### Added
12
+
13
+ - Tasks from rake-bump
14
+
15
+ ### Changed
16
+
17
+ - Alleviated relation with logging.
18
+
19
+ ### Fixed
20
+
21
+ - SimpleLog formatter output was showing wrongly log level.
22
+
9
23
  ## [0.3.0]
10
24
 
11
25
  ### Changed
@@ -22,4 +36,4 @@ This project adheres to [Semantic Versioning](http://semver.org/).
22
36
 
23
37
  ### Added
24
38
 
25
- - Project extracted from other library and moved into this standalone gem.
39
+ - Project extracted from other library and moved into this standalone gem.
data/README.md CHANGED
@@ -5,10 +5,10 @@
5
5
  Perfume is a set of fragrances to make your (micro)services code smell nice. It's bunch of common practices and
6
6
  shorthands to deal with common problems. At the moment it includes the following stuff:
7
7
 
8
- * So called SuperObject - a lightweight hash-initialized struct-like object.
9
- * So called Service - a callable object that's designed to implement your business processes.
10
- * So called Promise - extended Service with ignorable errors.
11
- * Unified and pre-configured logging (adapted Log4r).
8
+ * So called `SuperObject` - a lightweight hash-initialized struct-like object.
9
+ * So called `Service` - a callable object that's designed to implement your business processes.
10
+ * So called `Promise` - extended Service with ignorable errors.
11
+ * Unified and pre-configured logging.
12
12
  * Shell services.
13
13
  * Console interaction service.
14
14
  * Exit (abort) service.
@@ -20,7 +20,7 @@ shorthands to deal with common problems. At the moment it includes the following
20
20
  Add this line to your application's Gemfile:
21
21
 
22
22
  ```ruby
23
- gem 'perfume', '0.3.0'
23
+ gem 'perfume', '0.3.1'
24
24
  ```
25
25
 
26
26
  And then execute:
@@ -29,7 +29,7 @@ And then execute:
29
29
 
30
30
  Or install it yourself as:
31
31
 
32
- $ gem install perfume --version 0.3.0
32
+ $ gem install perfume --version 0.3.1
33
33
 
34
34
  ## Usage
35
35
 
data/Rakefile CHANGED
@@ -1,12 +1,12 @@
1
1
  require "bundler/gem_tasks"
2
2
  require "perfume/version"
3
- # require "rake/bump/tasks"
3
+ require "rake/bump/tasks"
4
4
  require "rake/testtask"
5
5
 
6
- # Rake::Bump::Tasks.new do |t|
7
- # t.gem_name = 'perfume'
8
- # t.gem_current_version = Perfume::VERSION
9
- # end
6
+ Rake::Bump::Tasks.new do |t|
7
+ t.gem_name = 'perfume'
8
+ t.gem_current_version = Perfume::VERSION
9
+ end
10
10
 
11
11
  Rake::TestTask.new(:test) do |t|
12
12
  t.libs << "test"
@@ -3,7 +3,7 @@ module Gallus
3
3
  class SimpleLog
4
4
  def call(event)
5
5
  message = [ event.message, event.payload ].compact.join('; ')
6
- format("%s @ %s $ %s > %s", event.level, event.recorded_at.iso8601, event.logger, message)
6
+ format("%s @ %s $ %s > %s", event.level.name[0], event.recorded_at.iso8601, event.logger, message)
7
7
  end
8
8
  end
9
9
  end
@@ -58,6 +58,9 @@ module Gallus
58
58
  self.level = @parent.level
59
59
  end
60
60
 
61
+ @output ||= []
62
+ @serialization ||= Serialization::Inspect.new
63
+
61
64
  yield self if block_given?
62
65
  end
63
66
 
@@ -10,8 +10,6 @@ module Gallus
10
10
  @mutex.synchronize { call!(event) }
11
11
  end
12
12
 
13
- protected
14
-
15
13
  def call!(event)
16
14
  @stream.write(@format.call(event) + "\n")
17
15
  end
@@ -0,0 +1,5 @@
1
+ require 'gallus'
2
+
3
+ module Perfume
4
+ Logging = Gallus::Logging
5
+ end
@@ -1,13 +1,13 @@
1
1
  require 'active_support/core_ext/hash/keys'
2
2
  require 'perfume/super_object'
3
- require 'gallus'
3
+ require 'perfume/logging'
4
4
 
5
5
  module Perfume
6
6
  # Public: The pattern is simple, our Service is a struct with init arguments that
7
7
  # additionally is callable. It also comes with class level `call` method that
8
8
  # executes stuff on new instance of the object.
9
9
  class Service < SuperObject
10
- include Gallus::Logging
10
+ include Logging
11
11
 
12
12
  # Public: Shorthand to instantionante with arguments and perform call in one shot.
13
13
  # You should actually always intend to use this method as it's easier to mock
@@ -1,3 +1,3 @@
1
1
  module Perfume
2
- VERSION = '0.3.0'
2
+ VERSION = '0.3.1'
3
3
  end
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "minitest-reporters", "~> 1.1"
26
26
  spec.add_development_dependency "mocha", "~> 1.1"
27
27
  spec.add_development_dependency "log4r", "~> 1.1", ">= 1.0"
28
- # spec.add_development_dependency "rake-bump", "~> 0.4"
28
+ spec.add_development_dependency "rake-bump", "~> 0.4", ">= 0.4.6"
29
29
 
30
30
  spec.add_dependency "activesupport", "~> 4.2", ">= 3.0"
31
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perfume
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - jobandtalent
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2016-01-11 00:00:00.000000000 Z
12
+ date: 2016-01-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -101,6 +101,26 @@ dependencies:
101
101
  - - ">="
102
102
  - !ruby/object:Gem::Version
103
103
  version: '1.0'
104
+ - !ruby/object:Gem::Dependency
105
+ name: rake-bump
106
+ requirement: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.4'
111
+ - - ">="
112
+ - !ruby/object:Gem::Version
113
+ version: 0.4.6
114
+ type: :development
115
+ prerelease: false
116
+ version_requirements: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - "~>"
119
+ - !ruby/object:Gem::Version
120
+ version: '0.4'
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: 0.4.6
104
124
  - !ruby/object:Gem::Dependency
105
125
  name: activesupport
106
126
  requirement: !ruby/object:Gem::Requirement
@@ -163,6 +183,7 @@ files:
163
183
  - lib/perfume/console.rb
164
184
  - lib/perfume/core_ext/dir.rb
165
185
  - lib/perfume/exit.rb
186
+ - lib/perfume/logging.rb
166
187
  - lib/perfume/promise.rb
167
188
  - lib/perfume/service.rb
168
189
  - lib/perfume/shell.rb