dry-view 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/dry/view/tilt.rb CHANGED
@@ -11,7 +11,7 @@ module Dry
11
11
 
12
12
  class << self
13
13
  def [](path, mapping, **options)
14
- ext = File.extname(path).sub(%r{^.}, "").to_sym
14
+ ext = File.extname(path).sub(/^./, "").to_sym
15
15
  activate_adapter ext
16
16
 
17
17
  with_mapping(mapping).new(path, **options)
@@ -15,7 +15,7 @@ module Dry
15
15
  end
16
16
 
17
17
  def self.activate
18
- Tilt.default_mapping.register ErbseTemplate, 'erb'
18
+ Tilt.default_mapping.register ErbseTemplate, "erb"
19
19
  self
20
20
  end
21
21
  end
@@ -12,7 +12,7 @@ module Dry
12
12
  @template = ::Erbse::Engine.new
13
13
  end
14
14
 
15
- def precompiled_template(locals)
15
+ def precompiled_template(_locals)
16
16
  @template.call(data)
17
17
  end
18
18
  end
@@ -3,6 +3,6 @@
3
3
  module Dry
4
4
  class View
5
5
  # @api private
6
- VERSION = "0.7.0"
6
+ VERSION = "0.7.1"
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,92 +1,98 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-view
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tim Riley
8
8
  - Piotr Solnica
9
9
  autorequire:
10
- bindir: exe
10
+ bindir: bin
11
11
  cert_chain: []
12
- date: 2019-03-05 00:00:00.000000000 Z
12
+ date: 2021-02-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: tilt
15
+ name: concurrent-ruby
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - "~>"
19
19
  - !ruby/object:Gem::Version
20
- version: '2.0'
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: 2.0.6
20
+ version: '1.0'
24
21
  type: :runtime
25
22
  prerelease: false
26
23
  version_requirements: !ruby/object:Gem::Requirement
27
24
  requirements:
28
25
  - - "~>"
29
26
  - !ruby/object:Gem::Version
30
- version: '2.0'
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: 2.0.6
27
+ version: '1.0'
34
28
  - !ruby/object:Gem::Dependency
35
- name: dry-core
29
+ name: dry-configurable
36
30
  requirement: !ruby/object:Gem::Requirement
37
31
  requirements:
38
32
  - - "~>"
39
33
  - !ruby/object:Gem::Version
40
- version: '0.2'
34
+ version: '0.1'
41
35
  type: :runtime
42
36
  prerelease: false
43
37
  version_requirements: !ruby/object:Gem::Requirement
44
38
  requirements:
45
39
  - - "~>"
46
40
  - !ruby/object:Gem::Version
47
- version: '0.2'
41
+ version: '0.1'
48
42
  - !ruby/object:Gem::Dependency
49
- name: dry-configurable
43
+ name: dry-core
50
44
  requirement: !ruby/object:Gem::Requirement
51
45
  requirements:
52
46
  - - "~>"
53
47
  - !ruby/object:Gem::Version
54
- version: '0.1'
48
+ version: '0.5'
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: '0.5'
55
52
  type: :runtime
56
53
  prerelease: false
57
54
  version_requirements: !ruby/object:Gem::Requirement
58
55
  requirements:
59
56
  - - "~>"
60
57
  - !ruby/object:Gem::Version
61
- version: '0.1'
58
+ version: '0.5'
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0.5'
62
62
  - !ruby/object:Gem::Dependency
63
- name: dry-equalizer
63
+ name: dry-inflector
64
64
  requirement: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.2'
68
+ version: '0.1'
69
69
  type: :runtime
70
70
  prerelease: false
71
71
  version_requirements: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0.2'
75
+ version: '0.1'
76
76
  - !ruby/object:Gem::Dependency
77
- name: dry-inflector
77
+ name: tilt
78
78
  requirement: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0.1'
82
+ version: '2.0'
83
+ - - ">="
84
+ - !ruby/object:Gem::Version
85
+ version: 2.0.6
83
86
  type: :runtime
84
87
  prerelease: false
85
88
  version_requirements: !ruby/object:Gem::Requirement
86
89
  requirements:
87
90
  - - "~>"
88
91
  - !ruby/object:Gem::Version
89
- version: '0.1'
92
+ version: '2.0'
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: 2.0.6
90
96
  - !ruby/object:Gem::Dependency
91
97
  name: bundler
92
98
  requirement: !ruby/object:Gem::Requirement
@@ -105,30 +111,30 @@ dependencies:
105
111
  name: rake
106
112
  requirement: !ruby/object:Gem::Requirement
107
113
  requirements:
108
- - - "~>"
114
+ - - ">="
109
115
  - !ruby/object:Gem::Version
110
- version: '10.0'
116
+ version: '0'
111
117
  type: :development
112
118
  prerelease: false
113
119
  version_requirements: !ruby/object:Gem::Requirement
114
120
  requirements:
115
- - - "~>"
121
+ - - ">="
116
122
  - !ruby/object:Gem::Version
117
- version: '10.0'
123
+ version: '0'
118
124
  - !ruby/object:Gem::Dependency
119
125
  name: rspec
120
126
  requirement: !ruby/object:Gem::Requirement
121
127
  requirements:
122
- - - "~>"
128
+ - - ">="
123
129
  - !ruby/object:Gem::Version
124
- version: '3.1'
130
+ version: '0'
125
131
  type: :development
126
132
  prerelease: false
127
133
  version_requirements: !ruby/object:Gem::Requirement
128
134
  requirements:
129
- - - "~>"
135
+ - - ">="
130
136
  - !ruby/object:Gem::Version
131
- version: '3.1'
137
+ version: '0'
132
138
  description: A complete, standalone view rendering system that gives you everything
133
139
  you need to write well-factored view code
134
140
  email:
@@ -138,20 +144,9 @@ executables: []
138
144
  extensions: []
139
145
  extra_rdoc_files: []
140
146
  files:
141
- - ".codeclimate.yml"
142
- - ".gitignore"
143
- - ".rspec"
144
- - ".travis.yml"
145
- - ".yardopts"
146
147
  - CHANGELOG.md
147
- - CONTRIBUTING.md
148
- - Gemfile
149
- - LICENSE.md
148
+ - LICENSE
150
149
  - README.md
151
- - Rakefile
152
- - bin/console
153
- - bin/setup
154
- - bin/setup_helpers.rb
155
150
  - dry-view.gemspec
156
151
  - lib/dry-view.rb
157
152
  - lib/dry/view.rb
@@ -177,7 +172,11 @@ files:
177
172
  homepage: https://dry-rb.org/gems/dry-view
178
173
  licenses:
179
174
  - MIT
180
- metadata: {}
175
+ metadata:
176
+ allowed_push_host: https://rubygems.org
177
+ changelog_uri: https://github.com/dry-rb/dry-view/blob/master/CHANGELOG.md
178
+ source_code_uri: https://github.com/dry-rb/dry-view
179
+ bug_tracker_uri: https://github.com/dry-rb/dry-view/issues
181
180
  post_install_message:
182
181
  rdoc_options: []
183
182
  require_paths:
@@ -186,14 +185,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
186
185
  requirements:
187
186
  - - ">="
188
187
  - !ruby/object:Gem::Version
189
- version: 2.2.0
188
+ version: 2.5.0
190
189
  required_rubygems_version: !ruby/object:Gem::Requirement
191
190
  requirements:
192
191
  - - ">="
193
192
  - !ruby/object:Gem::Version
194
193
  version: '0'
195
194
  requirements: []
196
- rubygems_version: 3.0.2
195
+ rubygems_version: 3.1.4
197
196
  signing_key:
198
197
  specification_version: 4
199
198
  summary: A complete, standalone view rendering system that gives you everything you
data/.codeclimate.yml DELETED
@@ -1,18 +0,0 @@
1
- version: "2"
2
- plugins:
3
- rubocop:
4
- enabled: true
5
- checks:
6
- Rubocop/AllCops:
7
- TargetRubyVersion: 2.2
8
- Rubocop/Metrics/ClassLength:
9
- Max: 150
10
- Rubocop/Metrics/LineLength:
11
- Max: 100
12
- Rubocop/Metrics/MethodLength:
13
- Max: 20
14
- exclude_patterns:
15
- - "benchmarks/"
16
- - "bin/"
17
- - "examples/"
18
- - "spec/"
data/.gitignore DELETED
@@ -1,26 +0,0 @@
1
- *.gem
2
- *.rbc
3
- /.config
4
- /coverage/
5
- /InstalledFiles
6
- /pkg/
7
- /spec/reports/
8
- /test/tmp/
9
- /test/version_tmp/
10
- /tmp/
11
-
12
- ## Documentation cache and generated files:
13
- /.yardoc/
14
- /_yardoc/
15
- /doc/
16
- /rdoc/
17
-
18
- ## Environment normalisation:
19
- /.bundle/
20
- /lib/bundler/man/
21
-
22
- # For a library or gem, you might want to ignore these files since the code is
23
- # intended to run in multiple environments; otherwise, check them in:
24
- Gemfile.lock
25
- .ruby-version
26
- .rvmrc
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --color
2
- --require spec_helper
data/.travis.yml DELETED
@@ -1,28 +0,0 @@
1
- language: ruby
2
- cache: bundler
3
- bundler_args: --without tools benchmarks
4
- before_install:
5
- - gem update --system
6
- - gem install bundler
7
- script:
8
- - bundle exec rake
9
- before_script:
10
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
11
- - chmod +x ./cc-test-reporter
12
- - ./cc-test-reporter before-build
13
- after_script:
14
- - "[ -d coverage ] && ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT"
15
- rvm:
16
- - 2.6.1
17
- - 2.5.3
18
- - 2.4.5
19
- - 2.3.8
20
- - jruby-9.2.6.0
21
- notifications:
22
- email: false
23
- webhooks:
24
- urls:
25
- - https://webhooks.gitter.im/e/19098b4253a72c9796db
26
- on_success: change # options: [always|never|change] default: always
27
- on_failure: always # options: [always|never|change] default: always
28
- on_start: false # default: false
data/.yardopts DELETED
@@ -1,5 +0,0 @@
1
- --query '@api.text != "private"'
2
- --markup-provider=redcarpet
3
- --markup=markdown
4
- --plugin junk
5
- lib/**/*.rb
data/CONTRIBUTING.md DELETED
@@ -1,29 +0,0 @@
1
- # Issue Guidelines
2
-
3
- ## Reporting bugs
4
-
5
- If you found a bug, report an issue and describe what's the expected behavior versus what actually happens. If the bug causes a crash, attach a full backtrace. If possible, a reproduction script showing the problem is highly appreciated.
6
-
7
- ## Reporting feature requests
8
-
9
- Report a feature request **only after discussing it first on [discourse.dry-rb.org](https://discourse.dry-rb.org)** where it was accepted. Please provide a concise description of the feature, don't link to a discussion thread, and instead summarize what was discussed.
10
-
11
- ## Reporting questions, support requests, ideas, concerns etc.
12
-
13
- **PLEASE DON'T** - use [discourse.dry-rb.org](http://discourse.dry-rb.org) instead.
14
-
15
- # Pull Request Guidelines
16
-
17
- A Pull Request will only be accepted if it addresses a specific issue that was reported previously, or fixes typos, mistakes in documentation etc.
18
-
19
- Other requirements:
20
-
21
- 1) Do not open a pull request if you can't provide tests along with it. If you have problems writing tests, ask for help in the related issue.
22
- 2) Follow the style conventions of the surrounding code. In most cases, this is standard ruby style.
23
- 3) Add API documentation if it's a new feature
24
- 4) Update API documentation if it changes an existing feature
25
- 5) Bonus points for sending a PR to [github.com/dry-rb/dry-rb.org](github.com/dry-rb/dry-rb.org) which updates user documentation and guides
26
-
27
- # Asking for help
28
-
29
- If these guidelines aren't helpful, and you're stuck, please post a message on [discourse.dry-rb.org](https://discourse.dry-rb.org).
data/Gemfile DELETED
@@ -1,32 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gemspec
4
-
5
- group :tools do
6
- gem 'hotch'
7
- gem 'pry-byebug', platform: :mri
8
- end
9
-
10
- group :test do
11
- gem "rack", ">= 2.0.6"
12
-
13
- gem "erbse"
14
- gem "erubi"
15
- gem "hamlit"
16
- gem "hamlit-block"
17
- gem 'slim', "~> 4.0"
18
-
19
- gem 'simplecov'
20
- end
21
-
22
- group :benchmarks do
23
- gem 'benchmark-ips'
24
- gem 'actionview'
25
- gem 'actionpack'
26
- end
27
-
28
- group :docs do
29
- gem 'yard'
30
- gem 'yard-junk'
31
- gem 'redcarpet', platforms: :mri
32
- end
data/LICENSE.md DELETED
@@ -1,10 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 Piotr Solnica
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
6
- furnished to do so, subject to the following conditions:
7
-
8
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
9
-
10
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
-
3
- require "rspec/core/rake_task"
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task default: [:spec]
data/bin/console DELETED
@@ -1,7 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "dry-view"
5
-
6
- require "pry"
7
- Pry.start
data/bin/setup DELETED
@@ -1,5 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require_relative "setup_helpers"
4
-
5
- Setup.execute "bundle"
data/bin/setup_helpers.rb DELETED
@@ -1,27 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require "open3"
4
-
5
- module Setup
6
- module_function
7
-
8
- def execute(cmd)
9
- puts "Running #{cmd}"
10
-
11
- status, out, err = nil
12
-
13
- Open3.popen3(cmd) do |stdin, stdout, stderr, wait_thr|
14
- _pid = wait_thr.pid
15
- stdin.close
16
- out = stdout.read
17
- err = stderr.read
18
- status = wait_thr.value
19
- end
20
-
21
- if !status.success?
22
- puts "Failed to run #{cmd}"
23
- puts err
24
- exit 1
25
- end
26
- end
27
- end