web_pipe 0.11.0 → 0.12.0

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
  SHA256:
3
- metadata.gz: 0b9528f537d4932f676d0ff5db2489581b9c6371d4b134a9d455b77bca14afa6
4
- data.tar.gz: 853e2302ac6f3a40e91e17164512a2d6c2e4b4ed28ab3cdf06b76c957f822548
3
+ metadata.gz: 912213d537d97b530b24ba19289e68844c2ee1c46d9a49510167b5ddbef29468
4
+ data.tar.gz: e992a632ade636cea6185de8707935c28548d588d264152bac9150a724f80e83
5
5
  SHA512:
6
- metadata.gz: 7396370ab3323bd7e62ef6439b1611e9c53d1d8481f8f882b8463c03d40d734c47085554e81b9225b1c65e02f39629a4dfcb1bb0358e95c53fe7a23f15015c1a
7
- data.tar.gz: a6a58fd2c768d8e3b438dc7e7c16009961a782f9a8b7ab8eae57644628b827cf333da0fb151d7a43402cb6feed99e426df1b0d1c42696392d58ebc79a7e2b132
6
+ metadata.gz: a1f651795c8ea96d8d4d8ac37d452f7e6db6a4835215acad6784a445ecd36fe10c7bad16bc5e7defb9f7130caf8dbce4287ab3f4a0f0a7147f560adeb0a3cc59
7
+ data.tar.gz: cea9a48921c145d2fd8c4533e77f59cba2c080c31227943aec69653ca09cb18ff903deee39282594cd66bb2ca91a4d4adb924c03273d70eed4851b22127a1fd2
data/.travis.yml CHANGED
@@ -1,10 +1,10 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.4
5
4
  - 2.5
6
5
  - 2.6
6
+ - 2.7
7
7
  before_install:
8
8
  - gem update --system --no-doc
9
9
  script:
10
- - bundle exec rspec
10
+ - bundle exec rspec
data/CHANGELOG.md CHANGED
@@ -4,6 +4,15 @@ All notable changes to this project will be documented in this file.
4
4
  The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
5
  and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## [0.12.0] - 2019-12-30
8
+ ### Added
9
+ - **BREAKING**. Ruby 2.4 deprecated.
10
+ - Ruby 2.7 supported.
11
+
12
+ ### Fixed
13
+ - Ruby 2.7 argument warnings.
14
+ [[#38]](https://github.com/waiting-for-dev/web_pipe/pull/38)
15
+
7
16
  ## [0.11.0] - 2019-12-28
8
17
  ### Added
9
18
  - **BREAKING**. `dry-transformer` (former `transproc`) dependency is now
@@ -75,3 +75,14 @@ Immutability is a core design principle in `web_pipe`. All methods in
75
75
  `WebPipe::Conn` which are used to add data to it (both in core behaviour and
76
76
  extensions) return a fresh new instance. It also makes possible chaining
77
77
  methods in a very readable way.
78
+
79
+ You can use ruby 2.7 pattern matching on a `WebPipe::Conn` struct, as in:
80
+
81
+ ```ruby
82
+ # GET http://example.org
83
+ conn in { request_method:, host: }
84
+ request_method
85
+ # :get
86
+ host
87
+ # 'example.org'
88
+ ```
data/lib/web_pipe.rb CHANGED
@@ -14,8 +14,8 @@ module WebPipe
14
14
  klass.include(call)
15
15
  end
16
16
 
17
- def self.call(*args)
18
- DSL::Builder.new(*args)
17
+ def self.call(**opts)
18
+ DSL::Builder.new(**opts)
19
19
  end
20
20
 
21
21
  register_extension :cookies do
@@ -125,7 +125,7 @@ module WebPipe
125
125
 
126
126
  set_response_body(
127
127
  view_instance.call(
128
- view_input
128
+ **view_input
129
129
  ).to_str
130
130
  )
131
131
  end
@@ -145,7 +145,9 @@ module WebPipe
145
145
  .config
146
146
  .default_context
147
147
  .with(
148
- fetch_config(VIEW_CONTEXT_KEY, DEFAULT_VIEW_CONTEXT).call(self)
148
+ **fetch_config(
149
+ VIEW_CONTEXT_KEY, DEFAULT_VIEW_CONTEXT
150
+ ).call(self)
149
151
  )
150
152
  kwargs.merge(context: context)
151
153
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module WebPipe
4
- VERSION = '0.11.0'
4
+ VERSION = '0.12.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: web_pipe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Busqué
@@ -335,7 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
335
335
  - !ruby/object:Gem::Version
336
336
  version: '0'
337
337
  requirements: []
338
- rubygems_version: 3.0.6
338
+ rubygems_version: 3.1.2
339
339
  signing_key:
340
340
  specification_version: 4
341
341
  summary: Rack application builder through a pipe of operations on an immutable struct.