named_proc 1.1 → 1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/{CHANGELOG.rdoc → CHANGELOG.md} +11 -2
- data/CODE_OF_CONDUCT.md +74 -0
- data/{README.rdoc → README.md} +8 -6
- data/lib/named_proc/version.rb +3 -1
- data/named_proc.gemspec +3 -3
- metadata +12 -13
- data/.travis.yml +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: d56ef525a2ccfe33b27b5d130bb66e2aa2aeda4b8510c3b0e0f95b6cf102dcba
|
4
|
+
data.tar.gz: c49198ce58c0703f69f9f17edc1b569bcc10426631408d8b088c70715c459537
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 42d1afa38c1c0b5128fc72e08957a689f214ed8c28f0369e6f3486b6300b50e2ee009bfbfc8ab8c2ecfa72e7ff5e21486008ab841db819fab99b230a62966e22
|
7
|
+
data.tar.gz: aaf9a8e4eb90f881a6e94eb9dfa22c9c3fe87757b97fb416d9be81c5e7b1a5554e86425d68e6503dad69ebf0d2e6a8bfb4cc22d5f8154f23e95c769059680387
|
@@ -1,7 +1,16 @@
|
|
1
|
-
|
1
|
+
# Change Log
|
2
|
+
|
3
|
+
## 1.2
|
4
|
+
|
5
|
+
* Update project setup to 2021
|
6
|
+
* Re-release
|
7
|
+
|
8
|
+
## 1.1
|
9
|
+
|
2
10
|
* Updates for 2015 Rubies, drop support for Ruby 1
|
3
11
|
* Fix method to lambdafy a proc
|
4
12
|
* Add proc name to NamedProc#inspect
|
5
13
|
|
6
|
-
|
14
|
+
## 1.0
|
15
|
+
|
7
16
|
* Initial Release
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
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 conduct@janlelis.com. 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]: https://contributor-covenant.org
|
74
|
+
[version]: https://contributor-covenant.org/version/1/4/
|
data/{README.rdoc → README.md}
RENAMED
@@ -1,18 +1,19 @@
|
|
1
|
-
|
1
|
+
# Named Proc [<img src="https://badge.fury.io/rb/named_proc.svg" />](https://badge.fury.io/rb/named_proc) [<img src="https://github.com/janlelis/named_proc/workflows/Test/badge.svg" />](https://github.com/janlelis/named_proc/actions?query=workflow%3ATest)
|
2
2
|
|
3
|
-
When working with a lot of procs, naming them might become handy. It makes identifying them later easier
|
3
|
+
When working with a lot of procs, naming them might become handy. It makes identifying them later easier. For an example that uses named procs, see the [multi_block](https://github.com/janlelis/multi_block) gem!
|
4
4
|
|
5
|
+
Currently supports CRuby only.
|
5
6
|
|
6
|
-
|
7
|
+
## Setup
|
7
8
|
|
8
9
|
Add to Gemfile:
|
9
10
|
|
10
11
|
gem 'named_proc'
|
11
12
|
|
12
13
|
|
13
|
-
|
14
|
+
## Named Procs
|
14
15
|
|
15
|
-
A named proc acts like a normal proc, but it has a name attribute. You create it by calling a method with the desired name on
|
16
|
+
A named proc acts like a normal proc, but it has a name attribute. You create it by calling a method with the desired name on `proc`:
|
16
17
|
|
17
18
|
>> a = proc.even?{ |e| e.even? }
|
18
19
|
=> #<NamedProc:0x00000001ffc340@(irb):1>
|
@@ -32,5 +33,6 @@ In the same way, you can create lambdas:
|
|
32
33
|
>> b.lambda?
|
33
34
|
=> true
|
34
35
|
|
35
|
-
|
36
|
+
## MIT License
|
37
|
+
|
36
38
|
The original gist: https://gist.github.com/4b2f5fd0b45118e46d0f
|
data/lib/named_proc/version.rb
CHANGED
data/named_proc.gemspec
CHANGED
@@ -6,14 +6,14 @@ Gem::Specification.new do |s|
|
|
6
6
|
s.name = "named_proc"
|
7
7
|
s.version = NamedProc::VERSION
|
8
8
|
s.authors = ["Jan Lelis"]
|
9
|
-
s.email = "
|
9
|
+
s.email = "hi@ruby.consulting"
|
10
10
|
s.homepage = "https://github.com/janlelis/named_proc"
|
11
11
|
s.summary = "NamedProc: Like anonymous procs, but have a name."
|
12
12
|
s.description = "NamedProc: Like anonymous procs, but have a name. Example: lambda.codebrawl {} # creates an empty lambda with the name :codebrawl"
|
13
13
|
s.files = Dir.glob %w{named_proc.gemspec lib/named_proc.rb lib/named_proc/version.rb lib/named_proc/implementation.rb lib/named_proc/core_ext.rb spec/named_proc_spec.rb}
|
14
|
-
s.extra_rdoc_files = ["README.
|
14
|
+
s.extra_rdoc_files = ["README.md", "MIT-LICENSE.txt", "CHANGELOG.md", "CODE_OF_CONDUCT.md"]
|
15
15
|
s.license = 'MIT'
|
16
16
|
s.required_ruby_version = '>= 1.9.3'
|
17
17
|
s.add_development_dependency 'rspec', '~> 3.2'
|
18
|
-
s.add_development_dependency 'rake', '~>
|
18
|
+
s.add_development_dependency 'rake', '~> 13.0'
|
19
19
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: named_proc
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jan Lelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -30,29 +30,29 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
description: 'NamedProc: Like anonymous procs, but have a name. Example: lambda.codebrawl
|
42
42
|
{} # creates an empty lambda with the name :codebrawl'
|
43
|
-
email:
|
43
|
+
email: hi@ruby.consulting
|
44
44
|
executables: []
|
45
45
|
extensions: []
|
46
46
|
extra_rdoc_files:
|
47
|
-
- README.
|
47
|
+
- README.md
|
48
48
|
- MIT-LICENSE.txt
|
49
|
-
- CHANGELOG.
|
50
|
-
-
|
49
|
+
- CHANGELOG.md
|
50
|
+
- CODE_OF_CONDUCT.md
|
51
51
|
files:
|
52
|
-
-
|
53
|
-
-
|
52
|
+
- CHANGELOG.md
|
53
|
+
- CODE_OF_CONDUCT.md
|
54
54
|
- MIT-LICENSE.txt
|
55
|
-
- README.
|
55
|
+
- README.md
|
56
56
|
- lib/named_proc.rb
|
57
57
|
- lib/named_proc/core_ext.rb
|
58
58
|
- lib/named_proc/implementation.rb
|
@@ -78,8 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: '0'
|
80
80
|
requirements: []
|
81
|
-
|
82
|
-
rubygems_version: 2.4.6
|
81
|
+
rubygems_version: 3.2.22
|
83
82
|
signing_key:
|
84
83
|
specification_version: 4
|
85
84
|
summary: 'NamedProc: Like anonymous procs, but have a name.'
|