rails_real_favicon 0.0.11 → 0.0.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/generators/favicon_generator.rb +9 -4
- data/lib/generators/web_app_manifest_initializer.txt +10 -10
- data/lib/rails_real_favicon/version.rb +1 -1
- data/test/dummy/log/test.log +60 -0
- metadata +2 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2850adddecf5d7eddde7fb82b49377aad05f0825
|
4
|
+
data.tar.gz: 7b81ffb622c8fe7fc55a30c981bfb099d5356475
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d1751c252e32dbc7fcfedebdf2e240d7878189d43545df562ff46f6fd66a3c1712c77abd728718de3784276c7ee03547167b37f08ef662599cbe492dad15762
|
7
|
+
data.tar.gz: 872503f8f85132d95ca1e2adf3567484ad31fd48fe1a8bdf8f2f5766ea031289d0460744597a9671c345d32331bfb7533c8df7006128d65d44a4f6210c78fdd3
|
@@ -1,4 +1,5 @@
|
|
1
|
-
require '
|
1
|
+
require 'net/http'
|
2
|
+
require 'uri'
|
2
3
|
require 'json'
|
3
4
|
require 'open-uri'
|
4
5
|
require 'zip'
|
@@ -27,9 +28,13 @@ class FaviconGenerator < Rails::Generators::Base
|
|
27
28
|
req['master_picture']['type'] = 'inline'
|
28
29
|
req['master_picture']['content'] = Base64.encode64(File.binread(master_pic))
|
29
30
|
|
30
|
-
|
31
|
-
|
32
|
-
|
31
|
+
uri = URI.parse("https://realfavicongenerator.net/api/favicon")
|
32
|
+
resp = Net::HTTP.start(uri.host, uri.port, use_ssl: uri.scheme == "https") do |http|
|
33
|
+
request = Net::HTTP::Post.new uri
|
34
|
+
request.body = { favicon_generation: req }.to_json
|
35
|
+
request["Content-Type"] = "application/json"
|
36
|
+
JSON.parse(http.request(request).body)
|
37
|
+
end
|
33
38
|
|
34
39
|
zip = resp['favicon_generation_result']['favicon']['package_url']
|
35
40
|
FileUtils.mkdir_p('app/assets/images/favicon')
|
@@ -1,10 +1,10 @@
|
|
1
|
-
# This file was generated by rails_favicon_generator, from
|
2
|
-
# https://realfavicongenerator.net/
|
3
|
-
|
4
|
-
# It makes files with .webmanifest extension first class files in the asset
|
5
|
-
# pipeline. This is to preserve this extension, as is it referenced in a call
|
6
|
-
# to asset_path in the _favicon.html.erb partial.
|
7
|
-
|
8
|
-
Rails.application.config.assets.configure do |env|
|
9
|
-
env.register_mime_type('application/manifest+json', extensions: ['.webmanifest'])
|
10
|
-
end
|
1
|
+
# This file was generated by rails_favicon_generator, from
|
2
|
+
# https://realfavicongenerator.net/
|
3
|
+
|
4
|
+
# It makes files with .webmanifest extension first class files in the asset
|
5
|
+
# pipeline. This is to preserve this extension, as is it referenced in a call
|
6
|
+
# to asset_path in the _favicon.html.erb partial.
|
7
|
+
|
8
|
+
Rails.application.config.assets.configure do |env|
|
9
|
+
env.register_mime_type('application/manifest+json', extensions: ['.webmanifest'])
|
10
|
+
end
|
data/test/dummy/log/test.log
CHANGED
@@ -70,3 +70,63 @@ FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_XML
|
|
70
70
|
--------------------------------
|
71
71
|
RailsRealFaviconTest: test_truth
|
72
72
|
--------------------------------
|
73
|
+
------------------------------------------------------------
|
74
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_XML
|
75
|
+
------------------------------------------------------------
|
76
|
+
-------------------------------------------------------------
|
77
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_HTML
|
78
|
+
-------------------------------------------------------------
|
79
|
+
-------------------------------------------------------------
|
80
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_JSON
|
81
|
+
-------------------------------------------------------------
|
82
|
+
--------------------------------
|
83
|
+
RailsRealFaviconTest: test_truth
|
84
|
+
--------------------------------
|
85
|
+
-------------------------------------------------------------
|
86
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_HTML
|
87
|
+
-------------------------------------------------------------
|
88
|
+
-------------------------------------------------------------
|
89
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_JSON
|
90
|
+
-------------------------------------------------------------
|
91
|
+
------------------------------------------------------------
|
92
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_XML
|
93
|
+
------------------------------------------------------------
|
94
|
+
--------------------------------
|
95
|
+
RailsRealFaviconTest: test_truth
|
96
|
+
--------------------------------
|
97
|
+
-------------------------------------------------------------
|
98
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_JSON
|
99
|
+
-------------------------------------------------------------
|
100
|
+
------------------------------------------------------------
|
101
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_XML
|
102
|
+
------------------------------------------------------------
|
103
|
+
-------------------------------------------------------------
|
104
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_HTML
|
105
|
+
-------------------------------------------------------------
|
106
|
+
--------------------------------
|
107
|
+
RailsRealFaviconTest: test_truth
|
108
|
+
--------------------------------
|
109
|
+
-------------------------------------------------------------
|
110
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_HTML
|
111
|
+
-------------------------------------------------------------
|
112
|
+
-------------------------------------------------------------
|
113
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_JSON
|
114
|
+
-------------------------------------------------------------
|
115
|
+
------------------------------------------------------------
|
116
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_XML
|
117
|
+
------------------------------------------------------------
|
118
|
+
--------------------------------
|
119
|
+
RailsRealFaviconTest: test_truth
|
120
|
+
--------------------------------
|
121
|
+
-------------------------------------------------------------
|
122
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_JSON
|
123
|
+
-------------------------------------------------------------
|
124
|
+
-------------------------------------------------------------
|
125
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_HTML
|
126
|
+
-------------------------------------------------------------
|
127
|
+
------------------------------------------------------------
|
128
|
+
FaviconGeneratorTest: test_replace_URLs_by_asset_path_in_XML
|
129
|
+
------------------------------------------------------------
|
130
|
+
--------------------------------
|
131
|
+
RailsRealFaviconTest: test_truth
|
132
|
+
--------------------------------
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_real_favicon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Philippe Bernard
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -24,20 +24,6 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '3.1'
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: rest-client
|
29
|
-
requirement: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - "~>"
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: '2.0'
|
34
|
-
type: :runtime
|
35
|
-
prerelease: false
|
36
|
-
version_requirements: !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - "~>"
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
version: '2.0'
|
41
27
|
- !ruby/object:Gem::Dependency
|
42
28
|
name: json
|
43
29
|
requirement: !ruby/object:Gem::Requirement
|