multi_block 1.1 → 1.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
- SHA1:
3
- metadata.gz: a5e8f01ab709dd3be84548791a9b7b67e43bd350
4
- data.tar.gz: 2137ce5ca59fb9fbdcd9eefc303998e1bda61071
2
+ SHA256:
3
+ metadata.gz: 4a6ff03fb7c3235d1d48b5fe5f64590fd6c8e74d2621d62aed2870e105a36904
4
+ data.tar.gz: 7131421a9ae98d9eb53b92220362435ebace0f177e3e1495f2d293f333b9cd42
5
5
  SHA512:
6
- metadata.gz: 38d32e968578403ca6f2bdf1e0dfde082d589a4d0d755b4e0febed43c61deec346521f5af7ad66f4d1504a87ac603781b6affcfea8b2d430e27dffa3155892fe
7
- data.tar.gz: 6b75186f120a1008aeb5ade1aafb374264d8e046d7e64fa905e937b261c516f9325ad00a75e9457b818e09cfbf122b9e636783c4b4fe463a7f03dc9e6a0bf9a9
6
+ metadata.gz: 9fb4375c0a9fb3a8d463836ea3f90aa6d3ed95cf43bf7f2ee378f3a8d7024b2355a6a376e4b2abbbca648cf208458b5ddfdaa385dc2210335f50464b3a21b8c4
7
+ data.tar.gz: e5da313ef554331df006502215bb6e0268d9c708b405d3eb5e1f7521dc916dd8fc86c573b1d03a535c5d58ab1b125e60389dc4443c86dbbfaca61dc40952bae9
@@ -1,6 +1,15 @@
1
- == 1.1.0 (master)
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
  * Simplify activating Array extension via: require 'multi_block/array'
4
12
 
5
- == 1.0.0
13
+ ## 1.0
14
+
6
15
  * Initial Release
@@ -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/
@@ -1,17 +1,18 @@
1
- = MultiBlock {<img src="https://badge.fury.io/rb/multi_block.svg" />}[http://badge.fury.io/rb/multi_block] {<img src="https://travis-ci.org/janlelis/multi_block.png" />}[https://travis-ci.org/janlelis/multi_block]
1
+ # MultiBlock [<img src="https://badge.fury.io/rb/multi_block.svg" />](https://badge.fury.io/rb/multi_block) [<img src="https://github.com/janlelis/multi_block/workflows/Test/badge.svg" />](https://github.com/janlelis/multi_block/actions?query=workflow%3ATest)
2
2
 
3
- MultiBlock is a mini framework for passing multiple blocks to methods. It uses {named procs}[https://github.com/janlelis/named_proc] to accomplish this with a simple syntax. The receiving method can either yield all blocks, or just call specific ones, identified by order or name.
3
+ MultiBlock is a mini framework for passing multiple blocks to methods. It uses [named procs](https://github.com/janlelis/named_proc) to accomplish this with a simple syntax. The receiving method can either yield all blocks, or just call specific ones, identified by order or name.
4
4
 
5
+ Currently supports CRuby only.
5
6
 
6
- == Setup
7
+ ## Setup
7
8
 
8
9
  Add to Gemfile:
9
10
 
10
11
  gem 'multi_block'
11
12
 
12
13
 
13
- == Usage
14
- === Defining methods that use multiple blocks
14
+ ## Usage
15
+ ### Defining methods that use multiple blocks
15
16
 
16
17
  The first argument given to yield always defines the desired block(s). The other arguments get directly passed to the block(s):
17
18
 
@@ -25,7 +26,7 @@ The first argument given to yield always defines the desired block(s). The other
25
26
  error: [500, "Internal Brawl Error"] # values are the args
26
27
 
27
28
 
28
- === Calling methods with multiple blocks
29
+ ### Calling methods with multiple blocks
29
30
 
30
31
  Consider these two example methods:
31
32
 
@@ -41,7 +42,7 @@ Consider these two example methods:
41
42
  end
42
43
 
43
44
 
44
- Multiple blocks can be passed using +blocks+:
45
+ Multiple blocks can be passed using `blocks`:
45
46
 
46
47
  ajax &blocks[
47
48
  proc.success{ puts "Yeah!" },
@@ -61,13 +62,13 @@ The dice method could, for example, be called in this way:
61
62
  ]
62
63
 
63
64
 
64
- == Bonus sugar: Array extension
65
+ ## Bonus sugar: Array extension
65
66
 
66
- If you like the slim <tt>&to_proc</tt> operator, you can further optimize the syntax by activating the core extension for array:
67
+ If you like the slim `&to_proc` operator, you can further optimize the syntax by activating the core extension for array:
67
68
 
68
69
  require 'multi_block/array'
69
70
 
70
- Now you do not need the +blocks+ helper anymore. Instead just do:
71
+ Now you do not need the `blocks` helper anymore. Instead just do:
71
72
 
72
73
  do_something, some_argument, &[
73
74
  proc.easy_way{
@@ -79,5 +80,6 @@ Now you do not need the +blocks+ helper anymore. Instead just do:
79
80
  ]
80
81
 
81
82
 
82
- == MIT License
83
+ ## MIT License
84
+
83
85
  See the original gist: https://gist.github.com/4b2f5fd0b45118e46d0f
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module MultiBlock
2
- VERSION = "1.1".freeze
4
+ VERSION = "1.2"
3
5
  end
data/multi_block.gemspec CHANGED
@@ -6,15 +6,15 @@ Gem::Specification.new do |s|
6
6
  s.name = "multi_block"
7
7
  s.version = MultiBlock::VERSION
8
8
  s.authors = ["Jan Lelis"]
9
- s.email = "mail@janlelis.de"
9
+ s.email = "hi@ruby.consulting"
10
10
  s.homepage = "https://github.com/janlelis/multi_block"
11
11
  s.summary = 'MultiBlock is a mini framework for passing multiple blocks to methods.'
12
12
  s.description = 'MultiBlock is a mini framework for passing multiple blocks to methods. It uses "named procs" to accomplish this in a nice way. The receiving method can either yield all blocks, or just call specific ones, identified by order or name. '
13
13
  s.required_ruby_version = '>= 1.9.3'
14
14
  s.files = Dir.glob %w{multi_block.gemspec lib/multi_block.rb lib/multi_block/version.rb lib/multi_block/implementation.rb lib/multi_block/core_ext.rb lib/multi_block/array.rb spec/multi_block_spec.rb}
15
- s.extra_rdoc_files = ["README.rdoc", "MIT-LICENSE.txt", "CHANGELOG.rdoc", ".travis.yml"]
15
+ s.extra_rdoc_files = ["README.md", "MIT-LICENSE.txt", "CHANGELOG.md", "CODE_OF_CONDUCT.md"]
16
16
  s.license = 'MIT'
17
- s.add_dependency 'named_proc', '~> 1.1'
17
+ s.add_dependency 'named_proc', '~> 1.2'
18
18
  s.add_development_dependency 'rspec', '~> 3.2'
19
- s.add_development_dependency 'rake', '~> 10.4'
19
+ s.add_development_dependency 'rake', '~> 13.0'
20
20
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_block
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.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: 2015-03-20 00:00:00.000000000 Z
11
+ date: 2021-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: named_proc
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.1'
19
+ version: '1.2'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.1'
26
+ version: '1.2'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,30 +44,30 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '10.4'
47
+ version: '13.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '10.4'
54
+ version: '13.0'
55
55
  description: 'MultiBlock is a mini framework for passing multiple blocks to methods.
56
56
  It uses "named procs" to accomplish this in a nice way. The receiving method can
57
57
  either yield all blocks, or just call specific ones, identified by order or name. '
58
- email: mail@janlelis.de
58
+ email: hi@ruby.consulting
59
59
  executables: []
60
60
  extensions: []
61
61
  extra_rdoc_files:
62
- - README.rdoc
62
+ - README.md
63
63
  - MIT-LICENSE.txt
64
- - CHANGELOG.rdoc
65
- - ".travis.yml"
64
+ - CHANGELOG.md
65
+ - CODE_OF_CONDUCT.md
66
66
  files:
67
- - ".travis.yml"
68
- - CHANGELOG.rdoc
67
+ - CHANGELOG.md
68
+ - CODE_OF_CONDUCT.md
69
69
  - MIT-LICENSE.txt
70
- - README.rdoc
70
+ - README.md
71
71
  - lib/multi_block.rb
72
72
  - lib/multi_block/array.rb
73
73
  - lib/multi_block/core_ext.rb
@@ -94,8 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  - !ruby/object:Gem::Version
95
95
  version: '0'
96
96
  requirements: []
97
- rubyforge_project:
98
- rubygems_version: 2.4.6
97
+ rubygems_version: 3.2.22
99
98
  signing_key:
100
99
  specification_version: 4
101
100
  summary: MultiBlock is a mini framework for passing multiple blocks to methods.
data/.travis.yml DELETED
@@ -1,17 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - ruby-head
5
- - 2.2.1
6
- - 2.2.0
7
- - 2.1.5
8
- - 2.1.4
9
- - 2.1.3
10
- - 2.1.2
11
- - 2.1.1
12
- - 2.1.0
13
- - 2.0.0
14
- - rbx-2
15
- - jruby-head
16
- - jruby-9000
17
-