social_tokenizer 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.coveralls.yml +1 -0
- data/.document +5 -0
- data/.travis.yml +5 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +120 -0
- data/LICENSE.txt +20 -0
- data/README.md +23 -0
- data/Rakefile +39 -0
- data/VERSION +1 -0
- data/features/social_tokenizer.feature +21 -0
- data/features/step_definitions/social_tokenizer_steps.rb +35 -0
- data/features/support/env.rb +4 -0
- data/lib/generators/social_tokenizer/install/install_generator.rb +19 -0
- data/lib/generators/social_tokenizer/install/templates/initializer.rb +13 -0
- data/lib/generators/social_tokenizer/utils.rb +16 -0
- data/lib/social_tokenizer.rb +21 -0
- data/lib/social_tokenizer/configuration.rb +20 -0
- data/lib/social_tokenizer/token.rb +11 -0
- data/lib/social_tokenizer/token_type.rb +42 -0
- data/lib/social_tokenizer/tokenizer.rb +11 -0
- data/lib/social_tokenizer/version.rb +7 -0
- data/social_tokenizer.gemspec +83 -0
- metadata +179 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 098c7b0c6a49e81e12f82929e56fd1a30b622459
|
4
|
+
data.tar.gz: 05b540bdc2eb00b35ddf25d5865c936faa7768af
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ca0a0ba6cc8c6d84631179aa7182be66d30a3c0d33a993880862389f51aa54187caeed12547c6e13ce4e4145e165484fcd3bc3a0ecfe9a22de6b863e8ea18b65
|
7
|
+
data.tar.gz: e3bec8b4b15d1f7e8e4e4d47ac907bab16b45dbbdf855f4ce02f0e5d3b996b6ec8dd14d7680a071f38e46b04eb2ab68eb722339ffee16cc99b7c5f8b54d849d5
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/.document
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
gem 'activemodel', '>= 4.1'
|
9
|
+
gem 'tokenizer'
|
10
|
+
|
11
|
+
gemspec
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,120 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
social_tokenizer (0.0.1)
|
5
|
+
activemodel (>= 4.1)
|
6
|
+
social_tokenizer
|
7
|
+
tokenizer
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
activemodel (4.1.1)
|
13
|
+
activesupport (= 4.1.1)
|
14
|
+
builder (~> 3.1)
|
15
|
+
activesupport (4.1.1)
|
16
|
+
i18n (~> 0.6, >= 0.6.9)
|
17
|
+
json (~> 1.7, >= 1.7.7)
|
18
|
+
minitest (~> 5.1)
|
19
|
+
thread_safe (~> 0.1)
|
20
|
+
tzinfo (~> 1.1)
|
21
|
+
addressable (2.3.6)
|
22
|
+
builder (3.2.2)
|
23
|
+
coveralls (0.7.0)
|
24
|
+
multi_json (~> 1.3)
|
25
|
+
rest-client
|
26
|
+
simplecov (>= 0.7)
|
27
|
+
term-ansicolor
|
28
|
+
thor
|
29
|
+
cucumber (1.3.15)
|
30
|
+
builder (>= 2.1.2)
|
31
|
+
diff-lcs (>= 1.1.3)
|
32
|
+
gherkin (~> 2.12)
|
33
|
+
multi_json (>= 1.7.5, < 2.0)
|
34
|
+
multi_test (>= 0.1.1)
|
35
|
+
descendants_tracker (0.0.4)
|
36
|
+
thread_safe (~> 0.3, >= 0.3.1)
|
37
|
+
diff-lcs (1.2.5)
|
38
|
+
docile (1.1.3)
|
39
|
+
faraday (0.9.0)
|
40
|
+
multipart-post (>= 1.2, < 3)
|
41
|
+
gherkin (2.12.2)
|
42
|
+
multi_json (~> 1.3)
|
43
|
+
git (1.2.6)
|
44
|
+
github_api (0.11.3)
|
45
|
+
addressable (~> 2.3)
|
46
|
+
descendants_tracker (~> 0.0.1)
|
47
|
+
faraday (~> 0.8, < 0.10)
|
48
|
+
hashie (>= 1.2)
|
49
|
+
multi_json (>= 1.7.5, < 2.0)
|
50
|
+
nokogiri (~> 1.6.0)
|
51
|
+
oauth2
|
52
|
+
hashie (2.1.1)
|
53
|
+
highline (1.6.21)
|
54
|
+
i18n (0.6.9)
|
55
|
+
jeweler (2.0.1)
|
56
|
+
builder
|
57
|
+
bundler (>= 1.0)
|
58
|
+
git (>= 1.2.5)
|
59
|
+
github_api
|
60
|
+
highline (>= 1.6.15)
|
61
|
+
nokogiri (>= 1.5.10)
|
62
|
+
rake
|
63
|
+
rdoc
|
64
|
+
json (1.8.1)
|
65
|
+
jwt (1.0.0)
|
66
|
+
mime-types (2.3)
|
67
|
+
mini_portile (0.6.0)
|
68
|
+
minitest (5.3.4)
|
69
|
+
multi_json (1.10.1)
|
70
|
+
multi_test (0.1.1)
|
71
|
+
multi_xml (0.5.5)
|
72
|
+
multipart-post (2.0.0)
|
73
|
+
nokogiri (1.6.2.1)
|
74
|
+
mini_portile (= 0.6.0)
|
75
|
+
oauth2 (0.9.4)
|
76
|
+
faraday (>= 0.8, < 0.10)
|
77
|
+
jwt (~> 1.0)
|
78
|
+
multi_json (~> 1.3)
|
79
|
+
multi_xml (~> 0.5)
|
80
|
+
rack (~> 1.2)
|
81
|
+
rack (1.5.2)
|
82
|
+
rake (10.3.2)
|
83
|
+
rdoc (4.1.1)
|
84
|
+
json (~> 1.4)
|
85
|
+
rest-client (1.6.7)
|
86
|
+
mime-types (>= 1.16)
|
87
|
+
rspec (2.14.1)
|
88
|
+
rspec-core (~> 2.14.0)
|
89
|
+
rspec-expectations (~> 2.14.0)
|
90
|
+
rspec-mocks (~> 2.14.0)
|
91
|
+
rspec-core (2.14.8)
|
92
|
+
rspec-expectations (2.14.5)
|
93
|
+
diff-lcs (>= 1.1.3, < 2.0)
|
94
|
+
rspec-mocks (2.14.6)
|
95
|
+
simplecov (0.8.2)
|
96
|
+
docile (~> 1.1.0)
|
97
|
+
multi_json
|
98
|
+
simplecov-html (~> 0.8.0)
|
99
|
+
simplecov-html (0.8.0)
|
100
|
+
term-ansicolor (1.3.0)
|
101
|
+
tins (~> 1.0)
|
102
|
+
thor (0.19.1)
|
103
|
+
thread_safe (0.3.3)
|
104
|
+
tins (1.3.0)
|
105
|
+
tokenizer (0.1.1)
|
106
|
+
tzinfo (1.1.0)
|
107
|
+
thread_safe (~> 0.1)
|
108
|
+
|
109
|
+
PLATFORMS
|
110
|
+
ruby
|
111
|
+
|
112
|
+
DEPENDENCIES
|
113
|
+
activemodel (>= 4.1)
|
114
|
+
bundler
|
115
|
+
coveralls
|
116
|
+
cucumber
|
117
|
+
jeweler
|
118
|
+
rspec
|
119
|
+
social_tokenizer!
|
120
|
+
tokenizer
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2014 Gem Vein
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Social Tokenizer
|
2
|
+
===========
|
3
|
+
|
4
|
+
[![GitHub version](https://badge.fury.io/gh/gemvein%2Fsocial_tokenizer.svg)](http://badge.fury.io/gh/gemvein%2Fsocial_tokenizer)
|
5
|
+
[![Build Status](https://travis-ci.org/gemvein/social_tokenizer.svg)](https://travis-ci.org/gemvein/social_tokenizer)
|
6
|
+
[![Coverage Status](https://coveralls.io/repos/gemvein/social_tokenizer/badge.png)](https://coveralls.io/r/gemvein/social_tokenizer)
|
7
|
+
|
8
|
+
Contributing to Social Tokenizer
|
9
|
+
----------------------------
|
10
|
+
|
11
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
12
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
13
|
+
* Fork the project.
|
14
|
+
* Start a feature/bugfix branch.
|
15
|
+
* Commit and push until you are happy with your contribution.
|
16
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
17
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
18
|
+
|
19
|
+
Copyright
|
20
|
+
---------
|
21
|
+
|
22
|
+
Copyright (c) 2014 Gem Vein. See LICENSE.txt for further details.
|
23
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "social_tokenizer"
|
18
|
+
gem.homepage = "http://github.com/gemvein/social_tokenizer"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Tokenizes strings for use in social applications.}
|
21
|
+
gem.description = %Q{Tokenizes strings for use in social applications.}
|
22
|
+
gem.email = "karen.e.lundgren@gmail.com"
|
23
|
+
gem.authors = ["Karen Lundgren"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rspec/core'
|
29
|
+
require 'rspec/core/rake_task'
|
30
|
+
RSpec::Core::RakeTask.new(:spec) do |spec|
|
31
|
+
spec.pattern = FileList['spec/**/*_spec.rb']
|
32
|
+
end
|
33
|
+
|
34
|
+
RSpec::Core::RakeTask.new(:rcov) do |spec|
|
35
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
36
|
+
spec.rcov = true
|
37
|
+
end
|
38
|
+
|
39
|
+
task :default => :spec
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -0,0 +1,21 @@
|
|
1
|
+
Feature: Social Tokenizer
|
2
|
+
In order to extract the social tokens from strings
|
3
|
+
As a website
|
4
|
+
I want to be given a Hash of social tokens, organized by type.
|
5
|
+
|
6
|
+
Background:
|
7
|
+
Given the String:
|
8
|
+
"""
|
9
|
+
This contains a >message, a ^group, a :carbon, a @mention, and a #tag.
|
10
|
+
"""
|
11
|
+
Scenario: Extract the social tokens from a string
|
12
|
+
When I run the social_tokenizer method
|
13
|
+
Then the result should be a Hash with 5 key-value pairs
|
14
|
+
And each of its keys should be a symbol denoting the type of social token
|
15
|
+
And each of its values should be an Array of the corresponding social tokens
|
16
|
+
And the result should include:
|
17
|
+
|message |message |
|
18
|
+
|group |group |
|
19
|
+
|carbon |carbon |
|
20
|
+
|mention |mention |
|
21
|
+
|tag |tag |
|
@@ -0,0 +1,35 @@
|
|
1
|
+
Given /^the String:$/ do |input|
|
2
|
+
@input = input.to_s
|
3
|
+
end
|
4
|
+
|
5
|
+
When(/^I run the social_tokenizer method$/) do
|
6
|
+
@output = @input.social_tokenizer
|
7
|
+
end
|
8
|
+
|
9
|
+
Then(/^the result should be a Hash with (\d+) key\-value pairs$/) do |num|
|
10
|
+
@output.should be_a Hash
|
11
|
+
@output.should have_at_least(num).items
|
12
|
+
end
|
13
|
+
|
14
|
+
And(/^each of its keys should be a symbol denoting the type of social token$/) do
|
15
|
+
@output.each_key do |key|
|
16
|
+
key.should be_a Symbol
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
And(/^each of its values should be an Array of the corresponding social tokens$/) do
|
21
|
+
@output.each_value do |tokens|
|
22
|
+
tokens.should be_an Array
|
23
|
+
for token in tokens
|
24
|
+
token.should be_a SocialTokenizer::Token
|
25
|
+
token.replaced_value.should be_a String
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
And(/^the result should include:$/) do |table|
|
31
|
+
table.rows_hash.each do |key,value|
|
32
|
+
@output[key.to_sym].map(&:replaced_value).should include value
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module SocialTokenizer
|
2
|
+
class InstallGenerator < Rails::Generators::Base
|
3
|
+
source_root File.expand_path("../templates", __FILE__)
|
4
|
+
require File.expand_path('../../utils', __FILE__)
|
5
|
+
include Generators::Utils
|
6
|
+
include Rails::Generators::Migration
|
7
|
+
|
8
|
+
def hello
|
9
|
+
output "Go Go SocialTokenizer Installer, Go!", :magenta
|
10
|
+
end
|
11
|
+
|
12
|
+
# all public methods in here will be run in order
|
13
|
+
|
14
|
+
def add_initializer
|
15
|
+
output "You probably won't need to configure anything, but you could, if that's your thing.", :magenta
|
16
|
+
template "initializer.rb", "config/initializers/social_tokenizer.rb"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
SocialTokenizer.configure do |config|
|
2
|
+
# Symbol denoting language to use for tokenization. Implemented options are: :en, :fr, :de
|
3
|
+
# config.lang = :en
|
4
|
+
end
|
5
|
+
|
6
|
+
|
7
|
+
# Here you can add any TokenTypes that should be added to the default set.
|
8
|
+
# Each token type is initialized with a Hash containing:
|
9
|
+
# - pattern: string/regex
|
10
|
+
# - replacement: string
|
11
|
+
# - key: symbol
|
12
|
+
# SocialTokenizer::TokenType.new(pattern: /^\+(.*)$/, replacement: '\1', key: :rate_up)
|
13
|
+
# SocialTokenizer::TokenType.new(pattern: /^\-(.*)$/, replacement: '\1', key: :rate_down)
|
@@ -0,0 +1,16 @@
|
|
1
|
+
module SocialTokenizer
|
2
|
+
module Generators
|
3
|
+
module Utils
|
4
|
+
def output(output, color = :green)
|
5
|
+
say(" - #{output}", color)
|
6
|
+
end
|
7
|
+
|
8
|
+
def ask_for(wording, default_value = nil, override_if_present_value = nil)
|
9
|
+
override_if_present_value.present? ?
|
10
|
+
display("Using [#{override_if_present_value}] for question '#{wording}'") && override_if_present_value :
|
11
|
+
ask(" ? #{wording} Press <enter> for [#{default_value}] >", :yellow).presence || default_value
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'tokenizer'
|
2
|
+
require 'uri'
|
3
|
+
require 'active_model'
|
4
|
+
|
5
|
+
require 'social_tokenizer/token_type'
|
6
|
+
require 'social_tokenizer/configuration'
|
7
|
+
require 'social_tokenizer/version'
|
8
|
+
require 'social_tokenizer/token'
|
9
|
+
require 'social_tokenizer/tokenizer'
|
10
|
+
|
11
|
+
SocialTokenizer::TokenType.new(pattern: /^>(.*)$/, replacement: '\1', key: :message)
|
12
|
+
SocialTokenizer::TokenType.new(pattern: /^\^(.*)$/, replacement: '\1', key: :group)
|
13
|
+
SocialTokenizer::TokenType.new(pattern: /^:([a-z0-9].*)$/, replacement: '\1', key: :carbon)
|
14
|
+
SocialTokenizer::TokenType.new(pattern: /^@(.*)$/, replacement: '\1', key: :mention)
|
15
|
+
SocialTokenizer::TokenType.new(pattern: /^#(.*)$/, replacement: '\1', key: :tag)
|
16
|
+
|
17
|
+
class String
|
18
|
+
def social_tokenizer
|
19
|
+
SocialTokenizer::Tokenizer.new(SocialTokenizer.configuration.lang).social_tokenize(self)
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module SocialTokenizer
|
2
|
+
def self.configure(configuration = SocialTokenizer::Configuration.new)
|
3
|
+
if block_given?
|
4
|
+
yield configuration
|
5
|
+
end
|
6
|
+
@@configuration = configuration
|
7
|
+
end
|
8
|
+
|
9
|
+
def self.configuration
|
10
|
+
@@configuration ||= SocialTokenizer::Configuration.new
|
11
|
+
end
|
12
|
+
|
13
|
+
class Configuration
|
14
|
+
attr_accessor :lang
|
15
|
+
|
16
|
+
def initialize
|
17
|
+
self.lang = :en
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
module SocialTokenizer
|
2
|
+
class Token
|
3
|
+
include ActiveModel::Model
|
4
|
+
include ActiveModel::Validations
|
5
|
+
attr_accessor :token_type, :value
|
6
|
+
validates_presence_of :token_type, :value
|
7
|
+
def replaced_value
|
8
|
+
value.gsub(token_type.pattern, token_type.replacement)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
module SocialTokenizer
|
2
|
+
class TokenType
|
3
|
+
include ActiveModel::Model
|
4
|
+
include ActiveModel::Validations
|
5
|
+
|
6
|
+
attr_accessor :pattern, :replacement, :key, :formatter, :tokens
|
7
|
+
validates_presence_of :pattern, :replacement, :key
|
8
|
+
|
9
|
+
def initialize(attributes)
|
10
|
+
super attributes
|
11
|
+
self.tokens = []
|
12
|
+
end
|
13
|
+
|
14
|
+
def self.all
|
15
|
+
results = {}
|
16
|
+
ObjectSpace.each_object(self) do |token_type|
|
17
|
+
results[token_type.key] = token_type.tokens
|
18
|
+
end
|
19
|
+
results
|
20
|
+
end
|
21
|
+
|
22
|
+
def check_token(token_string)
|
23
|
+
if pattern.is_a? Array
|
24
|
+
for sub_pattern in pattern
|
25
|
+
if token_string =~ sub_pattern
|
26
|
+
self.tokens << SocialTokenizer::Token.new(token_type: self, value: token_string)
|
27
|
+
end
|
28
|
+
end
|
29
|
+
else
|
30
|
+
if token_string =~ pattern
|
31
|
+
self.tokens << SocialTokenizer::Token.new(token_type: self, value: token_string)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
|
36
|
+
def self.check_all(token_string)
|
37
|
+
ObjectSpace.each_object(self) do |token_type|
|
38
|
+
token_type.check_token(token_string)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
# stub: social_tokenizer 0.0.1 ruby lib
|
6
|
+
|
7
|
+
Gem::Specification.new do |s|
|
8
|
+
s.name = "social_tokenizer"
|
9
|
+
s.version = "0.0.1"
|
10
|
+
|
11
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
+
s.require_paths = ["lib"]
|
13
|
+
s.authors = ["Karen Lundgren"]
|
14
|
+
s.date = "2014-05-24"
|
15
|
+
s.description = "Tokenizes strings for use in social applications."
|
16
|
+
s.email = "karen.e.lundgren@gmail.com"
|
17
|
+
s.extra_rdoc_files = [
|
18
|
+
"LICENSE.txt",
|
19
|
+
"README.md"
|
20
|
+
]
|
21
|
+
s.files = [
|
22
|
+
".coveralls.yml",
|
23
|
+
".document",
|
24
|
+
".travis.yml",
|
25
|
+
"Gemfile",
|
26
|
+
"Gemfile.lock",
|
27
|
+
"LICENSE.txt",
|
28
|
+
"README.md",
|
29
|
+
"Rakefile",
|
30
|
+
"VERSION",
|
31
|
+
"features/social_tokenizer.feature",
|
32
|
+
"features/step_definitions/social_tokenizer_steps.rb",
|
33
|
+
"features/support/env.rb",
|
34
|
+
"lib/generators/social_tokenizer/install/install_generator.rb",
|
35
|
+
"lib/generators/social_tokenizer/install/templates/initializer.rb",
|
36
|
+
"lib/generators/social_tokenizer/utils.rb",
|
37
|
+
"lib/social_tokenizer.rb",
|
38
|
+
"lib/social_tokenizer/configuration.rb",
|
39
|
+
"lib/social_tokenizer/token.rb",
|
40
|
+
"lib/social_tokenizer/token_type.rb",
|
41
|
+
"lib/social_tokenizer/tokenizer.rb",
|
42
|
+
"lib/social_tokenizer/version.rb",
|
43
|
+
"social_tokenizer.gemspec"
|
44
|
+
]
|
45
|
+
s.homepage = "http://github.com/gemvein/social_tokenizer"
|
46
|
+
s.licenses = ["MIT"]
|
47
|
+
s.rubygems_version = "2.2.2"
|
48
|
+
s.summary = "Tokenizes strings for use in social applications."
|
49
|
+
|
50
|
+
if s.respond_to? :specification_version then
|
51
|
+
s.specification_version = 4
|
52
|
+
|
53
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
54
|
+
s.add_runtime_dependency(%q<activemodel>, [">= 4.1"])
|
55
|
+
s.add_runtime_dependency(%q<tokenizer>, [">= 0"])
|
56
|
+
s.add_runtime_dependency(%q<social_tokenizer>, [">= 0"])
|
57
|
+
s.add_development_dependency(%q<rspec>, [">= 0"])
|
58
|
+
s.add_development_dependency(%q<cucumber>, [">= 0"])
|
59
|
+
s.add_development_dependency(%q<bundler>, [">= 0"])
|
60
|
+
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
61
|
+
s.add_development_dependency(%q<coveralls>, [">= 0"])
|
62
|
+
else
|
63
|
+
s.add_dependency(%q<activemodel>, [">= 4.1"])
|
64
|
+
s.add_dependency(%q<tokenizer>, [">= 0"])
|
65
|
+
s.add_dependency(%q<social_tokenizer>, [">= 0"])
|
66
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
67
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
68
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
69
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
70
|
+
s.add_dependency(%q<coveralls>, [">= 0"])
|
71
|
+
end
|
72
|
+
else
|
73
|
+
s.add_dependency(%q<activemodel>, [">= 4.1"])
|
74
|
+
s.add_dependency(%q<tokenizer>, [">= 0"])
|
75
|
+
s.add_dependency(%q<social_tokenizer>, [">= 0"])
|
76
|
+
s.add_dependency(%q<rspec>, [">= 0"])
|
77
|
+
s.add_dependency(%q<cucumber>, [">= 0"])
|
78
|
+
s.add_dependency(%q<bundler>, [">= 0"])
|
79
|
+
s.add_dependency(%q<jeweler>, [">= 0"])
|
80
|
+
s.add_dependency(%q<coveralls>, [">= 0"])
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
metadata
ADDED
@@ -0,0 +1,179 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: social_tokenizer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Karen Lundgren
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-05-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activemodel
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '4.1'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '4.1'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: tokenizer
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: social_tokenizer
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: cucumber
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: bundler
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: jeweler
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: coveralls
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: Tokenizes strings for use in social applications.
|
126
|
+
email: karen.e.lundgren@gmail.com
|
127
|
+
executables: []
|
128
|
+
extensions: []
|
129
|
+
extra_rdoc_files:
|
130
|
+
- LICENSE.txt
|
131
|
+
- README.md
|
132
|
+
files:
|
133
|
+
- ".coveralls.yml"
|
134
|
+
- ".document"
|
135
|
+
- ".travis.yml"
|
136
|
+
- Gemfile
|
137
|
+
- Gemfile.lock
|
138
|
+
- LICENSE.txt
|
139
|
+
- README.md
|
140
|
+
- Rakefile
|
141
|
+
- VERSION
|
142
|
+
- features/social_tokenizer.feature
|
143
|
+
- features/step_definitions/social_tokenizer_steps.rb
|
144
|
+
- features/support/env.rb
|
145
|
+
- lib/generators/social_tokenizer/install/install_generator.rb
|
146
|
+
- lib/generators/social_tokenizer/install/templates/initializer.rb
|
147
|
+
- lib/generators/social_tokenizer/utils.rb
|
148
|
+
- lib/social_tokenizer.rb
|
149
|
+
- lib/social_tokenizer/configuration.rb
|
150
|
+
- lib/social_tokenizer/token.rb
|
151
|
+
- lib/social_tokenizer/token_type.rb
|
152
|
+
- lib/social_tokenizer/tokenizer.rb
|
153
|
+
- lib/social_tokenizer/version.rb
|
154
|
+
- social_tokenizer.gemspec
|
155
|
+
homepage: http://github.com/gemvein/social_tokenizer
|
156
|
+
licenses:
|
157
|
+
- MIT
|
158
|
+
metadata: {}
|
159
|
+
post_install_message:
|
160
|
+
rdoc_options: []
|
161
|
+
require_paths:
|
162
|
+
- lib
|
163
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
168
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
requirements: []
|
174
|
+
rubyforge_project:
|
175
|
+
rubygems_version: 2.2.2
|
176
|
+
signing_key:
|
177
|
+
specification_version: 4
|
178
|
+
summary: Tokenizes strings for use in social applications.
|
179
|
+
test_files: []
|