informed 1.1.0 → 1.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ba5433e00f3520fb5d488f0597c86df6a260a57f
4
- data.tar.gz: c8cdfb9e6130b1c503204062c5b09b03e2b69167
3
+ metadata.gz: adf838ca0c97d9b596e359fbf1f00b3b3ed43741
4
+ data.tar.gz: d5b0f8cf5710c337de5a1fe6829c68eebd9554f2
5
5
  SHA512:
6
- metadata.gz: 0bed52a50511a9201dc57fbd52f8cf52e1c954f5e5dc28657dc20cd6d7ffb527d94fbb61b972f3df94b94446e110d2d063296515a7176bc44a4bf074558d924f
7
- data.tar.gz: f35acc7f08150778f5808ff033eabb777232e0745182f74dcaf2db8ef5f816679b4a348963c10cf06596318f344f46be6c17de64bf8859841e79d6b5bfe78932
6
+ metadata.gz: af8d33e7c1438f0139f50274b93f9b87090678a0545ea8802174d0d0c28978b0bae952d0f1accb6ad73211b503e902023daaaf0a53e962df9c6f3414d92db758
7
+ data.tar.gz: e4aa31fa863c16b9dcb65684b94b77b58a718941e8be381eb136dc9a814c95686eda2e941055eccec3ca40f0e2a65130a18865b6dbb5b46fd59a4e881ab2feac
@@ -0,0 +1,12 @@
1
+ ### 1.1.1
2
+ #### Bug Fixes
3
+ * [#11](https://github.com/wecohere/informed/pull/11) - Prioritize keyword args over method calls when there are name collisions
4
+
5
+ ### 1.1.0
6
+
7
+ #### Enhancements
8
+ * [#2](https://github.com/wecohere/informed/pull/2) - Support methods that take blocks
9
+ * [#1](https://github.com/wecohere/informed/pull/1) - Include the class name in log messages
10
+
11
+ ### 1.0.0
12
+ Initial release, provides `inform_on` syntax at the class level.
@@ -0,0 +1,19 @@
1
+ ## Contributing to Informed Ruby
2
+ This extends the [Informed Contributor Document](../CONTRIBUTING.md) to add Ruby specific guidance.
3
+
4
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run
5
+ `bin/test` to run the tests. You can also run `bin/console` for an interactive
6
+ prompt that will allow you to experiment.
7
+
8
+ If you want to test across all supported ruby versions, make sure you have [`rbenv`](https://github.com/rbenv/rbenv) and [ruby-build](https://github.com/rbenv/ruby-build) installed; then run `bin/setup-matrix` to install all the gems across all the versions and `bin/test-matrix` to run all the tests.
9
+
10
+ To install this gem on your local machine, run `bundle exec rake install`.
11
+
12
+ ### Releasing
13
+
14
+ To release a new version, update the version number in `version.rb`, and then run
15
+ `bundle exec rake release`, which will create a git tag for the version, push
16
+ git commits and tags, and push the `.gem` file to
17
+ [rubygems.org](https://rubygems.org).
18
+
19
+
@@ -0,0 +1,27 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ informed (1.1.1)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ minitest (5.10.3)
10
+ minitest-documentation (1.0.0)
11
+ minitest (~> 5.2)
12
+ rake (10.5.0)
13
+ yard (0.9.9)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ bundler (~> 1.14)
20
+ informed!
21
+ minitest (~> 5.0)
22
+ minitest-documentation (~> 1.0)
23
+ rake (~> 10.0)
24
+ yard (~> 0.9)
25
+
26
+ BUNDLED WITH
27
+ 1.16.0
data/README.md CHANGED
@@ -1,23 +1,4 @@
1
- # Informed
2
- ![build status](https://api.travis-ci.org/wecohere/informed.svg?branch=primary)
3
-
4
- Informed improves application debuggability by:
5
- * Logging which methods were called.
6
- * Aggregating useful data, such as the result of the call, keyword arguments provided, or the result of related instance methods
7
- * Exposing when a method starts and finishes
8
-
9
- Informed does *not*:
10
- * Format logs. It provides a hash to the logger you provide, and it's up to you
11
- to format your logs in a useful manner. This will depend on what log
12
- aggregation system you are using.
13
- * Store logs. You will need to configure your applications logger correctly to
14
- ensure logs will actually reach your log aggregator.
15
- * Provide useful analytics or performance tuning data. Logs are for informing
16
- your incident detection system, debugging, and auditing. While one may get
17
- *some* amount of metrics utility out of them, products oriented towards
18
- exposing the insights you are looking for are generally better equipped for
19
- that.
20
-
1
+ Ruby language implementation of [Informed](../README.md), an event-logging library that helps you understand what's happening in your application.
21
2
 
22
3
  ## Usage
23
4
 
@@ -101,29 +82,6 @@ To do so either:
101
82
  * Define an instance method `logger` on the informed upon class and have it
102
83
  return whatever logger you want.
103
84
 
85
+ ## Contributing and Local Development
104
86
 
105
- ## Development
106
-
107
- After checking out the repo, run `bin/setup` to install dependencies. Then, run
108
- `bin/test` to run the tests. You can also run `bin/console` for an interactive
109
- prompt that will allow you to experiment.
110
-
111
- To install this gem onto your local machine, run `bundle exec rake install`. To
112
- release a new version, update the version number in `version.rb`, and then run
113
- `bundle exec rake release`, which will create a git tag for the version, push
114
- git commits and tags, and push the `.gem` file to
115
- [rubygems.org](https://rubygems.org).
116
-
117
- ## Contributing
118
-
119
- Bug reports and pull requests are welcome on GitHub at
120
- https://github.com/zincmade/informed. This project is intended to be a safe,
121
- welcoming space for collaboration, and contributors are expected to adhere to
122
- the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
123
-
124
-
125
- ## License
126
-
127
- The gem is available as open source under the terms of the [MIT
128
- License](http://opensource.org/licenses/MIT).
129
-
87
+ See the [informed-ruby CONTRIBUTING.md](./CONTRIBUTING.md) for details.
data/bin/setup CHANGED
@@ -3,6 +3,14 @@ set -euo pipefail
3
3
  IFS=$'\n\t'
4
4
  set -vx
5
5
 
6
- bundle install
6
+ if [ ! -d "$(rbenv root)/plugins" ]; then
7
+ echo "Installing ruby-build"
8
+ mkdir -p "$(rbenv root)"/plugins
9
+ git clone https://github.com/rbenv/ruby-build.git "$(rbenv root)"/plugins/ruby-build
10
+ fi
7
11
 
8
- # Do any other automated setup that you need to do here
12
+ if [ ! -z ${RBENV_VERSION+x} ]; then
13
+ rbenv install -s $RBENV_VERSION
14
+ gem install bundler
15
+ fi
16
+ bundle install
@@ -0,0 +1,9 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ supported_versions=(2.1.10 2.2.8 2.3.5 2.4.2)
7
+ for version in "${supported_versions[@]}" ; do
8
+ RBENV_VERSION=$version bin/setup
9
+ done
data/bin/test CHANGED
@@ -1,14 +1,6 @@
1
1
  #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
2
5
 
3
- set -e
4
-
5
- for version in $(rbenv versions --bare); do
6
- export RBENV_VERSION=$version
7
- ruby --version
8
- ruby test/informed_test.rb
9
- done
10
-
11
- export RBENV_VERSION=''
12
- ruby --version
13
- ruby test/informed_test.rb --documentation
14
-
6
+ bundle exec ruby test/informed_test.rb --documentation
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ supported_versions=(2.1.10 2.2.8 2.3.5 2.4.2)
7
+ for version in "${supported_versions[@]}" ; do
8
+ RBENV_VERSION=$version bundle exec ruby test/informed_test.rb --documentation
9
+ done
10
+
@@ -197,8 +197,8 @@ module Informed
197
197
  if also_log[:values]
198
198
  message[:values] = {}
199
199
  also_log[:values].each do |local|
200
- message[:values][local] = keyword_arguments[local] if keyword_arguments.key?(local)
201
- message[:values][local] = informee.send(local) if informee.respond_to?(local, true)
200
+ message[:values][local] ||= keyword_arguments[local] if keyword_arguments.key?(local)
201
+ message[:values][local] ||= informee.send(local) if informee.respond_to?(local, true)
202
202
  end
203
203
  end
204
204
  message
@@ -1,3 +1,3 @@
1
1
  module Informed
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: informed
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zee Spencer
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-18 00:00:00.000000000 Z
11
+ date: 2017-12-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -87,16 +87,17 @@ executables: []
87
87
  extensions: []
88
88
  extra_rdoc_files: []
89
89
  files:
90
- - ".gitignore"
91
- - ".travis.yml"
92
- - CODE_OF_CONDUCT.md
90
+ - CHANGELOG.md
91
+ - CONTRIBUTING.md
93
92
  - Gemfile
94
- - LICENSE.txt
93
+ - Gemfile.lock
95
94
  - README.md
96
95
  - Rakefile
97
96
  - bin/console
98
97
  - bin/setup
98
+ - bin/setup-matrix
99
99
  - bin/test
100
+ - bin/test-matrix
100
101
  - bin/yard
101
102
  - bin/yardoc
102
103
  - bin/yri
@@ -124,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
124
125
  version: '0'
125
126
  requirements: []
126
127
  rubyforge_project:
127
- rubygems_version: 2.6.11
128
+ rubygems_version: 2.6.13
128
129
  signing_key:
129
130
  specification_version: 4
130
131
  summary: Informs on method calls so you know what your app is doing and why
data/.gitignore DELETED
@@ -1,9 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
@@ -1,9 +0,0 @@
1
- sudo: false
2
- language: ruby
3
- rvm:
4
- - 2.1.10
5
- - 2.2.7
6
- - 2.3.4
7
- - 2.4.2
8
- before_install: gem install bundler -v 1.15.4
9
- script: ruby test/informed_test.rb --documentation
@@ -1,74 +0,0 @@
1
- # Contributor Covenant Code of Conduct
2
-
3
- ## Our Pledge
4
-
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
11
-
12
- ## Our Standards
13
-
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
16
-
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
22
-
23
- Examples of unacceptable behavior by participants include:
24
-
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
28
- * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
31
- * Other conduct which could reasonably be considered inappropriate in a
32
- professional setting
33
-
34
- ## Our Responsibilities
35
-
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
39
-
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
45
-
46
- ## Scope
47
-
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
-
55
- ## Enforcement
56
-
57
- Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at zee@zincma.de. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
-
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
67
-
68
- ## Attribution
69
-
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
72
-
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2017 Zee Spencer
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in
13
- all copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
- THE SOFTWARE.