giphytranslate 1.0.0 → 1.0.4
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 159535ef11dced09b5a607372882191ffd3e64af
|
|
4
|
+
data.tar.gz: 0b05c7e573eb6e7be414cb2fa630b68b83199c4f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c2434eeed6c21c9a631ded6077b771097a4287057aef65fcda5f12dc21ffe8cfab96020503be7fa89492ca82b3acd398e58d5aec8c13fa2f970adf686e86eb55
|
|
7
|
+
data.tar.gz: a7854e3e894f3fb4fae33a6c3b661b7d2b6ab490f185e42685202488db5b04f0e246e1365c4f5be49a1e6cdc5fd7d3070da39bb9fbe59fdc059af4a73f135882
|
|
Binary file
|
|
Binary file
|
data/giphytranslate.gemspec
CHANGED
|
@@ -5,12 +5,12 @@ require "giphytranslate/version"
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "giphytranslate"
|
|
8
|
-
spec.version = '1.0.
|
|
8
|
+
spec.version = '1.0.4'
|
|
9
9
|
spec.authors = ["Xheni Myrtaj (xh3n1)"]
|
|
10
10
|
spec.email = ["myrtajxheni@gmail.com"]
|
|
11
11
|
|
|
12
12
|
spec.summary = 'A plugin for adding Giphy GIFS on Jekyll sites'
|
|
13
|
-
spec.description = '
|
|
13
|
+
spec.description = 'A plugin that translates words to gifs'
|
|
14
14
|
spec.homepage = "https://github.com/xh3n1/giphytranslate"
|
|
15
15
|
spec.license = "MIT"
|
|
16
16
|
|
data/lib/giphytranslate.rb
CHANGED
|
@@ -9,13 +9,13 @@ module Giphytranslate
|
|
|
9
9
|
|
|
10
10
|
def initialize(tagName, markup, tokens)
|
|
11
11
|
super
|
|
12
|
-
@
|
|
12
|
+
@string = markup
|
|
13
13
|
|
|
14
14
|
end
|
|
15
15
|
|
|
16
16
|
def render(context)
|
|
17
17
|
|
|
18
|
-
uri = URI("http://api.giphy.com/v1/gifs/translate?api_key=#{@@public_api}&
|
|
18
|
+
uri = URI("http://api.giphy.com/v1/gifs/translate?api_key=#{@@public_api}&s=#{@string}")
|
|
19
19
|
response = Net::HTTP.get(uri)
|
|
20
20
|
json_response = JSON.parse(response)
|
|
21
21
|
json_raw = json_response['data']
|
|
@@ -23,7 +23,7 @@ module Giphytranslate
|
|
|
23
23
|
@image_width = json_raw['image_width']
|
|
24
24
|
@image = json_raw['image_original_url']
|
|
25
25
|
|
|
26
|
-
"<img src=\"#{@image}\" height=\"#{@image_height}\" width=\"#{@image_width}\" alt=\"#{@
|
|
26
|
+
"<img src=\"#{@image}\" height=\"#{@image_height}\" width=\"#{@image_width}\" alt=\"#{@string}\">"
|
|
27
27
|
|
|
28
28
|
|
|
29
29
|
end
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: giphytranslate
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Xheni Myrtaj (xh3n1)
|
|
@@ -52,9 +52,7 @@ dependencies:
|
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
54
|
version: '3.0'
|
|
55
|
-
description:
|
|
56
|
-
handle translating from one vocabulary to another. In this case, words and phrases
|
|
57
|
-
to GIFs.
|
|
55
|
+
description: A plugin that translates words to gifs
|
|
58
56
|
email:
|
|
59
57
|
- myrtajxheni@gmail.com
|
|
60
58
|
executables: []
|
|
@@ -71,6 +69,8 @@ files:
|
|
|
71
69
|
- Rakefile
|
|
72
70
|
- bin/console
|
|
73
71
|
- bin/setup
|
|
72
|
+
- giphy-attribution-marks/Giphy Attribution Marks/Static Logos/Small/Light Backgrounds/PoweredBy_200px-White_HorizLogo.png
|
|
73
|
+
- giphytranslate-1.0.0.gem
|
|
74
74
|
- giphytranslate.gemspec
|
|
75
75
|
- lib/giphytranslate.rb
|
|
76
76
|
- lib/giphytranslate/version.rb
|