spanned 0.1.0.pre.beta → 0.1.1.pre.beta
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +31 -31
- data/CHANGELOG.md +2 -1
- data/Gemfile.lock +1 -1
- data/README.md +2 -0
- data/lib/spanned/version.rb +1 -1
- data/lib/spanned.rb +8 -2
- metadata +3 -3
- /data/{lightgraf.gemspec → spanned.gemspec} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3efc92529f3e3b2091a2bfe9ec7e71500647badb1af7e18b3653657fff0b8318
|
4
|
+
data.tar.gz: a69de5d901604dea3149c338b4f8e38448ece71245f0dc1697c821c2724e97db
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 355bcec83500b537e65e60e9bfdbb0df9820b606b1344119b9dcad0a83ab0171de884d15e1ddde4a21dcf3b2b673f5ec23812916764a6b2c5e1bf292d09d7e26
|
7
|
+
data.tar.gz: ec08fe578b0619a8c4d89682712af5080aada1da5b6b9f8d4f9ba0a7546061fc7d0e35b872f0999aeac95ebe996a5e6b682bb9a56c2febfa3ef5ea1b4fcb1dbd
|
data/.github/workflows/ruby.yml
CHANGED
@@ -5,34 +5,34 @@
|
|
5
5
|
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
6
|
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
7
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ "master" ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ "master" ]
|
15
|
+
|
16
|
+
permissions:
|
17
|
+
contents: read
|
18
|
+
|
19
|
+
jobs:
|
20
|
+
test:
|
21
|
+
|
22
|
+
runs-on: ubuntu-latest
|
23
|
+
strategy:
|
24
|
+
matrix:
|
25
|
+
ruby-version: ['3.1']
|
26
|
+
|
27
|
+
steps:
|
28
|
+
- uses: actions/checkout@v3
|
29
|
+
- name: Set up Ruby
|
30
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
31
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
32
|
+
# uses: ruby/setup-ruby@v1
|
33
|
+
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
|
34
|
+
with:
|
35
|
+
ruby-version: ${{ matrix.ruby-version }}
|
36
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
37
|
+
- name: Run tests
|
38
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
##
|
1
|
+
## In this update
|
2
|
+
- New `ignore` feature to skip certain chars
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/spanned/version.rb
CHANGED
data/lib/spanned.rb
CHANGED
@@ -15,13 +15,19 @@ module Spanned
|
|
15
15
|
# == Parameters:
|
16
16
|
# +text+:: +Str+: Text to include spans in
|
17
17
|
# +span_class+:: Optional +Str+: class to apply to every span
|
18
|
+
# +ignore+:: Optional +Arr+: chars to skip
|
18
19
|
# == Returns:
|
19
20
|
# +Str+:: Formatted text
|
20
|
-
def self.explode(text, span_class: nil)
|
21
|
+
def self.explode(text, span_class: nil, ignore: nil)
|
21
22
|
r = ''
|
22
23
|
open = span_class.nil? ? %(<span>) : %(<span class="#{span_class}">)
|
23
24
|
text.each_char do |i|
|
24
|
-
r +=
|
25
|
+
r +=
|
26
|
+
if ignore&.include?(i)
|
27
|
+
i
|
28
|
+
else
|
29
|
+
"#{open}#{i}</span>"
|
30
|
+
end
|
25
31
|
end
|
26
32
|
r
|
27
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spanned
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1.pre.beta
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aydar N.
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-06-
|
11
|
+
date: 2023-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -100,7 +100,7 @@ files:
|
|
100
100
|
- bin/setup
|
101
101
|
- lib/spanned.rb
|
102
102
|
- lib/spanned/version.rb
|
103
|
-
-
|
103
|
+
- spanned.gemspec
|
104
104
|
homepage: https://rubygems.org/gems/spanned
|
105
105
|
licenses:
|
106
106
|
- MIT
|
File without changes
|