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 +4 -4
- data/CHANGELOG.md +15 -1
- data/README.md +6 -6
- data/Rakefile +5 -5
- data/lib/gallus/format/simple_log.rb +1 -1
- data/lib/gallus/log.rb +3 -0
- data/lib/gallus/output/stream.rb +0 -2
- data/lib/perfume/logging.rb +5 -0
- data/lib/perfume/service.rb +2 -2
- data/lib/perfume/version.rb +1 -1
- data/perfume.gemspec +1 -1
- metadata +23 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6d99dd87c7fb4820f8e8e64e36e9466008ccff6f
|
4
|
+
data.tar.gz: 2bce0884b04ac3d49561a8198de202ad38973b13
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 221ab7ac093041ceb16f744bc7af4170b913475e288f4ba9dc93e2db914c240d2aa6f5735df06156835d92578e0620d8649d5131a10011df0de0f85f19ec157d
|
7
|
+
data.tar.gz: 483c5464ebb97116effc77a978c80e61af3d8b6d087c4b695a58b342d1aa65560e9aac7f462db13c2dfd566b302f1600296f5f1451ed43fa66d914c2b498e694
|
data/CHANGELOG.md
CHANGED
@@ -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
|
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.
|
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.
|
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
|
-
|
3
|
+
require "rake/bump/tasks"
|
4
4
|
require "rake/testtask"
|
5
5
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
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
|
data/lib/gallus/log.rb
CHANGED
data/lib/gallus/output/stream.rb
CHANGED
data/lib/perfume/service.rb
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
require 'active_support/core_ext/hash/keys'
|
2
2
|
require 'perfume/super_object'
|
3
|
-
require '
|
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
|
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
|
data/lib/perfume/version.rb
CHANGED
data/perfume.gemspec
CHANGED
@@ -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
|
-
|
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.
|
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-
|
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
|