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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7e1672f3f4e4fd398377af8b9a26da09d3c4206a4801380e98a4b44bb6ad02d
4
- data.tar.gz: 3ddf4129259707ac420942d915c2a131be15b0fb0140fc1a72358bd1978bcd4d
3
+ metadata.gz: 3efc92529f3e3b2091a2bfe9ec7e71500647badb1af7e18b3653657fff0b8318
4
+ data.tar.gz: a69de5d901604dea3149c338b4f8e38448ece71245f0dc1697c821c2724e97db
5
5
  SHA512:
6
- metadata.gz: aefc9f66c26dc3d53c96650bd61f680f7a3c8a2b997d7705067cfe363970292b8a15fdc04f3fbb719e91587e5bd6fbbfbdf6071a9267424b84a25d07fdf69d80
7
- data.tar.gz: 5f39a812fa344be83ec8621d248a08fcdadfcedbe1ad517e48631f7168cbdba974c01f478735237a113442dd648b2177fa590e78b6202682c98a6d361958fe4b
6
+ metadata.gz: 355bcec83500b537e65e60e9bfdbb0df9820b606b1344119b9dcad0a83ab0171de884d15e1ddde4a21dcf3b2b673f5ec23812916764a6b2c5e1bf292d09d7e26
7
+ data.tar.gz: ec08fe578b0619a8c4d89682712af5080aada1da5b6b9f8d4f9ba0a7546061fc7d0e35b872f0999aeac95ebe996a5e6b682bb9a56c2febfa3ef5ea1b4fcb1dbd
@@ -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
- #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: ['2.6']
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
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
- ## Initial release
1
+ ## In this update
2
+ - New `ignore` feature to skip certain chars
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spanned (0.1.0.pre.beta)
4
+ spanned (0.1.1.pre.beta)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,2 +1,4 @@
1
1
  # Spanned
2
+ [![Gem Version](https://badge.fury.io/rb/spanned.svg)](https://badge.fury.io/rb/spanned)
3
+
2
4
  Helps wrap text in spans with classes
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Spanned
4
- VERSION = '0.1.0-beta'
4
+ VERSION = '0.1.1-beta'
5
5
  end
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 += "#{open}#{i}</span>"
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.0.pre.beta
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-06 00:00:00.000000000 Z
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
- - lightgraf.gemspec
103
+ - spanned.gemspec
104
104
  homepage: https://rubygems.org/gems/spanned
105
105
  licenses:
106
106
  - MIT
File without changes