card-mod-content 0.15.0 → 0.15.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
2
  SHA256:
3
- metadata.gz: 898002af2198d1a60f682509cd6fe7b47c37ea54a4a9b6f97d31625d26e37c82
4
- data.tar.gz: 48f24b7e2f812f29e320cfb3dd2b15c8bd043bddc192e8c96ab0a10dde9bd255
3
+ metadata.gz: af70b2c7dd6325fddf41719756af50e5c495b579e5f07d8b6099aa97df929135
4
+ data.tar.gz: 478c8eb7b8df2e7a1482cbc31422c2c9f55b34c1e19e37343c0380405797cb25
5
5
  SHA512:
6
- metadata.gz: 5b5f809221507e2ba3b23fc19bf2e8754511df1d1189c1b1e8c5857047b799aa3dc0dedfa43c4d07440232af20b0058377ba2d2842504dcd6b68e74ab158d163
7
- data.tar.gz: c74a4d90f21bb0f5b27335d9f8c637f9ca0ebd7ea02fada1b9572fe967e401c55ff48590a4b65559627c1ff1ab07b6187d71216375140872a7ef792fd094afb5
6
+ metadata.gz: 23920a9f1ce7783de6e6fc29a69235b2e04b5c3fafba390279e9e646c31095a7472513d55ca701aa8dd5b67d5efb3aa1a202a5474fb389e89da28327dcfe3f62
7
+ data.tar.gz: 9eb909a81cd2e2dd4eb38f14e6fd3d6d135882e3765b27ad9814f3a48e3f09c911d60fb7a7f060bb4a386f4560d50c3df61b8f4a9e0003b9278f0b26d68c07b0
@@ -1,6 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
- # require File.expand_path("../reference", __FILE__)
4
3
  load File.expand_path("reference.rb", __dir__)
5
4
 
6
5
  class Card
@@ -1,7 +1,5 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
 
3
- # require File.expand_path("../reference", __FILE__)
4
-
5
3
  class Card
6
4
  class Content
7
5
  module Chunk
@@ -2,26 +2,26 @@
2
2
 
3
3
  require "uri"
4
4
 
5
- # This wiki chunk matches arbitrary URIs, using patterns from the Ruby URI
6
- # modules.
7
- # It parses out a variety of fields that could be used by formats to format
8
- # the links in various ways (shortening domain names, hiding email addresses)
9
- # It matches email addresses and host.com.au domains without schemes (http://)
10
- # but adds these on as required.
11
- #
12
- # The heuristic used to match a URI is designed to err on the side of caution.
13
- # That is, it is more likely to not autolink a URI than it is to accidently
14
- # autolink something that is not a URI. The reason behind this is it is easier
15
- # to force a URI link by prefixing 'http://' to it than it is to escape and
16
- # incorrectly marked up non-URI.
17
- #
18
- # I'm using a part of the [ISO 3166-1 Standard][iso3166] for country name
19
- # suffixes.
20
- # The generic names are from www.bnoack.com/data/countrycode2.html)
21
- # [iso3166]: http://geotags.com/iso3166/
22
5
  class Card
23
6
  class Content
24
7
  module Chunk
8
+ # This wiki chunk matches arbitrary URIs, using patterns from the Ruby URI
9
+ # modules.
10
+ # It parses out a variety of fields that could be used by formats to format
11
+ # the links in various ways (shortening domain names, hiding email addresses)
12
+ # It matches email addresses and host.com.au domains without schemes (http://)
13
+ # but adds these on as required.
14
+ #
15
+ # The heuristic used to match a URI is designed to err on the side of caution.
16
+ # That is, it is more likely to not autolink a URI than it is to accidently
17
+ # autolink something that is not a URI. The reason behind this is it is easier
18
+ # to force a URI link by prefixing 'http://' to it than it is to escape and
19
+ # incorrectly marked up non-URI.
20
+ #
21
+ # I'm using a part of the [ISO 3166-1 Standard][iso3166] for country name
22
+ # suffixes.
23
+ # The generic names are from www.bnoack.com/data/countrycode2.html)
24
+ # [iso3166]: http://geotags.com/iso3166/
25
25
  class Uri < Abstract
26
26
  SCHEMES = %w[irc http https ftp ssh git sftp file ldap ldaps mailto].freeze
27
27
 
@@ -0,0 +1,19 @@
1
+ format :html do
2
+ view :input do
3
+ # Localize
4
+ "Content is stored in file and can't be edited."
5
+ end
6
+
7
+ view :bar_middle do
8
+ short_content
9
+ end
10
+
11
+ def short_content
12
+ icon_tag(:warning, class: "text-muted pe-2") +
13
+ wrap_with(:span, "file", class: "text-muted")
14
+ end
15
+
16
+ def standard_submit_button
17
+ multi_card_editor? ? super : ""
18
+ end
19
+ end
@@ -1,4 +1,5 @@
1
1
  include_set Abstract::Sources
2
+ include_set Abstract::CodeContent
2
3
 
3
4
  class << self
4
5
  def included host_class
@@ -25,25 +26,7 @@ def content
25
26
  end
26
27
 
27
28
  format :html do
28
- view :input do
29
- # Localize
30
- "Content is stored in file and can't be edited."
31
- end
32
-
33
29
  view :file_size do
34
30
  "#{card.name}: #{number_to_human_size card.content.bytesize}"
35
31
  end
36
-
37
- view :bar_middle do
38
- short_content
39
- end
40
-
41
- def short_content
42
- fa_icon("exclamation-circle", class: "text-muted pe-2") +
43
- wrap_with(:span, "file", class: "text-muted")
44
- end
45
-
46
- def standard_submit_button
47
- multi_card_editor? ? super : ""
48
- end
49
32
  end
@@ -4,7 +4,7 @@ format :html do
4
4
  end
5
5
 
6
6
  def short_content
7
- fa_icon("exclamation-circle", class: "text-muted pe-2") +
7
+ icon_tag(:warning, class: "text-muted pe-2") +
8
8
  wrap_with(:span, "read-only", class: "text-muted")
9
9
  end
10
10
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: card-mod-content
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.15.0
4
+ version: 0.15.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ethan McCutchen
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2023-01-04 00:00:00.000000000 Z
13
+ date: 2023-03-29 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: card
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - '='
20
20
  - !ruby/object:Gem::Version
21
- version: 1.105.0
21
+ version: 1.105.1
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - '='
27
27
  - !ruby/object:Gem::Version
28
- version: 1.105.0
28
+ version: 1.105.1
29
29
  description: ''
30
30
  email:
31
31
  - info@decko.org
@@ -43,7 +43,8 @@ files:
43
43
  - lib/card/content/chunk/uri.rb
44
44
  - lib/card/content/chunk/view_stub.rb
45
45
  - set/abstract/00_sources.rb
46
- - set/abstract/01_code_file.rb
46
+ - set/abstract/01_code_content.rb
47
+ - set/abstract/02_code_file.rb
47
48
  - set/abstract/haml_file.rb
48
49
  - set/abstract/lock.rb
49
50
  - set/abstract/read_only.rb