jekyll-twitter-plugin-2 0.0.1
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 +7 -0
- data/.gitignore +40 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/FORKED_FORMER_LICENCE +21 -0
- data/Gemfile +6 -0
- data/LICENSE +21 -0
- data/README.md +69 -0
- data/Rakefile +6 -0
- data/jekyll-twitter-plugin-2.gemspec +30 -0
- data/lib/jekyll-twitter-plugin-2.rb +287 -0
- metadata +97 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 599231152a51e8176d2156ffbebdbe2901287f23305ba73449876e0ed81b8e12
|
4
|
+
data.tar.gz: 97225bacd9cf282ae16641132e86d21d274de9b4b84bd0fee5b27094a8b14538
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: de3702b4b658ab0adf0ea8a6c546965b1077f6276a1adb759da6a1cc743b07b96623a791e7dd39d2eaa98a40ae63b8349dbfa362df887feaaf1c136c56427f8e
|
7
|
+
data.tar.gz: d2e794654fbe5b15bbc17e0ecd8e10ffef8af79260ad6b7a6586f75338b877e63e61fd400cf7c9928d359b77153f21bad6a3c30e658e231c6c06103dbcfaf83a
|
data/.gitignore
ADDED
@@ -0,0 +1,40 @@
|
|
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
|
+
.byebug_history
|
12
|
+
|
13
|
+
## Specific to RubyMotion:
|
14
|
+
.dat*
|
15
|
+
.repl_history
|
16
|
+
build/
|
17
|
+
|
18
|
+
## Documentation cache and generated files:
|
19
|
+
/.yardoc/
|
20
|
+
/_yardoc/
|
21
|
+
/doc/
|
22
|
+
/rdoc/
|
23
|
+
|
24
|
+
## Environment normalisation:
|
25
|
+
/.bundle/
|
26
|
+
/lib/bundler/man/
|
27
|
+
|
28
|
+
# for a library or gem, you might want to ignore these files since the code is
|
29
|
+
# intended to run in multiple environments; otherwise, check them in:
|
30
|
+
Gemfile.lock
|
31
|
+
.ruby-version
|
32
|
+
.ruby-gemset
|
33
|
+
|
34
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
35
|
+
.rvmrc
|
36
|
+
|
37
|
+
# App specific
|
38
|
+
.env
|
39
|
+
output_test.html
|
40
|
+
.tweet-cache
|
data/.rspec
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2014 Robert Murray
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 YuSan
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
# Jekyll Twitter Plugin 2
|
2
|
+
|
3
|
+
A Liquid tag plugin for the Jekyll blogging engine that embeds Tweets, Timelines and more from Twitter API.
|
4
|
+
|
5
|
+
and, this repo derived from https://github.com/rob-murray/jekyll-twitter-plugin.
|
6
|
+
The License here : [FORKED_FORMER_LICENCE](/FORKED_FORMER_LICENCE)
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Add this line to your application's Gemfile:
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
gem 'jekyll-twitter-plugin-2'
|
14
|
+
```
|
15
|
+
|
16
|
+
And then execute:
|
17
|
+
|
18
|
+
$ bundle
|
19
|
+
|
20
|
+
Or install it yourself as:
|
21
|
+
|
22
|
+
$ gem install jekyll-twitter-plugin-2
|
23
|
+
|
24
|
+
## Usage
|
25
|
+
|
26
|
+
### Here are a few examples
|
27
|
+
|
28
|
+
#### Tweet
|
29
|
+
|
30
|
+
An example of a Tweet - `{% twitter https://twitter.com/rubygems/status/518821243320287232 %}`
|
31
|
+
|
32
|
+

|
33
|
+
|
34
|
+
#### Timeline
|
35
|
+
|
36
|
+
An example of a Timeline - `{% twitter https://twitter.com/jekyllrb maxwidth=500 limit=5 %}`
|
37
|
+
|
38
|
+

|
39
|
+
|
40
|
+
#### Grid Timeline
|
41
|
+
|
42
|
+
An example of a Grid Timeline - `{% twitter https://twitter.com/TwitterDev/timelines/539487832448843776 limit=5 widget_type=grid maxwidth=500 %}`
|
43
|
+
|
44
|
+

|
45
|
+
|
46
|
+
#### Moment
|
47
|
+
|
48
|
+
An example of a Moment - `{% twitter https://twitter.com/i/moments/650667182356082688 maxwidth=500 %}`
|
49
|
+
|
50
|
+

|
51
|
+
|
52
|
+
|
53
|
+
## Development
|
54
|
+
|
55
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
56
|
+
|
57
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
58
|
+
|
59
|
+
## Contributing
|
60
|
+
|
61
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/jekyll-twitter-plugin-2. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
62
|
+
|
63
|
+
## License
|
64
|
+
|
65
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
66
|
+
|
67
|
+
## Code of Conduct
|
68
|
+
|
69
|
+
Everyone interacting in the Jekyll::Twitter::Plugin::2 project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/jekyll-twitter-plugin-2/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "jekyll-twitter-plugin-2"
|
7
|
+
spec.version = "0.0.1"
|
8
|
+
spec.authors = ["YuSan"]
|
9
|
+
spec.email = ["ysoga19@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "A Liquid tag plugin for Jekyll to embed Twitter, Timelines and more from Twitter API."
|
12
|
+
spec.homepage = "https://github.com/yu-san-19/jekyll-twitter-plugin-2"
|
13
|
+
spec.license = "MIT"
|
14
|
+
|
15
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
16
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
17
|
+
|
18
|
+
# Specify which files should be added to the gem when it is released.
|
19
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
20
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
21
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
22
|
+
end
|
23
|
+
spec.bindir = "exe"
|
24
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
25
|
+
spec.require_paths = ["lib"]
|
26
|
+
|
27
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
28
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
29
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
30
|
+
end
|
@@ -0,0 +1,287 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
require "fileutils"
|
3
|
+
require "net/http"
|
4
|
+
require "uri"
|
5
|
+
require "ostruct"
|
6
|
+
require "json"
|
7
|
+
require "digest"
|
8
|
+
|
9
|
+
##
|
10
|
+
# A Liquid tag plugin for Jekyll that renders Tweets from Twitter API.
|
11
|
+
# https://github.com/rob-murray/jekyll-twitter-plugin
|
12
|
+
#
|
13
|
+
module TwitterJekyll
|
14
|
+
VERSION = "2.0.0".freeze
|
15
|
+
REFER_TO_README = "Please see 'https://github.com/rob-murray/jekyll-twitter-plugin' for usage.".freeze
|
16
|
+
LIBRARY_VERSION = "jekyll-twitter-plugin-v#{VERSION}".freeze
|
17
|
+
REQUEST_HEADERS = { "User-Agent" => LIBRARY_VERSION }.freeze
|
18
|
+
|
19
|
+
# TODO: remove after deprecation cycle
|
20
|
+
CONTEXT_API_KEYS = %w(consumer_key consumer_secret access_token access_token_secret).freeze
|
21
|
+
ENV_API_KEYS = %w(TWITTER_CONSUMER_KEY TWITTER_CONSUMER_SECRET TWITTER_ACCESS_TOKEN TWITTER_ACCESS_TOKEN_SECRET).freeze
|
22
|
+
|
23
|
+
# Cache class that writes to filesystem
|
24
|
+
# TODO: Do i really need to cache?
|
25
|
+
# @api private
|
26
|
+
class FileCache
|
27
|
+
def initialize(path)
|
28
|
+
@cache_folder = File.expand_path path
|
29
|
+
FileUtils.mkdir_p @cache_folder
|
30
|
+
end
|
31
|
+
|
32
|
+
def read(key)
|
33
|
+
file_to_read = cache_file(cache_filename(key))
|
34
|
+
JSON.parse(File.read(file_to_read)) if File.exist?(file_to_read)
|
35
|
+
end
|
36
|
+
|
37
|
+
def write(key, data)
|
38
|
+
file_to_write = cache_file(cache_filename(key))
|
39
|
+
data_to_write = JSON.generate data.to_h
|
40
|
+
|
41
|
+
File.open(file_to_write, "w") do |f|
|
42
|
+
f.write(data_to_write)
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
46
|
+
private
|
47
|
+
|
48
|
+
def cache_file(filename)
|
49
|
+
File.join(@cache_folder, filename)
|
50
|
+
end
|
51
|
+
|
52
|
+
def cache_filename(cache_key)
|
53
|
+
"#{cache_key}.cache"
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
# Cache class that does nothing
|
58
|
+
# @api private
|
59
|
+
class NullCache
|
60
|
+
def initialize(*_args); end
|
61
|
+
|
62
|
+
def read(_key); end
|
63
|
+
|
64
|
+
def write(_key, _data); end
|
65
|
+
end
|
66
|
+
|
67
|
+
# Wrapper around an API
|
68
|
+
# @api private
|
69
|
+
class ApiClient
|
70
|
+
# Perform API request; return hash with html content
|
71
|
+
def fetch(api_request)
|
72
|
+
uri = api_request.to_uri
|
73
|
+
response = Net::HTTP.start(uri.host, use_ssl: api_request.ssl?) do |http|
|
74
|
+
http.read_timeout = 5
|
75
|
+
http.open_timeout = 5
|
76
|
+
http.get uri.request_uri, REQUEST_HEADERS
|
77
|
+
end
|
78
|
+
|
79
|
+
handle_response(api_request, response)
|
80
|
+
|
81
|
+
rescue Timeout::Error => e
|
82
|
+
ErrorResponse.new(api_request, e.class.name).to_h
|
83
|
+
end
|
84
|
+
|
85
|
+
private
|
86
|
+
|
87
|
+
def handle_response(api_request, response)
|
88
|
+
case response
|
89
|
+
when Net::HTTPSuccess
|
90
|
+
JSON.parse(response.body)
|
91
|
+
else
|
92
|
+
ErrorResponse.new(api_request, response.message).to_h
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
96
|
+
|
97
|
+
# @api private
|
98
|
+
ErrorResponse = Struct.new(:request, :message) do
|
99
|
+
def html
|
100
|
+
"<p>There was a '#{message}' error fetching URL: '#{request.entity_url}'</p>"
|
101
|
+
end
|
102
|
+
|
103
|
+
def to_h
|
104
|
+
{ html: html }
|
105
|
+
end
|
106
|
+
end
|
107
|
+
|
108
|
+
# Holds the URI were going to request with any parameters
|
109
|
+
# @api private
|
110
|
+
ApiRequest = Struct.new(:entity_url, :params) do
|
111
|
+
TWITTER_API_URL = "https://publish.twitter.com/oembed".freeze
|
112
|
+
|
113
|
+
# Always;
|
114
|
+
def ssl?
|
115
|
+
true
|
116
|
+
end
|
117
|
+
|
118
|
+
# Return a URI for Twitter API with query params
|
119
|
+
def to_uri
|
120
|
+
URI.parse(TWITTER_API_URL).tap do |uri|
|
121
|
+
uri.query = URI.encode_www_form url_params
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
# A cache key applicable to the current request with params
|
126
|
+
def cache_key
|
127
|
+
Digest::MD5.hexdigest("#{self.class.name}-#{unique_request_key}")
|
128
|
+
end
|
129
|
+
|
130
|
+
private
|
131
|
+
|
132
|
+
def url_params
|
133
|
+
params.merge(url: entity_url)
|
134
|
+
end
|
135
|
+
|
136
|
+
def unique_request_key
|
137
|
+
format("%s-%s", entity_url, params.to_s)
|
138
|
+
end
|
139
|
+
end
|
140
|
+
|
141
|
+
# Class to respond to Jekyll tag; entry point to library
|
142
|
+
# @api public
|
143
|
+
class TwitterTag < Liquid::Tag
|
144
|
+
ERROR_BODY_TEXT = "<p>Tweet could not be processed</p>".freeze
|
145
|
+
OEMBED_ARG = "oembed".freeze
|
146
|
+
|
147
|
+
attr_writer :cache # for testing
|
148
|
+
|
149
|
+
def initialize(_name, params, _tokens)
|
150
|
+
super
|
151
|
+
@api_request = parse_params(params)
|
152
|
+
end
|
153
|
+
|
154
|
+
# Class that implements caching strategy
|
155
|
+
# @api private
|
156
|
+
def self.cache_klass
|
157
|
+
FileCache
|
158
|
+
end
|
159
|
+
|
160
|
+
# Return html string for Jekyll engine
|
161
|
+
# @api public
|
162
|
+
def render(context)
|
163
|
+
api_secrets_deprecation_warning(context) # TODO: remove after deprecation cycle
|
164
|
+
response = cached_response || live_response
|
165
|
+
html_output_for(response)
|
166
|
+
end
|
167
|
+
|
168
|
+
private
|
169
|
+
|
170
|
+
def cache
|
171
|
+
@cache ||= self.class.cache_klass.new("./.tweet-cache")
|
172
|
+
end
|
173
|
+
|
174
|
+
def api_client
|
175
|
+
@api_client ||= ApiClient.new
|
176
|
+
end
|
177
|
+
|
178
|
+
# Return Twitter response or error html
|
179
|
+
# @api private
|
180
|
+
def html_output_for(response)
|
181
|
+
body = (response.html if response) || ERROR_BODY_TEXT
|
182
|
+
body
|
183
|
+
end
|
184
|
+
|
185
|
+
# Return response from API and write to cache
|
186
|
+
# @api private
|
187
|
+
def live_response
|
188
|
+
if response = api_client.fetch(@api_request)
|
189
|
+
cache.write(@api_request.cache_key, response)
|
190
|
+
build_response(response)
|
191
|
+
end
|
192
|
+
end
|
193
|
+
|
194
|
+
# Return response cache if present, otherwise nil
|
195
|
+
# @api private
|
196
|
+
def cached_response
|
197
|
+
response = cache.read(@api_request.cache_key)
|
198
|
+
build_response(response) unless response.nil?
|
199
|
+
end
|
200
|
+
|
201
|
+
# Return an `ApiRequest` with the url and arguments
|
202
|
+
# @api private
|
203
|
+
def parse_params(params)
|
204
|
+
args = params.split(/\s+/).map(&:strip)
|
205
|
+
invalid_args!(args) unless args.any?
|
206
|
+
|
207
|
+
if args[0].to_s == OEMBED_ARG # TODO: remove after deprecation cycle
|
208
|
+
arguments_deprecation_warning(args)
|
209
|
+
args.shift
|
210
|
+
end
|
211
|
+
|
212
|
+
url, *api_args = args
|
213
|
+
ApiRequest.new(url, parse_args(api_args))
|
214
|
+
end
|
215
|
+
|
216
|
+
# Transform 'a=b x=y' tag arguments into { "a" => "b", "x" => "y" }
|
217
|
+
# @api private
|
218
|
+
def parse_args(args)
|
219
|
+
args.each_with_object({}) do |arg, params|
|
220
|
+
k, v = arg.split("=").map(&:strip)
|
221
|
+
if k && v
|
222
|
+
v = Regexp.last_match[1] if v =~ /^'(.*)'$/
|
223
|
+
params[k] = v
|
224
|
+
end
|
225
|
+
end
|
226
|
+
end
|
227
|
+
|
228
|
+
# Format a response hash
|
229
|
+
# @api private
|
230
|
+
def build_response(h)
|
231
|
+
OpenStruct.new(h)
|
232
|
+
end
|
233
|
+
|
234
|
+
# TODO: remove after deprecation cycle
|
235
|
+
def arguments_deprecation_warning(args)
|
236
|
+
warn "#{LIBRARY_VERSION}: Passing '#{OEMBED_ARG}' as the first argument is not required anymore. This will result in an error in future versions.\nCalled with #{args.inspect}"
|
237
|
+
end
|
238
|
+
|
239
|
+
# TODO: remove after deprecation cycle
|
240
|
+
def api_secrets_deprecation_warning(context)
|
241
|
+
warn_if_twitter_secrets_in_context(context) || warn_if_twitter_secrets_in_env
|
242
|
+
end
|
243
|
+
|
244
|
+
# TODO: remove after deprecation cycle
|
245
|
+
def warn_if_twitter_secrets_in_context(context)
|
246
|
+
twitter_secrets = context.registers[:site].config.fetch("twitter", {})
|
247
|
+
return unless store_has_keys?(twitter_secrets, CONTEXT_API_KEYS)
|
248
|
+
|
249
|
+
warn_secrets_in_project("Jekyll _config.yml")
|
250
|
+
end
|
251
|
+
|
252
|
+
# TODO: remove after deprecation cycle
|
253
|
+
def warn_if_twitter_secrets_in_env
|
254
|
+
return unless store_has_keys?(ENV, ENV_API_KEYS)
|
255
|
+
|
256
|
+
warn_secrets_in_project("ENV")
|
257
|
+
end
|
258
|
+
|
259
|
+
# TODO: remove after deprecation cycle
|
260
|
+
def warn_secrets_in_project(source)
|
261
|
+
warn "#{LIBRARY_VERSION}: Found Twitter API keys in #{source}, this library does not require these keys anymore. You can remove these keys, if used for another library then ignore this message."
|
262
|
+
end
|
263
|
+
|
264
|
+
# TODO: remove after deprecation cycle
|
265
|
+
def store_has_keys?(store, keys)
|
266
|
+
keys.all? { |required_key| store.key?(required_key) }
|
267
|
+
end
|
268
|
+
|
269
|
+
# Raise error for invalid arguments
|
270
|
+
# @api private
|
271
|
+
def invalid_args!(arguments)
|
272
|
+
formatted_args = Array(arguments).join(" ")
|
273
|
+
raise ArgumentError, "Invalid arguments '#{formatted_args}' passed to 'jekyll-twitter-plugin'. #{REFER_TO_README}"
|
274
|
+
end
|
275
|
+
end
|
276
|
+
|
277
|
+
# Specialization of TwitterTag without any caching
|
278
|
+
# @api public
|
279
|
+
class TwitterTagNoCache < TwitterTag
|
280
|
+
def self.cache_klass
|
281
|
+
NullCache
|
282
|
+
end
|
283
|
+
end
|
284
|
+
end
|
285
|
+
|
286
|
+
Liquid::Template.register_tag("twitter", TwitterJekyll::TwitterTag)
|
287
|
+
Liquid::Template.register_tag("twitternocache", TwitterJekyll::TwitterTagNoCache)
|
metadata
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-twitter-plugin-2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- YuSan
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-08-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
- ysoga19@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".rspec"
|
64
|
+
- ".travis.yml"
|
65
|
+
- FORKED_FORMER_LICENCE
|
66
|
+
- Gemfile
|
67
|
+
- LICENSE
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- jekyll-twitter-plugin-2.gemspec
|
71
|
+
- lib/jekyll-twitter-plugin-2.rb
|
72
|
+
homepage: https://github.com/yu-san-19/jekyll-twitter-plugin-2
|
73
|
+
licenses:
|
74
|
+
- MIT
|
75
|
+
metadata: {}
|
76
|
+
post_install_message:
|
77
|
+
rdoc_options: []
|
78
|
+
require_paths:
|
79
|
+
- lib
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
81
|
+
requirements:
|
82
|
+
- - ">="
|
83
|
+
- !ruby/object:Gem::Version
|
84
|
+
version: '0'
|
85
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
requirements: []
|
91
|
+
rubyforge_project:
|
92
|
+
rubygems_version: 2.7.3
|
93
|
+
signing_key:
|
94
|
+
specification_version: 4
|
95
|
+
summary: A Liquid tag plugin for Jekyll to embed Twitter, Timelines and more from
|
96
|
+
Twitter API.
|
97
|
+
test_files: []
|