abbreviato 0.8.2 → 0.8.3
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 +4 -4
- data/README.md +7 -15
- data/lib/abbreviato/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 73c9106f2060d0197ee1a6f22312a26d2ddf72a2
|
4
|
+
data.tar.gz: 63f61fb4e12eb6201c81026cc929882c2acd0de9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2eb06ea9c84ee0e2cf4f7afbbe6ab8f7c61017af34b5202b4020b7144ff74df6ddd49c37882caa271b1a36b0b9af0c15c0172292549fd8168d7a085a5ee00d07
|
7
|
+
data.tar.gz: cf8bf8e9eef63c702464e765f2af83b81e8989c32caeef7021621df6d4e4cd2107672777eac2b8b1db4e3c89b73e39c102c4e005a7863c999a6e08312e356f29
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
[](https://travis-ci.org/zendesk/abbreviato)
|
2
|
-
|
3
1
|
# abbreviato
|
4
2
|
|
5
|
-
|
3
|
+
[](https://travis-ci.org/zendesk/abbreviato)
|
4
|
+
|
5
|
+
*abbreviato* is a Ruby library for truncating HTML strings keeping the markup valid. It is a fork of [jorgemanrubia/truncato](https://github.com/jorgemanrubia/truncato) but focused on truncating to a bytesize, not on a per-character basis.
|
6
6
|
|
7
7
|
## Installing
|
8
8
|
|
@@ -15,7 +15,8 @@ gem 'abbreviato'
|
|
15
15
|
## Usage
|
16
16
|
|
17
17
|
```ruby
|
18
|
-
truncated_string, was_truncated = Abbreviato.truncate("<p>some text</p>", max_length: 4)
|
18
|
+
truncated_string, was_truncated = Abbreviato.truncate("<p>some text</p>", max_length: 4)
|
19
|
+
# => ["<p>s...</p>", true]
|
19
20
|
```
|
20
21
|
|
21
22
|
The configuration options are:
|
@@ -41,15 +42,6 @@ bundle exec rake
|
|
41
42
|
bundle exec wwtd
|
42
43
|
```
|
43
44
|
|
44
|
-
##
|
45
|
+
## Contribute
|
45
46
|
|
46
|
-
|
47
|
-
# Update the version
|
48
|
-
bundle exec bump patch
|
49
|
-
|
50
|
-
# Build
|
51
|
-
gem build abbreviato.gemspec
|
52
|
-
|
53
|
-
# Publish
|
54
|
-
gem push abbreviato-x.y.z.gem
|
55
|
-
```
|
47
|
+
Follow our [contribution guidelines](CONTRIBUTING.md).
|
data/lib/abbreviato/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abbreviato
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jorge Manrubia
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.8.
|
33
|
+
version: 1.8.2
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.8.
|
40
|
+
version: 1.8.2
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: awesome_print
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|