jekyll-asciinema 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 83e0519d17cf03ddb06b0ca2749f1e9e2d38eab6
4
- data.tar.gz: 07a2ac1351a6d4e5128013fbc627086c1c9fb00b
2
+ SHA256:
3
+ metadata.gz: a444185d79184ca758c5fe4e87b007fce0b429bf6c092fe90068d633be777c1e
4
+ data.tar.gz: f908624218107f828452234ca6a4f6804aa1a6bb63df8055ae691d39627c1f3d
5
5
  SHA512:
6
- metadata.gz: 68cabaf3fe1b74473e1c118ba6fd82c26960bb392d2b4a608eac174c5667d7a03f69d46f2261e02937d60494a080eacc8982613bd03f71d4ad4fcaffdc2da76a
7
- data.tar.gz: 5c262bce623e70a835b6906738d0450c4ca49aa7f45f46fe8311eb5c1ad916d7a1adeb2ffb6f3bab4056e1064efe97e9964a2a979eeea861693c3a2085f3aed9
6
+ metadata.gz: 5dcad9bff70a8d116470435b2bb96a31d6b06749571e3d16d829db62f191ba91168466d2b9e5018a3a9266d35c9a86e9ceaa30bfe8dc75701b6cc96024acd3e9
7
+ data.tar.gz: 34455700c8d5748f10f2836bacf927528a2e8f419d1a48e0a28f25af84b7f479c81c0f6171198133959263a8f34ffea6ad910a1a2ee5a40c5b3feef6614a13d7
checksums.yaml.gz.sig CHANGED
Binary file
data/.editorconfig ADDED
@@ -0,0 +1,10 @@
1
+ # EditorConfig is awesome: https://EditorConfig.org
2
+ root = true
3
+
4
+ [*]
5
+ charset = utf-8
6
+ end_of_line = lf
7
+ insert_final_newline = true
8
+ trim_trailing_whitespace = true
9
+ indent_style = space
10
+ indent_size = 2
@@ -0,0 +1,29 @@
1
+ name: Ruby Gem
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ os: [ubuntu-latest, macos-latest]
15
+ ruby: [2.7, '3.0']
16
+ runs-on: ${{ matrix.os }}
17
+ permissions:
18
+ contents: read
19
+ packages: write
20
+
21
+ steps:
22
+ - name: Checkout sources
23
+ uses: actions/checkout@v2
24
+ - name: Set up Ruby
25
+ uses: ruby/setup-ruby@v1
26
+ with:
27
+ ruby-version: ${{ matrix.ruby }}
28
+ bundler-cache: true
29
+ - run: bundle exec rake
data/.gitignore CHANGED
@@ -7,3 +7,39 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+
11
+ /bin/bayes.rb
12
+ /bin/cdiff
13
+ /bin/coderay
14
+ /bin/colortab
15
+ /bin/coveralls
16
+ /bin/decolor
17
+ /bin/htmldiff
18
+ /bin/kramdown
19
+ /bin/ldiff
20
+ /bin/listen
21
+ /bin/nokogiri
22
+ /bin/posix-spawn-benchmark
23
+ /bin/racc
24
+ /bin/redcarpet
25
+ /bin/restclient
26
+ /bin/reverse_markdown
27
+ /bin/rougify
28
+ /bin/ruby-parse
29
+ /bin/ruby-rewrite
30
+ /bin/safe_yaml
31
+ /bin/sass
32
+ /bin/sass-convert
33
+ /bin/scss
34
+ /bin/summarize.rb
35
+ /bin/term_cdiff
36
+ /bin/term_colortab
37
+ /bin/term_decolor
38
+ /bin/term_display
39
+ /bin/term_mandel
40
+ /bin/term_snow
41
+ /bin/thor
42
+ /bin/tilt
43
+ /bin/yard
44
+ /bin/yardoc
45
+ /bin/yri
data/.rubocop.yml ADDED
@@ -0,0 +1,17 @@
1
+ ---
2
+ AllCops:
3
+ TargetRubyVersion: 2.5
4
+ Exclude:
5
+ - 'bin/**'
6
+
7
+ Layout/LineLength:
8
+ Max: 170
9
+
10
+ BlockLength:
11
+ Max: 70
12
+
13
+ Style/Encoding:
14
+ Enabled: false
15
+
16
+ Style/GuardClause:
17
+ Enabled: false
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- ruby-2.2.1
1
+ ruby-2.7.4
data/CHANGELOG.md CHANGED
@@ -5,14 +5,21 @@ This project adheres to [Semantic Versioning][semver].
5
5
 
6
6
  ## [Unreleased]
7
7
 
8
+ ## [0.2.1] - 2021-11-21
9
+
10
+ - Support for alpanumeric asciicast IDs ([issue #2][issue-2]).
11
+
8
12
  ## [0.2.0] - 2015-11-29
9
13
 
10
- - Cryptographically sign gem.
14
+ - Cryptographically sign gem ([issue #1][issue-1]).
11
15
 
12
16
  ## 0.1.0 - 2015-03-21
13
17
 
14
18
  - Initial release.
15
19
 
16
- [Unreleased]: https://github.com/mnuessler/jekyll-asciinema/compare/v0.2.0...HEAD
17
- [0.2.0]: https://github.com/mnuessler/jekyll-asciinema/compare/v0.1.0...v0.2.0
18
20
  [semver]: https://semver.org
21
+ [Unreleased]: https://github.com/mnuessler/jekyll-asciinema/compare/v0.2.1...HEAD
22
+ [issue-1]: https://github.com/mnuessler/jekyll-asciinema/issues/1
23
+ [issue-2]: https://github.com/mnuessler/jekyll-asciinema/issues/2
24
+ [0.2.0]: https://github.com/mnuessler/jekyll-asciinema/compare/v0.1.0...v0.2.0
25
+ [0.2.1]: https://github.com/mnuessler/jekyll-asciinema/compare/v0.2.0...v0.2.1
data/Gemfile CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  source 'https://rubygems.org'
2
4
 
3
5
  gemspec
data/README.md CHANGED
@@ -1,9 +1,10 @@
1
1
  # Jekyll::Asciinema
2
-
3
- [![Build Status][badge-travis]][travis]
4
- [![Coverage Status][badge-coveralls]][coveralls]
2
+ [![.github/workflows/gem-build.yml][badge-build]][build]
5
3
  [![Gem Version][badge-gem]][rubygems]
6
- [![Dependency Status][badge-deps]][gemnasium]
4
+ [![Gem][badge-dl]][rubygems]
5
+ [![Coverage Status][badge-coveralls]][coveralls]
6
+ [![Code Climate][badge-gpa]][codeclimate]
7
+ [![License][badge-license]][license]
7
8
 
8
9
  Provides a [Liquid][liquid] tag for embedding asciicasts recorded with
9
10
  [asciinema][asciinema] for use in [Jekyll][jekyll] sites.
@@ -60,14 +61,18 @@ file to [rubygems.org](https://rubygems.org).
60
61
 
61
62
  Code is under [MIT License][license].
62
63
 
63
- [badge-travis]: https://travis-ci.org/mnuessler/jekyll-asciinema.svg?branch=master
64
+
65
+ [badge-build]: https://github.com/mnuessler/jekyll-asciinema/actions/workflows/gem-build.yml/badge.svg
64
66
  [badge-coveralls]: https://coveralls.io/repos/mnuessler/jekyll-asciinema/badge.svg
65
67
  [badge-gem]: https://badge.fury.io/rb/jekyll-asciinema.svg
66
- [badge-deps]: https://gemnasium.com/mnuessler/jekyll-asciinema.svg
67
- [travis]: https://travis-ci.org/mnuessler/jekyll-asciinema
68
+ [badge-gpa]: https://codeclimate.com/github/mnuessler/jekyll-asciinema/badges/gpa.svg
69
+ [badge-license]: https://img.shields.io/github/license/mnuessler/jekyll-asciinema.svg?maxAge=604800
70
+ [badge-dl]: https://img.shields.io/gem/dt/jekyll-asciinema.svg?maxAge=604800
71
+ [build]: https://github.com/mnuessler/jekyll-asciinema/actions/workflows/gem-build.yml
68
72
  [coveralls]: https://coveralls.io/r/mnuessler/jekyll-asciinema
69
73
  [rubygems]: https://rubygems.org/gems/jekyll-asciinema
70
74
  [gemnasium]: https://gemnasium.com/mnuessler/jekyll-asciinema
75
+ [codeclimate]: https://codeclimate.com/github/mnuessler/jekyll-asciinema
71
76
  [liquid]: http://liquidmarkup.org "Liquid templating language"
72
77
  [asciinema]: https://asciinema.org "Asciinema"
73
78
  [jekyll]: http://jekyllrb.com "Jekyll"
data/Rakefile CHANGED
@@ -1,15 +1,17 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
- require "rake/clean"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
5
+ require 'rake/clean'
4
6
  require 'jekyll/asciinema/version'
5
7
 
6
8
  RSpec::Core::RakeTask.new(:spec)
7
9
 
8
10
  # Execute tests per default
9
- task :default => :spec
11
+ task default: :spec
10
12
 
11
13
  # The 'clobber' task removes the final product, compared to the
12
14
  # 'clean' task which removes which removes all intermedidate files but
13
15
  # not the final product.
14
- CLEAN.include("pkg/*").exclude("pkg/*.gem")
16
+ CLEAN.include('pkg/*').exclude('pkg/*.gem')
15
17
  CLOBBER << "pkg/jekyll-asciinema-#{Jekyll::Asciinema::VERSION}.gem"
data/bin/bundle ADDED
@@ -0,0 +1,114 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'bundle' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "rubygems"
12
+
13
+ m = Module.new do
14
+ module_function
15
+
16
+ def invoked_as_script?
17
+ File.expand_path($0) == File.expand_path(__FILE__)
18
+ end
19
+
20
+ def env_var_version
21
+ ENV["BUNDLER_VERSION"]
22
+ end
23
+
24
+ def cli_arg_version
25
+ return unless invoked_as_script? # don't want to hijack other binstubs
26
+ return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
27
+ bundler_version = nil
28
+ update_index = nil
29
+ ARGV.each_with_index do |a, i|
30
+ if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
31
+ bundler_version = a
32
+ end
33
+ next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
+ bundler_version = $1
35
+ update_index = i
36
+ end
37
+ bundler_version
38
+ end
39
+
40
+ def gemfile
41
+ gemfile = ENV["BUNDLE_GEMFILE"]
42
+ return gemfile if gemfile && !gemfile.empty?
43
+
44
+ File.expand_path("../../Gemfile", __FILE__)
45
+ end
46
+
47
+ def lockfile
48
+ lockfile =
49
+ case File.basename(gemfile)
50
+ when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
51
+ else "#{gemfile}.lock"
52
+ end
53
+ File.expand_path(lockfile)
54
+ end
55
+
56
+ def lockfile_version
57
+ return unless File.file?(lockfile)
58
+ lockfile_contents = File.read(lockfile)
59
+ return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
60
+ Regexp.last_match(1)
61
+ end
62
+
63
+ def bundler_requirement
64
+ @bundler_requirement ||=
65
+ env_var_version || cli_arg_version ||
66
+ bundler_requirement_for(lockfile_version)
67
+ end
68
+
69
+ def bundler_requirement_for(version)
70
+ return "#{Gem::Requirement.default}.a" unless version
71
+
72
+ bundler_gem_version = Gem::Version.new(version)
73
+
74
+ requirement = bundler_gem_version.approximate_recommendation
75
+
76
+ return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
77
+
78
+ requirement += ".a" if bundler_gem_version.prerelease?
79
+
80
+ requirement
81
+ end
82
+
83
+ def load_bundler!
84
+ ENV["BUNDLE_GEMFILE"] ||= gemfile
85
+
86
+ activate_bundler
87
+ end
88
+
89
+ def activate_bundler
90
+ gem_error = activation_error_handling do
91
+ gem "bundler", bundler_requirement
92
+ end
93
+ return if gem_error.nil?
94
+ require_error = activation_error_handling do
95
+ require "bundler/version"
96
+ end
97
+ return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
98
+ warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
99
+ exit 42
100
+ end
101
+
102
+ def activation_error_handling
103
+ yield
104
+ nil
105
+ rescue StandardError, LoadError => e
106
+ e
107
+ end
108
+ end
109
+
110
+ m.load_bundler!
111
+
112
+ if m.invoked_as_script?
113
+ load Gem.bin_path("bundler", "bundle")
114
+ end
data/bin/bundler CHANGED
@@ -6,11 +6,11 @@
6
6
  # this file is here to facilitate running it.
7
7
  #
8
8
 
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
9
+ require "pathname"
10
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
11
  Pathname.new(__FILE__).realpath)
12
12
 
13
- require 'rubygems'
14
- require 'bundler/setup'
13
+ require "rubygems"
14
+ require "bundler/setup"
15
15
 
16
- load Gem.bin_path('bundler', 'bundler')
16
+ load Gem.bin_path("bundler", "bundler")
data/bin/jekyll ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'jekyll' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("jekyll", "jekyll")
data/bin/pry ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'pry' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("pry", "pry")
data/bin/rake CHANGED
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
2
4
  #
3
5
  # This file was generated by Bundler.
4
6
  #
@@ -6,11 +8,22 @@
6
8
  # this file is here to facilitate running it.
7
9
  #
8
10
 
9
- require 'pathname'
10
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
11
13
  Pathname.new(__FILE__).realpath)
12
14
 
13
- require 'rubygems'
14
- require 'bundler/setup'
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
15
28
 
16
- load Gem.bin_path('rake', 'rake')
29
+ load Gem.bin_path("rake", "rake")
data/bin/rspec ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rspec' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rspec-core", "rspec")
data/bin/rubocop ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'rubocop' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("rubocop", "rubocop")
data/bin/solargraph ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ #
5
+ # This file was generated by Bundler.
6
+ #
7
+ # The application 'solargraph' is installed as part of a gem, and
8
+ # this file is here to facilitate running it.
9
+ #
10
+
11
+ require "pathname"
12
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
13
+ Pathname.new(__FILE__).realpath)
14
+
15
+ bundle_binstub = File.expand_path("../bundle", __FILE__)
16
+
17
+ if File.file?(bundle_binstub)
18
+ if File.read(bundle_binstub, 300) =~ /This file was generated by Bundler/
19
+ load(bundle_binstub)
20
+ else
21
+ abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
22
+ Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
23
+ end
24
+ end
25
+
26
+ require "rubygems"
27
+ require "bundler/setup"
28
+
29
+ load Gem.bin_path("solargraph", "solargraph")
data/certs/mnuessler.pem CHANGED
@@ -1,21 +1,25 @@
1
1
  -----BEGIN CERTIFICATE-----
2
- MIIDbDCCAlSgAwIBAgIBATANBgkqhkiG9w0BAQUFADA+MRMwEQYDVQQDDAptLm51
3
- ZXNzbGVyMRMwEQYKCZImiZPyLGQBGRYDd2ViMRIwEAYKCZImiZPyLGQBGRYCZGUw
4
- HhcNMTUxMTI5MjEwNjQ4WhcNMTYxMTI4MjEwNjQ4WjA+MRMwEQYDVQQDDAptLm51
5
- ZXNzbGVyMRMwEQYKCZImiZPyLGQBGRYDd2ViMRIwEAYKCZImiZPyLGQBGRYCZGUw
6
- ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVwEy18KL+Ok5MZcKAFFZ7
7
- aZqaPAjPIdA3M66ZXBtC+7uQ7QQ1HkfDwbCcKr6xSrgZHJ8ihPuYY/52pfx1Go7o
8
- SOig3YircS8Vme8V7wZinEKax78vf1+eH91ZSRzb1UBqp/7xZKVSWpxj9t8dz3Ic
9
- sRayHmnLz76QKUC7ULq14123haEV0sdA7LO0uET0phEjgjNS5OiNu9TFcfY3ZDsM
10
- CU9ZmWmseGrAVo+Yfnd9BQvSK1+oKO/DFp0/e/SOY+cXceLGM4i1NU+Ws1D5HQMP
11
- 7Qk2LvsQBDnooQjZB8W4Ld0MH/iUFZ/uBtm//Udui3RRiDLP01MB0ZUMhLtUqmAB
12
- AgMBAAGjdTBzMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQWBBTg6ZtP
13
- ZCRslilSTFeJXj2fk9mzGTAcBgNVHREEFTATgRFtLm51ZXNzbGVyQHdlYi5kZTAc
14
- BgNVHRIEFTATgRFtLm51ZXNzbGVyQHdlYi5kZTANBgkqhkiG9w0BAQUFAAOCAQEA
15
- fzOGAh0enoAL2PTMmWSvAkD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MwLpm6rh3yTd0TL06GdiEMnzT6zyw22S+s6dIaYn
13
+ t/5Lzxoi18o7LmEUuU2E+tWAB2QV5fR1AgMBAAGjdTBzMAkGA1UdEwQCMAAwCwYD
14
+ VR0PBAQDAgSwMB0GA1UdDgQWBBT4jAkjXdmW+ZHr8SdD792NSNRlkTAcBgNVHREE
15
+ FTATgRFtLm51ZXNzbGVyQHdlYi5kZTAcBgNVHRIEFTATgRFtLm51ZXNzbGVyQHdl
16
+ Yi5kZTANBgkqhkiG9w0BAQsFAAOCAYEAZN1YHMNwFhHavy8MYiUqqp4cBM9wy09x
17
+ OGkfYGoe6MT5dXjo3FZ7qd/OXqn+miJEBuKjpj7klFihqYDL2dL/mHxvzsjN6Lvb
18
+ v2V9HqIc2xYfU9NkqAMF/DfcNhHIm06OqzjCVgCruke7Fa+tKu/VnalEVSjzgBm0
19
+ 9Myrq5U1BRyRDzR4bRdDaj9Q4G6FhQYB06K/5wlJtTJ7Pjsj6lz03D7Y8R/8coxc
20
+ mGwwNMDysD81IGyVv/67laa9EzuRPJAbl812BjIV1HDcFxdDjGsyVY6ycCs+PVhY
21
+ gS98/8WukAeV4EPJns4124C7X3chQ5ZvhPUAAVI/9lL7kowD1RdasYr1mCV4LDOO
22
+ /9/iSG6wOmzI+ITWJojglGfE4Uleqkzm4DmalBtqVksng1Zh3SA1pOsBM8/LRSXX
23
+ PWxQcxUKDOr6JR3Plq8PCzQoDPJ/gasr65u0xVObAYRx618/Rqt+JqtgP7pp5zfh
24
+ RxWlGH6fW+dAfRhudpHgqbyFhS33pBoT
21
25
  -----END CERTIFICATE-----
@@ -1,32 +1,37 @@
1
1
  # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
2
+ # frozen_string_literal: true
3
+
4
+ lib = File.expand_path('lib', __dir__)
3
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
6
  require 'jekyll/asciinema/version'
5
7
 
6
8
  Gem::Specification.new do |spec|
7
- spec.name = "jekyll-asciinema"
9
+ spec.name = 'jekyll-asciinema'
8
10
  spec.version = Jekyll::Asciinema::VERSION
9
- spec.authors = ["Matthias Nüßler"]
10
- spec.email = ["m.nuessler@web.de"]
11
+ spec.authors = ['Matthias Nüßler']
12
+ spec.email = ['m.nuessler@web.de']
11
13
 
12
- spec.summary = %q{Liquid tag for embedding asciicasts in Jekyll sites.}
14
+ spec.summary = %(Liquid tag for embedding asciicasts in Jekyll sites.)
13
15
  spec.description =
14
- %q{Provides a Liquid tag for embedding asciicasts recorded with asciinema for use in Jekyll sites.}
15
- spec.homepage = "https://github.com/mnuessler/jekyll-asciinema"
16
- spec.license = "MIT"
16
+ %(Provides a Liquid tag for embedding asciicasts recorded with asciinema for use in Jekyll sites.)
17
+ spec.homepage = 'https://github.com/mnuessler/jekyll-asciinema'
18
+ spec.license = 'MIT'
17
19
 
18
20
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
- spec.bindir = "exe"
21
+ spec.bindir = 'exe'
20
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
- spec.require_paths = ["lib"]
23
+ spec.require_paths = ['lib']
24
+ spec.required_ruby_version = '>= 2.5'
22
25
 
23
26
  spec.cert_chain = ['certs/mnuessler.pem']
24
- spec.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
27
+ spec.signing_key = File.expand_path('~/.ssh/gem-private_key.pem') if $PROGRAM_NAME =~ /gem\z/
25
28
 
26
- spec.add_runtime_dependency "jekyll", ">= 2.0"
29
+ spec.add_runtime_dependency 'jekyll', '>= 2.0'
27
30
 
28
- spec.add_development_dependency "bundler", "~> 1.9"
29
- spec.add_development_dependency "rake", "~> 10.0"
30
- spec.add_development_dependency "rspec", "~> 3.2"
31
- spec.add_development_dependency "pry", "~> 0"
31
+ spec.add_development_dependency 'bundler', '~> 2.2'
32
+ spec.add_development_dependency 'pry', '~> 0'
33
+ spec.add_development_dependency 'rake', '~> 13.0'
34
+ spec.add_development_dependency 'rspec', '~> 3.0'
35
+ spec.add_development_dependency 'rubocop', '~> 1.0'
36
+ spec.add_development_dependency 'solargraph', '~> 0'
32
37
  end
@@ -1,33 +1,36 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'jekyll'
2
4
 
3
5
  module Jekyll
4
6
  module Asciinema
7
+ # Implements a Liquid tag for embedding Asciicasts.
5
8
  class AsciicastTag < Liquid::Tag
6
- def render(context)
7
- if tag_contents = parse_tag(@markup.strip)
9
+ def render(_context)
10
+ if (tag_contents = parse_tag(@markup.strip))
8
11
  asciicast_id = tag_contents[0]
9
12
  render_tag(asciicast_id)
10
13
  else
11
- raise ArgumentError.new <<-EOS.gsub(/^ {12}/, '')
14
+ raise ArgumentError, <<-ERR_MSG.gsub(/^ {12}/, '')
12
15
  Syntax error in tag 'asciicast' while parsing the following markup:
13
16
 
14
17
  #{@markup}
15
18
 
16
19
  Valid syntax:
17
20
  {% asciicast 123456 %}
18
- EOS
21
+ ERR_MSG
19
22
  end
20
23
  end
21
24
 
22
25
  private
23
26
 
24
27
  def parse_tag(input)
25
- matched = input.match(/\A\s*(\d+)\s*\Z/)
28
+ matched = input.match(/\A\s*'?(\w+)'?\s*\Z/)
26
29
  [matched[1].strip] if matched && matched.length >= 2
27
30
  end
28
31
 
29
32
  def render_tag(asciicast_id)
30
- %Q{<script type="text/javascript" src="https://asciinema.org/a/#{asciicast_id}.js" id="asciicast-#{asciicast_id}" async="async"></script>}
33
+ %(<script src="https://asciinema.org/a/#{asciicast_id}.js" id="asciicast-#{asciicast_id}" async="async"></script>)
31
34
  end
32
35
  end
33
36
  end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Jekyll
2
4
  module Asciinema
3
- VERSION = "0.2.0"
5
+ VERSION = '0.2.1'
4
6
  end
5
7
  end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'jekyll/asciinema/version'
4
+ require 'jekyll/asciinema/asciicast_tag'
5
+
6
+ module Jekyll
7
+ # Provides functionality for Asciinema/Asciicasts.
8
+ module Asciinema
9
+ end
10
+ end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,36 +1,40 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-asciinema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthias Nüßler
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDbDCCAlSgAwIBAgIBATANBgkqhkiG9w0BAQUFADA+MRMwEQYDVQQDDAptLm51
14
- ZXNzbGVyMRMwEQYKCZImiZPyLGQBGRYDd2ViMRIwEAYKCZImiZPyLGQBGRYCZGUw
15
- HhcNMTUxMTI5MjEwNjQ4WhcNMTYxMTI4MjEwNjQ4WjA+MRMwEQYDVQQDDAptLm51
16
- ZXNzbGVyMRMwEQYKCZImiZPyLGQBGRYDd2ViMRIwEAYKCZImiZPyLGQBGRYCZGUw
17
- ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDVwEy18KL+Ok5MZcKAFFZ7
18
- aZqaPAjPIdA3M66ZXBtC+7uQ7QQ1HkfDwbCcKr6xSrgZHJ8ihPuYY/52pfx1Go7o
19
- SOig3YircS8Vme8V7wZinEKax78vf1+eH91ZSRzb1UBqp/7xZKVSWpxj9t8dz3Ic
20
- sRayHmnLz76QKUC7ULq14123haEV0sdA7LO0uET0phEjgjNS5OiNu9TFcfY3ZDsM
21
- CU9ZmWmseGrAVo+Yfnd9BQvSK1+oKO/DFp0/e/SOY+cXceLGM4i1NU+Ws1D5HQMP
22
- 7Qk2LvsQBDnooQjZB8W4Ld0MH/iUFZ/uBtm//Udui3RRiDLP01MB0ZUMhLtUqmAB
23
- AgMBAAGjdTBzMAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSw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000 Z
37
+ date: 2021-11-21 00:00:00.000000000 Z
34
38
  dependencies:
35
39
  - !ruby/object:Gem::Dependency
36
40
  name: jekyll
@@ -52,44 +56,72 @@ dependencies:
52
56
  requirements:
53
57
  - - "~>"
54
58
  - !ruby/object:Gem::Version
55
- version: '1.9'
59
+ version: '2.2'
56
60
  type: :development
57
61
  prerelease: false
58
62
  version_requirements: !ruby/object:Gem::Requirement
59
63
  requirements:
60
64
  - - "~>"
61
65
  - !ruby/object:Gem::Version
62
- version: '1.9'
66
+ version: '2.2'
67
+ - !ruby/object:Gem::Dependency
68
+ name: pry
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ type: :development
75
+ prerelease: false
76
+ version_requirements: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - "~>"
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
63
81
  - !ruby/object:Gem::Dependency
64
82
  name: rake
65
83
  requirement: !ruby/object:Gem::Requirement
66
84
  requirements:
67
85
  - - "~>"
68
86
  - !ruby/object:Gem::Version
69
- version: '10.0'
87
+ version: '13.0'
70
88
  type: :development
71
89
  prerelease: false
72
90
  version_requirements: !ruby/object:Gem::Requirement
73
91
  requirements:
74
92
  - - "~>"
75
93
  - !ruby/object:Gem::Version
76
- version: '10.0'
94
+ version: '13.0'
77
95
  - !ruby/object:Gem::Dependency
78
96
  name: rspec
79
97
  requirement: !ruby/object:Gem::Requirement
80
98
  requirements:
81
99
  - - "~>"
82
100
  - !ruby/object:Gem::Version
83
- version: '3.2'
101
+ version: '3.0'
84
102
  type: :development
85
103
  prerelease: false
86
104
  version_requirements: !ruby/object:Gem::Requirement
87
105
  requirements:
88
106
  - - "~>"
89
107
  - !ruby/object:Gem::Version
90
- version: '3.2'
108
+ version: '3.0'
91
109
  - !ruby/object:Gem::Dependency
92
- name: pry
110
+ name: rubocop
111
+ requirement: !ruby/object:Gem::Requirement
112
+ requirements:
113
+ - - "~>"
114
+ - !ruby/object:Gem::Version
115
+ version: '1.0'
116
+ type: :development
117
+ prerelease: false
118
+ version_requirements: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - "~>"
121
+ - !ruby/object:Gem::Version
122
+ version: '1.0'
123
+ - !ruby/object:Gem::Dependency
124
+ name: solargraph
93
125
  requirement: !ruby/object:Gem::Requirement
94
126
  requirements:
95
127
  - - "~>"
@@ -110,29 +142,37 @@ executables: []
110
142
  extensions: []
111
143
  extra_rdoc_files: []
112
144
  files:
145
+ - ".editorconfig"
146
+ - ".github/workflows/gem-build.yml"
113
147
  - ".gitignore"
114
148
  - ".rspec"
149
+ - ".rubocop.yml"
115
150
  - ".ruby-version"
116
- - ".travis.yml"
117
151
  - CHANGELOG.md
118
152
  - Gemfile
119
153
  - LICENSE.txt
120
154
  - README.md
121
155
  - Rakefile
156
+ - bin/bundle
122
157
  - bin/bundler
123
158
  - bin/console
159
+ - bin/jekyll
160
+ - bin/pry
124
161
  - bin/rake
162
+ - bin/rspec
163
+ - bin/rubocop
125
164
  - bin/setup
165
+ - bin/solargraph
126
166
  - certs/mnuessler.pem
127
167
  - jekyll-asciinema.gemspec
128
- - lib/jekyll-asciinema.rb
129
168
  - lib/jekyll/asciinema/asciicast_tag.rb
130
169
  - lib/jekyll/asciinema/version.rb
170
+ - lib/jekyll_asciinema.rb
131
171
  homepage: https://github.com/mnuessler/jekyll-asciinema
132
172
  licenses:
133
173
  - MIT
134
174
  metadata: {}
135
- post_install_message:
175
+ post_install_message:
136
176
  rdoc_options: []
137
177
  require_paths:
138
178
  - lib
@@ -140,16 +180,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
140
180
  requirements:
141
181
  - - ">="
142
182
  - !ruby/object:Gem::Version
143
- version: '0'
183
+ version: '2.5'
144
184
  required_rubygems_version: !ruby/object:Gem::Requirement
145
185
  requirements:
146
186
  - - ">="
147
187
  - !ruby/object:Gem::Version
148
188
  version: '0'
149
189
  requirements: []
150
- rubyforge_project:
151
- rubygems_version: 2.4.5.1
152
- signing_key:
190
+ rubygems_version: 3.1.6
191
+ signing_key:
153
192
  specification_version: 4
154
193
  summary: Liquid tag for embedding asciicasts in Jekyll sites.
155
194
  test_files: []
metadata.gz.sig CHANGED
Binary file
data/.travis.yml DELETED
@@ -1,6 +0,0 @@
1
- language: ruby
2
- before_install: gem install bundler
3
- rvm:
4
- - 2.1
5
- - 2.0
6
- - 1.9.3
@@ -1,7 +0,0 @@
1
- require "jekyll/asciinema/version"
2
- require "jekyll/asciinema/asciicast_tag"
3
-
4
- module Jekyll
5
- module Asciinema
6
- end
7
- end