hanami-assets 1.0.0 → 1.1.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/hanami-assets.gemspec +3 -2
- data/lib/hanami/assets/compressors/abstract.rb +3 -3
- data/lib/hanami/assets/configuration.rb +1 -1
- data/lib/hanami/assets/helpers.rb +1 -1
- data/lib/hanami/assets/version.rb +1 -1
- metadata +26 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f1acae3da2a74201363c0ef7f011b502637b8ec
|
4
|
+
data.tar.gz: 6537b5e8b3d5079be41159f8cdc88e7e05227c80
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d1f6a39c16b0b5ed09d12a0837d16415ca73c52608344b995b852c145f17ed0a80797cd6f0fcb0e7329fc275736d6d3e5fd2a00452139baf15b20e22fbc4918
|
7
|
+
data.tar.gz: 60c2cedc15aebfd795e73bd71738948c8e47af24d8ae4ab43dd8604283c68cddb733a1ae10ed4872277f68aeb7c39ecfaba8e5792de2c2d155da5382593a4054
|
data/CHANGELOG.md
CHANGED
data/hanami-assets.gemspec
CHANGED
@@ -20,13 +20,14 @@ Gem::Specification.new do |spec|
|
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
spec.required_ruby_version = '>= 2.3.0'
|
22
22
|
|
23
|
-
spec.add_runtime_dependency 'hanami-utils', '
|
24
|
-
spec.add_runtime_dependency 'hanami-helpers', '
|
23
|
+
spec.add_runtime_dependency 'hanami-utils', '1.1.0.beta1'
|
24
|
+
spec.add_runtime_dependency 'hanami-helpers', '1.1.0.beta1'
|
25
25
|
spec.add_runtime_dependency 'tilt', '~> 2.0', '>= 2.0.2'
|
26
26
|
|
27
27
|
spec.add_development_dependency 'bundler', '~> 1.6'
|
28
28
|
spec.add_development_dependency 'rake', '~> 11'
|
29
29
|
spec.add_development_dependency 'minitest', '~> 5'
|
30
|
+
spec.add_development_dependency 'rspec', '~> 3.5'
|
30
31
|
|
31
32
|
spec.add_development_dependency 'yui-compressor', '~> 0.12'
|
32
33
|
spec.add_development_dependency 'uglifier', '~> 2.7'
|
@@ -102,10 +102,10 @@ module Hanami
|
|
102
102
|
# @since 0.1.0
|
103
103
|
# @api private
|
104
104
|
def self.load_engine(type, engine_name)
|
105
|
-
type = Utils::String.
|
105
|
+
type = Utils::String.demodulize(type)
|
106
106
|
|
107
|
-
require "hanami/assets/compressors/#{ engine_name }_#{
|
108
|
-
Utils::Class.load!("#{ Utils::String.
|
107
|
+
require "hanami/assets/compressors/#{ engine_name }_#{ Utils::String.underscore(type) }"
|
108
|
+
Utils::Class.load!("#{ Utils::String.classify(engine_name) }#{ type }", Hanami::Assets::Compressors).new
|
109
109
|
rescue LoadError
|
110
110
|
raise UnknownCompressorError.new(type, engine_name)
|
111
111
|
end
|
@@ -81,7 +81,7 @@ module Hanami
|
|
81
81
|
# @api private
|
82
82
|
def self.for(base)
|
83
83
|
# TODO: this implementation is similar to Hanami::Controller::Configuration consider to extract it into Hanami::Utils
|
84
|
-
namespace = Utils::String.
|
84
|
+
namespace = Utils::String.namespace(base)
|
85
85
|
framework = Utils::Class.load_from_pattern!("(#{namespace}|Hanami)::Assets")
|
86
86
|
framework.configuration
|
87
87
|
end
|
@@ -332,7 +332,7 @@ module Hanami
|
|
332
332
|
# # <img src="https://assets.bookshelf.org/assets/logo-28a6b886de2372ee3922fcaf3f78f2d8.png" alt="Logo">
|
333
333
|
def image(source, options = {})
|
334
334
|
options[:src] = asset_path(source)
|
335
|
-
options[:alt] ||= Utils::String.
|
335
|
+
options[:alt] ||= Utils::String.titleize(::File.basename(source, WILDCARD_EXT))
|
336
336
|
|
337
337
|
html.img(options)
|
338
338
|
end
|
metadata
CHANGED
@@ -1,43 +1,43 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.1.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hanami-utils
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 1.1.0.beta1
|
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:
|
26
|
+
version: 1.1.0.beta1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: hanami-helpers
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 1.1.0.beta1
|
34
34
|
type: :runtime
|
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: 1.1.0.beta1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: tilt
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,6 +100,20 @@ dependencies:
|
|
100
100
|
- - "~>"
|
101
101
|
- !ruby/object:Gem::Version
|
102
102
|
version: '5'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: rspec
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - "~>"
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '3.5'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - "~>"
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '3.5'
|
103
117
|
- !ruby/object:Gem::Dependency
|
104
118
|
name: yui-compressor
|
105
119
|
requirement: !ruby/object:Gem::Requirement
|
@@ -240,9 +254,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
240
254
|
version: 2.3.0
|
241
255
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
242
256
|
requirements:
|
243
|
-
- - "
|
257
|
+
- - ">"
|
244
258
|
- !ruby/object:Gem::Version
|
245
|
-
version:
|
259
|
+
version: 1.3.1
|
246
260
|
requirements: []
|
247
261
|
rubyforge_project:
|
248
262
|
rubygems_version: 2.6.11
|