hanko 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -2
- data/lib/hanko/fingerprint.rb +12 -2
- data/lib/hanko/railtie.rb +1 -0
- data/lib/hanko/version.rb +1 -1
- metadata +29 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9e22a32ae5fb1b4255ea42713e9545b05dbc5ba
|
4
|
+
data.tar.gz: 721693c30aeca71ad2ea07fbcfeb645ab67f443a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 147246f21ffc435e9ce4e1c3256bc99a69c76d2d97048c90b84440bb6632ab54602f6705023db4466b7ea669e3c19f0eb71b143eddbb20f0dd3c306f2e38323f
|
7
|
+
data.tar.gz: a0783fa66b6a5c1da857f9fd5e85a7f4f70379904865f5d18a29b94328cf6348e6bbf18573a884da77b62c983fee5a74f6c2f73b8dc563efd636ba10fb3aabef
|
data/.travis.yml
CHANGED
@@ -1,8 +1,14 @@
|
|
1
1
|
language: ruby
|
2
|
+
before_install:
|
3
|
+
- gem install bundler
|
4
|
+
before_script:
|
5
|
+
- bundle update
|
6
|
+
cache: bundler
|
2
7
|
rvm:
|
3
8
|
- 2.0.0
|
4
|
-
- 2.1
|
5
|
-
- 2.2
|
9
|
+
- 2.1.8
|
10
|
+
- 2.2.4
|
11
|
+
- 2.3.0
|
6
12
|
- ruby-head
|
7
13
|
before_install: gem install bundler -v 1.10.6
|
8
14
|
gemfile:
|
data/lib/hanko/fingerprint.rb
CHANGED
@@ -3,10 +3,16 @@ require 'digest/sha2'
|
|
3
3
|
module Hanko
|
4
4
|
class Fingerprint
|
5
5
|
class << self
|
6
|
-
attr_writer :digest_class
|
6
|
+
attr_writer :digest_class, :cachable
|
7
7
|
|
8
8
|
def pon(assets_dir, source)
|
9
|
-
|
9
|
+
fingerprint = generate_pon(assets_dir, source)
|
10
|
+
|
11
|
+
if cachable?
|
12
|
+
cached_pon[source] ||= fingerprint
|
13
|
+
else
|
14
|
+
fingerprint
|
15
|
+
end
|
10
16
|
end
|
11
17
|
|
12
18
|
def digest_class=(klass)
|
@@ -32,6 +38,10 @@ module Hanko
|
|
32
38
|
def digest_class
|
33
39
|
@digest_class || ::Digest::SHA256
|
34
40
|
end
|
41
|
+
|
42
|
+
def cachable?
|
43
|
+
@cachable != false
|
44
|
+
end
|
35
45
|
end
|
36
46
|
end
|
37
47
|
end
|
data/lib/hanko/railtie.rb
CHANGED
data/lib/hanko/version.rb
CHANGED
metadata
CHANGED
@@ -1,129 +1,129 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanko
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- tsukasaoishi
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '3.2'
|
20
|
-
- -
|
20
|
+
- - <
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '4.3'
|
23
23
|
type: :runtime
|
24
24
|
prerelease: false
|
25
25
|
version_requirements: !ruby/object:Gem::Requirement
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '3.2'
|
30
|
-
- -
|
30
|
+
- - <
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '4.3'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: railties
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
|
-
- -
|
37
|
+
- - '>='
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: '3.2'
|
40
|
-
- -
|
40
|
+
- - <
|
41
41
|
- !ruby/object:Gem::Version
|
42
42
|
version: '4.3'
|
43
43
|
type: :development
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
|
-
- -
|
47
|
+
- - '>='
|
48
48
|
- !ruby/object:Gem::Version
|
49
49
|
version: '3.2'
|
50
|
-
- -
|
50
|
+
- - <
|
51
51
|
- !ruby/object:Gem::Version
|
52
52
|
version: '4.3'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
54
|
name: bundler
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
|
-
- -
|
57
|
+
- - '>='
|
58
58
|
- !ruby/object:Gem::Version
|
59
59
|
version: 1.3.0
|
60
|
-
- -
|
60
|
+
- - <
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '2.0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: 1.3.0
|
70
|
-
- -
|
70
|
+
- - <
|
71
71
|
- !ruby/object:Gem::Version
|
72
72
|
version: '2.0'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
74
|
name: rake
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
|
-
- -
|
77
|
+
- - '>='
|
78
78
|
- !ruby/object:Gem::Version
|
79
79
|
version: 0.8.7
|
80
80
|
type: :development
|
81
81
|
prerelease: false
|
82
82
|
version_requirements: !ruby/object:Gem::Requirement
|
83
83
|
requirements:
|
84
|
-
- -
|
84
|
+
- - '>='
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: 0.8.7
|
87
87
|
- !ruby/object:Gem::Dependency
|
88
88
|
name: minitest
|
89
89
|
requirement: !ruby/object:Gem::Requirement
|
90
90
|
requirements:
|
91
|
-
- -
|
91
|
+
- - '>='
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: '0'
|
94
94
|
type: :development
|
95
95
|
prerelease: false
|
96
96
|
version_requirements: !ruby/object:Gem::Requirement
|
97
97
|
requirements:
|
98
|
-
- -
|
98
|
+
- - '>='
|
99
99
|
- !ruby/object:Gem::Version
|
100
100
|
version: '0'
|
101
101
|
- !ruby/object:Gem::Dependency
|
102
102
|
name: minitest-reporters
|
103
103
|
requirement: !ruby/object:Gem::Requirement
|
104
104
|
requirements:
|
105
|
-
- -
|
105
|
+
- - '>='
|
106
106
|
- !ruby/object:Gem::Version
|
107
107
|
version: '0'
|
108
108
|
type: :development
|
109
109
|
prerelease: false
|
110
110
|
version_requirements: !ruby/object:Gem::Requirement
|
111
111
|
requirements:
|
112
|
-
- -
|
112
|
+
- - '>='
|
113
113
|
- !ruby/object:Gem::Version
|
114
114
|
version: '0'
|
115
115
|
- !ruby/object:Gem::Dependency
|
116
116
|
name: appraisal
|
117
117
|
requirement: !ruby/object:Gem::Requirement
|
118
118
|
requirements:
|
119
|
-
- -
|
119
|
+
- - '>='
|
120
120
|
- !ruby/object:Gem::Version
|
121
121
|
version: '0'
|
122
122
|
type: :development
|
123
123
|
prerelease: false
|
124
124
|
version_requirements: !ruby/object:Gem::Requirement
|
125
125
|
requirements:
|
126
|
-
- -
|
126
|
+
- - '>='
|
127
127
|
- !ruby/object:Gem::Version
|
128
128
|
version: '0'
|
129
129
|
description: Hanko add a asset fingerprint in query string of Rails asset url(image,
|
@@ -134,10 +134,10 @@ executables: []
|
|
134
134
|
extensions: []
|
135
135
|
extra_rdoc_files: []
|
136
136
|
files:
|
137
|
-
-
|
138
|
-
-
|
139
|
-
-
|
140
|
-
-
|
137
|
+
- .codeclimate.yml
|
138
|
+
- .gitignore
|
139
|
+
- .rubocop.yml
|
140
|
+
- .travis.yml
|
141
141
|
- Appraisals
|
142
142
|
- CODE_OF_CONDUCT.md
|
143
143
|
- Gemfile
|
@@ -169,17 +169,17 @@ require_paths:
|
|
169
169
|
- lib
|
170
170
|
required_ruby_version: !ruby/object:Gem::Requirement
|
171
171
|
requirements:
|
172
|
-
- -
|
172
|
+
- - '>='
|
173
173
|
- !ruby/object:Gem::Version
|
174
174
|
version: '0'
|
175
175
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
|
-
- -
|
177
|
+
- - '>='
|
178
178
|
- !ruby/object:Gem::Version
|
179
179
|
version: '0'
|
180
180
|
requirements: []
|
181
181
|
rubyforge_project:
|
182
|
-
rubygems_version: 2.
|
182
|
+
rubygems_version: 2.0.14
|
183
183
|
signing_key:
|
184
184
|
specification_version: 4
|
185
185
|
summary: Add digest fingerprint (SHA256, MD5 and so on) in query string of Rails asset
|