publify_textfilter_code 9.1.0 → 9.2.0

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
  SHA256:
3
- metadata.gz: 0a4476c0310e8e984b21a6ba68995a6bdf34b5570713862ce335ada9ffd8099d
4
- data.tar.gz: 881f45163c69ec3e4692c2f7035577af946fc915ac5b12c3ecab8ca65615352f
3
+ metadata.gz: 76312e0fb3e3086bb5ae6efc05c74c09ec94e6fb1c2f36f2e613ab8e06cee20b
4
+ data.tar.gz: 891391b3e122dd417a165bc03c3f5da1f71afbfb51be9669adc3d678af1429a3
5
5
  SHA512:
6
- metadata.gz: 9c78ff0dfb016297ef854fbc187bc75450bee3b1e487300649ad06aa6c58bfecbde9858c32a9a9f0e4b2ac362fffb3194f3ca90b7a1719fcd330279d98aa5ca6
7
- data.tar.gz: f6fd63af2d26478a613e4aed950543593ab05e8a36ccd7ab2284f96c18e723420ec320f8f3fdbdf23e6a9bc7d4cb22300154dcd8bbbeb6a849052ca38fbcc5d2
6
+ metadata.gz: 754c77cbf784e9ac1cba4d53c7b476251486a89250a4b3e47a146dad88d9a18b68385a4ec8bf5e0aa919a7aed83502b25af80f3be1c090724c0c8a3c4f68d3b1
7
+ data.tar.gz: 17244a1ec40a4181ec737c018a4a5c4cb063c62c7545744150a478ba49ff4dd97babe2a83a0223396864763afdc1c28ed66b9f697b5dbda01fa587ed85113314
@@ -1,12 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 9.2.0 / 2021-01-17
4
+
5
+ * Upgrade to Rails 5.2 (mvz)
6
+ * Drop support for Ruby 2.2 and 2.3 (mvz)
7
+ * Add support for Ruby 2.7 (mvz)
8
+ * Depend on `publify_core` 9.2 (mvz)
9
+
3
10
  ## 9.1.0 / 2018-04-19
4
11
 
5
- * Depend on publify_core 9.1
12
+ * Depend on `publify_core` 9.1
6
13
 
7
14
  ## 9.0.1
8
15
 
9
- * Depend on released version of publify_core (mvz)
16
+ * Depend on released version of `publify_core` (mvz)
10
17
 
11
18
  ## 9.0.0
12
19
 
@@ -1,2 +1,4 @@
1
+ # frozen_string_literal: true
2
+
1
3
  Rails.application.routes.draw do
2
4
  end
@@ -1,11 +1,13 @@
1
- require 'coderay'
2
- require 'htmlentities'
1
+ # frozen_string_literal: true
2
+
3
+ require "coderay"
4
+ require "htmlentities"
3
5
 
4
6
  class PublifyApp
5
7
  class Textfilter
6
8
  class Code < TextFilterPlugin::MacroPre
7
- plugin_display_name 'Code'
8
- plugin_description 'Apply coderay highlighting to a code block'
9
+ plugin_display_name "Code"
10
+ plugin_description "Apply coderay highlighting to a code block"
9
11
 
10
12
  DEFAULT_OPTIONS = { css: :class,
11
13
  wrap: :span,
@@ -38,29 +40,29 @@ PHP (&#42;), Python (&#42;), RHTML, Ruby, Scheme, SQL (&#42;), XHTML, XML, YAML.
38
40
  }
39
41
  end
40
42
 
41
- def self.macrofilter(attrib, text = '')
42
- lang = attrib['lang']
43
- title = attrib['title']
44
- options = if attrib['linenumber'] == 'true'
43
+ def self.macrofilter(attrib, text = "")
44
+ lang = attrib["lang"]
45
+ title = attrib["title"]
46
+ options = if attrib["linenumber"] == "true"
45
47
  DEFAULT_OPTIONS.merge(line_numbers: :table,
46
48
  wrap: :div)
47
49
  else
48
50
  DEFAULT_OPTIONS
49
51
  end
50
52
 
51
- text = text.to_s.delete("\r").gsub(/\A\n/, '').chomp
53
+ text = text.to_s.delete("\r").gsub(/\A\n/, "").chomp
52
54
 
53
55
  begin
54
56
  text = CodeRay.scan(text, lang.downcase.to_sym).span(options)
55
57
  rescue
56
- text = HTMLEntities.new('xhtml1').encode(text)
58
+ text = HTMLEntities.new("xhtml1").encode(text)
57
59
  end
58
60
  text = "<notextile>#{text}</notextile>"
59
61
 
60
62
  titlecode = if title
61
63
  "<div class=\"codetitle\">#{title}</div>"
62
64
  else
63
- ''
65
+ ""
64
66
  end
65
67
 
66
68
  "<div class=\"CodeRay\"><pre>#{titlecode}#{text}</pre></div>"
@@ -1,7 +1,9 @@
1
- require 'publify_core'
2
- require 'publify_textfilter_code/engine'
3
- require 'text_filter_plugin'
4
- require 'publify_app/textfilter_code'
1
+ # frozen_string_literal: true
2
+
3
+ require "publify_core"
4
+ require "publify_textfilter_code/engine"
5
+ require "text_filter_plugin"
6
+ require "publify_app/textfilter_code"
5
7
 
6
8
  module PublifyTextfilterCode
7
9
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PublifyTextfilterCode
2
4
  class Engine < ::Rails::Engine
3
5
  end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module PublifyTextfilterCode
2
- VERSION = '9.1.0'.freeze
4
+ VERSION = "9.2.0"
3
5
  end
@@ -0,0 +1,30 @@
1
+ # frozen_string_literal: true
2
+
3
+ namespace :manifest do
4
+ def gemmable_files
5
+ `git ls-files -z`.split("\x0").reject do |file|
6
+ file.match(%r{^(bin|spec)/}) ||
7
+ file.end_with?("/.keep") ||
8
+ file.start_with?(".") ||
9
+ %w(Manifest.txt Gemfile Rakefile publify_textfilter_code.gemspec).include?(file)
10
+ end
11
+ end
12
+
13
+ def manifest_files
14
+ File.open("Manifest.txt").readlines.map(&:chomp)
15
+ end
16
+
17
+ desc "Create manifest"
18
+ task :create do
19
+ File.open("Manifest.txt", "w") do |manifest|
20
+ gemmable_files.each { |file| manifest.puts file }
21
+ end
22
+ end
23
+
24
+ desc "Check manifest"
25
+ task :check do
26
+ unless gemmable_files == manifest_files
27
+ raise "Manifest check failed, try recreating the manifest"
28
+ end
29
+ end
30
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # desc "Explaining what the task does"
2
4
  # task :publify_textfilter_code do
3
5
  # # Task goes here
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: publify_textfilter_code
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.1.0
4
+ version: 9.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matijs van Zuijlen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-19 00:00:00.000000000 Z
11
+ date: 2021-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coderay
@@ -44,56 +44,56 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: 9.1.0
47
+ version: 9.2.0
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: 9.1.0
54
+ version: 9.2.0
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rails
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 5.1.2
61
+ version: 5.2.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 5.1.2
68
+ version: 5.2.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec-rails
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: 3.6.0
75
+ version: '4.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: 3.6.0
82
+ version: '4.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.14.0
89
+ version: 0.18.5
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.14.0
96
+ version: 0.18.5
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sqlite3
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -123,12 +123,13 @@ files:
123
123
  - lib/publify_textfilter_code.rb
124
124
  - lib/publify_textfilter_code/engine.rb
125
125
  - lib/publify_textfilter_code/version.rb
126
+ - lib/tasks/manifest.rake
126
127
  - lib/tasks/publify_textfilter_code_tasks.rake
127
- homepage: https://publify.co
128
+ homepage: https://publify.github.io/
128
129
  licenses:
129
130
  - MIT
130
131
  metadata: {}
131
- post_install_message:
132
+ post_install_message:
132
133
  rdoc_options: []
133
134
  require_paths:
134
135
  - lib
@@ -136,16 +137,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
136
137
  requirements:
137
138
  - - ">="
138
139
  - !ruby/object:Gem::Version
139
- version: '0'
140
+ version: 2.4.0
140
141
  required_rubygems_version: !ruby/object:Gem::Requirement
141
142
  requirements:
142
143
  - - ">="
143
144
  - !ruby/object:Gem::Version
144
145
  version: '0'
145
146
  requirements: []
146
- rubyforge_project:
147
- rubygems_version: 2.7.6
148
- signing_key:
147
+ rubygems_version: 3.2.3
148
+ signing_key:
149
149
  specification_version: 4
150
150
  summary: Code text filter for the Publify blogging system.
151
151
  test_files: []