shortcode 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +1 -1
- data/README.md +0 -18
- data/lib/shortcode.rb +3 -0
- data/lib/shortcode/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: 11f134f87bfa70439f00a60c1b424648357cbbe4
|
4
|
+
data.tar.gz: 99a050c747acb9dfedc1f3f9e035d4eb9b496dc4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a021bdbe0979e2266972703969c0c01030a45138de2e1e99e36ba77845020b7f787056d3a13afd6337fdaef3c1b39e3b1004f4727d454a0d648d86f64953891b
|
7
|
+
data.tar.gz: 44ddde6b96b26707107ee0ba028de4404d965ed5453d9e1be587c09040f54d9c258d0d3b411162311ccdd57d3b7b2b5940109a40fe8af4a6f43952f0730e6d3a
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -278,24 +278,6 @@ shortcode.setup do |config|
|
|
278
278
|
end
|
279
279
|
```
|
280
280
|
|
281
|
-
### Singleton
|
282
|
-
|
283
|
-
You can optionally use Shortcode as a singleton instance with the same configuration throughout.
|
284
|
-
|
285
|
-
To do this, you call methods directly on the `Shortcode` class.
|
286
|
-
|
287
|
-
For example:
|
288
|
-
|
289
|
-
```ruby
|
290
|
-
Shortcode.setup do |config|
|
291
|
-
config.block_tags = [:quote]
|
292
|
-
end
|
293
|
-
|
294
|
-
Shortcode.register_presenter(QuotePresenterClass)
|
295
|
-
|
296
|
-
Shortcode.process('[quote]Some quote[/quote]')
|
297
|
-
```
|
298
|
-
|
299
281
|
## Contributing
|
300
282
|
|
301
283
|
1. Fork it
|
data/lib/shortcode.rb
CHANGED
@@ -12,6 +12,7 @@ rescue LoadError; end
|
|
12
12
|
class Shortcode
|
13
13
|
# This is providedc for backwards compatibility
|
14
14
|
def self.process(string, additional_attributes=nil)
|
15
|
+
warn "[DEPRECATION] singleton `Shortcode.process` is deprecated and will be removed in version 2.0. Please create a new instance `Shortcode.new` and call `process` on the instance."
|
15
16
|
singleton.process(string, additional_attributes)
|
16
17
|
end
|
17
18
|
|
@@ -22,11 +23,13 @@ class Shortcode
|
|
22
23
|
|
23
24
|
# This is providedc for backwards compatibility
|
24
25
|
def self.setup(&prc)
|
26
|
+
warn "[DEPRECATION] singleton `Shortcode.setup` is deprecated and will be removed in version 2.0. Please create a new instance `Shortcode.new` and call `setup` on the instance."
|
25
27
|
singleton.setup(&prc)
|
26
28
|
end
|
27
29
|
|
28
30
|
# This is providedc for backwards compatibility
|
29
31
|
def self.register_presenter(*presenters)
|
32
|
+
warn "[DEPRECATION] singleton `Shortcode.register_presenter` is deprecated and will be removed in version 2.0. Please create a new instance `Shortcode.new` and call `register_presenter` on the instance."
|
30
33
|
singleton.register_presenter(*presenters)
|
31
34
|
end
|
32
35
|
|
data/lib/shortcode/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shortcode
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jamie Dyer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parslet
|
@@ -221,7 +221,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
221
221
|
version: '0'
|
222
222
|
requirements: []
|
223
223
|
rubyforge_project:
|
224
|
-
rubygems_version: 2.
|
224
|
+
rubygems_version: 2.5.2
|
225
225
|
signing_key:
|
226
226
|
specification_version: 4
|
227
227
|
summary: Gem for parsing wordpress style shortcodes in ruby projects
|