web_pipe 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +3 -4
- data/docs/extensions/rails.md +4 -3
- data/lib/web_pipe/extensions/params/params/transf.rb +3 -3
- data/lib/web_pipe/extensions/params/params.rb +3 -3
- data/lib/web_pipe/extensions/rails/rails.rb +4 -3
- data/lib/web_pipe/version.rb +1 -1
- data/web_pipe.gemspec +2 -2
- metadata +15 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0b9528f537d4932f676d0ff5db2489581b9c6371d4b134a9d455b77bca14afa6
|
4
|
+
data.tar.gz: 853e2302ac6f3a40e91e17164512a2d6c2e4b4ed28ab3cdf06b76c957f822548
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7396370ab3323bd7e62ef6439b1611e9c53d1d8481f8f882b8463c03d40d734c47085554e81b9225b1c65e02f39629a4dfcb1bb0358e95c53fe7a23f15015c1a
|
7
|
+
data.tar.gz: a6a58fd2c768d8e3b438dc7e7c16009961a782f9a8b7ab8eae57644628b827cf333da0fb151d7a43402cb6feed99e426df1b0d1c42696392d58ebc79a7e2b132
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,14 @@ 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.11.0] - 2019-12-28
|
8
|
+
### Added
|
9
|
+
- **BREAKING**. `dry-transformer` (former `transproc`) dependency is now
|
10
|
+
optional.
|
11
|
+
[[#37]](https://github.com/waiting-for-dev/web_pipe/pull/37)
|
12
|
+
- Switch `transproc` dependency to `dry-transformer`.
|
13
|
+
[[#37]](https://github.com/waiting-for-dev/web_pipe/pull/37)
|
14
|
+
|
7
15
|
## [0.10.0] - 2019-11-15
|
8
16
|
### Added
|
9
17
|
- `:rails` extension integrating with Ruby On Rails.
|
data/README.md
CHANGED
@@ -92,10 +92,9 @@ run HelloApp.new
|
|
92
92
|
|
93
93
|
## Current status
|
94
94
|
|
95
|
-
`web_pipe` is in active development
|
96
|
-
|
97
|
-
|
98
|
-
mechanism, are still missing.
|
95
|
+
`web_pipe` is in active development but ready to be used in any environment.
|
96
|
+
Common needs are covered and while you can expect some API changes, they won't
|
97
|
+
be very important and everything will be properly documented.
|
99
98
|
|
100
99
|
## Contributing
|
101
100
|
|
data/docs/extensions/rails.md
CHANGED
@@ -36,7 +36,7 @@ option that will play specially well here is
|
|
36
36
|
itself easily with Rails. Furthermore, we have a tailored `dry_view`
|
37
37
|
[extension](https://waiting-for-dev.github.io/web_pipe/docs/extensions/dry_view.html).
|
38
38
|
|
39
|
-
You need to use
|
39
|
+
You need to use `:rails` extension if:
|
40
40
|
|
41
41
|
- You want to use `action_view` as rendering system.
|
42
42
|
- You want to use rails url helpers from your `WebPipe` application.
|
@@ -50,7 +50,6 @@ some behaviour for the view layer:
|
|
50
50
|
|
51
51
|
- Which layout is applied to the template.
|
52
52
|
- Which helpers will become available to the templates.
|
53
|
-
- Where within `app/views/` templates are looked up.
|
54
53
|
|
55
54
|
By default, the controller in use is `ActionController::Base`, which means that
|
56
55
|
no layout is applied and only built-in helpers (for example,
|
@@ -95,7 +94,9 @@ end
|
|
95
94
|
|
96
95
|
Notice that we used the keyword `template:` instead of taking advantage of
|
97
96
|
automatic template lookup. We did that way so that we don't have to create also
|
98
|
-
an `ArticlesController`, but it's up to you.
|
97
|
+
an `ArticlesController`, but it's up to you. In the case of having an
|
98
|
+
`ArticlesController` we could just do `conn.render(:index, assigns: {
|
99
|
+
articles: Article.all })`.
|
99
100
|
|
100
101
|
Besides, this extension provides with two other methods:
|
101
102
|
|
@@ -1,13 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require '
|
3
|
+
require 'dry/transformer'
|
4
4
|
|
5
5
|
module WebPipe
|
6
6
|
module Params
|
7
7
|
module Transf
|
8
|
-
extend
|
8
|
+
extend Dry::Transformer::Registry
|
9
9
|
|
10
|
-
import
|
10
|
+
import Dry::Transformer::HashTransformations
|
11
11
|
|
12
12
|
def self.id(params)
|
13
13
|
params
|
@@ -14,9 +14,9 @@ module WebPipe
|
|
14
14
|
# # http://www.example.com?foo=bar
|
15
15
|
# conn.params #=> { 'foo' => 'bar' }
|
16
16
|
#
|
17
|
-
# Further processing can be specified thanks to `
|
17
|
+
# Further processing can be specified thanks to `dry-transformer` gem (you
|
18
18
|
# need to add it yourself to the Gemfile). All hash transformations
|
19
|
-
# in `
|
19
|
+
# in `dry-transformer` are available:
|
20
20
|
#
|
21
21
|
# @example
|
22
22
|
# # http://www.example.com?foo=bar
|
@@ -65,7 +65,7 @@ module WebPipe
|
|
65
65
|
# conn.
|
66
66
|
# params(fake) #=> { fake: :params }
|
67
67
|
#
|
68
|
-
# @see https://github.com/
|
68
|
+
# @see https://github.com/dry-rb/dry-transformer
|
69
69
|
module Params
|
70
70
|
# Key where configured transformations are set
|
71
71
|
PARAM_TRANSFORMATION_KEY = :param_transformations
|
@@ -40,7 +40,7 @@ module WebPipe
|
|
40
40
|
# itself easily with Rails. Furthermore, we have a tailored `dry_view`
|
41
41
|
# extension.
|
42
42
|
#
|
43
|
-
# You need to use
|
43
|
+
# You need to use `:rails` extension if:
|
44
44
|
#
|
45
45
|
# - You want to use `action_view` as rendering system.
|
46
46
|
# - You want to use rails url helpers from your {WebPipe} application.
|
@@ -54,7 +54,6 @@ module WebPipe
|
|
54
54
|
#
|
55
55
|
# - Which layout is applied to the template.
|
56
56
|
# - Which helpers will become available to the templates.
|
57
|
-
# - Where within `app/views/` templates are looked up.
|
58
57
|
#
|
59
58
|
# By default, the controller in use is `ActionController::Base`, which means
|
60
59
|
# that no layout is applied and only built-in helpers (for example,
|
@@ -99,7 +98,9 @@ module WebPipe
|
|
99
98
|
#
|
100
99
|
# Notice that we used the keyword `template:` instead of taking advantage of
|
101
100
|
# automatic template lookup. We did that way so that we don't have to create
|
102
|
-
# also an `ArticlesController`, but it's up to you.
|
101
|
+
# also an `ArticlesController`, but it's up to you. In the case of having an
|
102
|
+
# `ArticlesController` we could just do `conn.render(:index, assigns: {
|
103
|
+
# articles: Article.all })`.
|
103
104
|
#
|
104
105
|
# Besides, this extension provides with two other methods:
|
105
106
|
#
|
data/lib/web_pipe/version.rb
CHANGED
data/web_pipe.gemspec
CHANGED
@@ -39,10 +39,10 @@ Gem::Specification.new do |spec|
|
|
39
39
|
spec.add_runtime_dependency 'dry-struct', '~> 1.0'
|
40
40
|
spec.add_runtime_dependency 'dry-types', '~> 1.1'
|
41
41
|
spec.add_runtime_dependency 'rack', '~> 2.0'
|
42
|
-
spec.add_runtime_dependency 'transproc', '~> 1.1'
|
43
42
|
|
44
|
-
spec.add_development_dependency 'bundler'
|
43
|
+
spec.add_development_dependency 'bundler'
|
45
44
|
spec.add_development_dependency 'dry-schema', '~> 1.0'
|
45
|
+
spec.add_development_dependency 'dry-transformer', '~> 0.1'
|
46
46
|
spec.add_development_dependency 'dry-view', '~> 0.7'
|
47
47
|
spec.add_development_dependency 'pry-byebug'
|
48
48
|
spec.add_development_dependency 'rack-flash3', '~> 1.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: web_pipe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marc Busqué
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 1970-01-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-monads
|
@@ -67,47 +67,47 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '2.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: bundler
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - ">="
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
76
|
-
type: :
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: dry-schema
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '1.
|
89
|
+
version: '1.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '1.
|
96
|
+
version: '1.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name: dry-
|
98
|
+
name: dry-transformer
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '1
|
103
|
+
version: '0.1'
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '1
|
110
|
+
version: '0.1'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: dry-view
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -335,8 +335,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
335
335
|
- !ruby/object:Gem::Version
|
336
336
|
version: '0'
|
337
337
|
requirements: []
|
338
|
-
|
339
|
-
rubygems_version: 2.7.8
|
338
|
+
rubygems_version: 3.0.6
|
340
339
|
signing_key:
|
341
340
|
specification_version: 4
|
342
341
|
summary: Rack application builder through a pipe of operations on an immutable struct.
|