social_tokenizer 0.0.2 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 033b0946485085189337aa62f946877ccffa0359
4
- data.tar.gz: 5a549e6f192cba9ba907d15028b5680291fb4f3a
3
+ metadata.gz: e9c399d9552000d902fa8776e164e16678ee38f2
4
+ data.tar.gz: 8c38f6785416a1a0e172c4a1846b3c5cbeede0ee
5
5
  SHA512:
6
- metadata.gz: fdd66574167a3cf61e433274677dae159d930c4fab16c017495c3d9bdf0328acca11abad47f9d0ad7e1c6f2ae7d01c635de2aaaed075ef3243fe74bad6436a06
7
- data.tar.gz: 53b169ea05c3ecf19f8bd20caca4db799c4d950caffebda3f3ea7ec948b36a3476696b621a81e66d04a45be6b8f093a46fa61313c6dafd8ca95a4a196d38941b
6
+ metadata.gz: 4c500a4d6d993762f0bce8b080164ec2ceee04dc66a713595d2016fab32a5ef1ab0f1550be6111dd787bd62f70bee6cd5798fae1f544d0aae53e2af4dd61586c
7
+ data.tar.gz: 6fd33c7b1c4a7428e719509728cd7201e047c00c6b886a2f16531de8ce3cffe3b598b77422cfd0ebd0b50dd7ff274688443a84580ecfe40c7c715993418a09e2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- social_tokenizer (0.0.2)
4
+ social_tokenizer (0.0.4)
5
5
  activemodel (>= 4.1)
6
6
  social_tokenizer
7
7
  tokenizer
data/README.md CHANGED
@@ -5,6 +5,40 @@ Social Tokenizer
5
5
  [![Build Status](https://travis-ci.org/gemvein/social_tokenizer.svg)](https://travis-ci.org/gemvein/social_tokenizer)
6
6
  [![Coverage Status](https://coveralls.io/repos/gemvein/social_tokenizer/badge.png)](https://coveralls.io/r/gemvein/social_tokenizer)
7
7
 
8
+ Installation
9
+ ------------
10
+ First, add the gem to your Gemfile
11
+
12
+ gem 'social_tokenizer'
13
+
14
+ Next, run the following commands
15
+
16
+ > bundle install
17
+ > rails g social_tokenizer:install
18
+
19
+ Usage
20
+ -----
21
+
22
+ When chained onto the end of a string:
23
+
24
+ string_to_tokenize = 'This string contains a @mention and a #tag.'
25
+ hash_of_tokens = string_to_tokenize.social_tokenize
26
+
27
+ By accessing the object directly:
28
+
29
+ lang = :de
30
+ social_tokenizer = SocialTokenizer::Tokenizer.new(lang)
31
+ hash_of_tokens = social_tokenizer.social_tokenize(self)
32
+
33
+ Special configuration
34
+ ---------------------
35
+
36
+ Arbitrary token types can be defined in `initializers/social_tokenizer.rb` like this:
37
+
38
+ SocialTokenizer::TokenType.new(pattern: /^\+(.*)$/, replacement: '\1', key: :rate_up)
39
+ SocialTokenizer::TokenType.new(pattern: /^\-(.*)$/, replacement: '\1', key: :rate_down)
40
+
41
+
8
42
  Contributing to Social Tokenizer
9
43
  ----------------------------
10
44
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.4
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: social_tokenizer 0.0.2 ruby lib
5
+ # stub: social_tokenizer 0.0.4 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "social_tokenizer"
9
- s.version = "0.0.2"
9
+ s.version = "0.0.4"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: social_tokenizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karen Lundgren