tag_along 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bb501613369741434e9f949ebeba6d1b6867db51
4
+ data.tar.gz: 82b99ef0fb1c3c543ac5ffa2425abd61024b59d9
5
+ SHA512:
6
+ metadata.gz: 08ceb49d3503b05df762286a6f770d6124912b1d607eb95d7605e73d6aae61d162e5d94961a3a03588e4d8788f148335b0c17c2997b9d71735d603b3d3314be3
7
+ data.tar.gz: 0380c0290c379b3d69da2c640c557a11b34122d634514c2e9c7e91f2791054a5ff275bbe87064f55523817c56be4a9e2f0bdbc4908a44d76c2e95eba4307fabf
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in tag_along.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2013 Dmitry Mozzherin
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,52 @@
1
+ TagAlong
2
+ ========
3
+
4
+ A user who runs a search tool against a text would find
5
+ multiple text fragments corresponding to the search.
6
+ These fragments can be found again by storing their
7
+ start and end offsets. This gem places arbitrary
8
+ markup tags surrounding the fragments.
9
+
10
+ Installation
11
+ ------------
12
+
13
+ Add this line to your application's Gemfile:
14
+
15
+ gem 'tag_along'
16
+
17
+ And then execute:
18
+
19
+ $ bundle
20
+
21
+ Or install it yourself as:
22
+
23
+ $ gem install tag_along
24
+
25
+ Usage
26
+ -----
27
+
28
+ To add tags to a text:
29
+
30
+ tg = TagAlong.new(some_text)
31
+ offsets = [[2, 5], [9, 22], [33, 35]]
32
+ tg.tag('<my_tag>', '</my_tag>', offsets)
33
+
34
+
35
+ Contributing
36
+ ------------
37
+
38
+ 1. Fork it
39
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
40
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
41
+ 4. Push to the branch (`git push origin my-new-feature`)
42
+ 5. Create new Pull Request
43
+
44
+ Copyright
45
+ ---------
46
+
47
+ Authors: [Dmitry Mozzherin][1],
48
+
49
+ Copyright (c) 2013 Marine Biological Laboratory. See LICENSE for
50
+ further details.
51
+
52
+ [1]: https://github.com/dimus
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,3 @@
1
+ module TagAlong
2
+ VERSION = "0.0.1"
3
+ end
data/lib/tag_along.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "tag_along/version"
2
+
3
+ module TagAlong
4
+ # Your code goes here...
5
+ end
data/tag_along.gemspec ADDED
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'tag_along/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "tag_along"
8
+ spec.version = TagAlong::VERSION
9
+ spec.authors = ["Dmitry Mozzherin"]
10
+ spec.email = ["dmozzherin@gmail.com"]
11
+ spec.description = %q{Tags a text with arbitrary tags
12
+ based on array of start/end offsets}
13
+ spec.summary = %q{A user who runs a search tool on a text would find
14
+ multiple text fragments corresponding to the search.
15
+ These fragments can be found again by storing their
16
+ start and end offsets. This gem places arbitrary
17
+ markup tags surrounding the fragments.}
18
+ spec.homepage = ""
19
+ spec.license = "MIT"
20
+
21
+ spec.files = `git ls-files`.split($/)
22
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
23
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
24
+ spec.require_paths = ["lib"]
25
+
26
+ spec.add_development_dependency "bundler", "~> 1.3"
27
+ spec.add_development_dependency "rake"
28
+ end
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tag_along
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Dmitry Mozzherin
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-08-31 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.3'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: |-
42
+ Tags a text with arbitrary tags
43
+ based on array of start/end offsets
44
+ email:
45
+ - dmozzherin@gmail.com
46
+ executables: []
47
+ extensions: []
48
+ extra_rdoc_files: []
49
+ files:
50
+ - .gitignore
51
+ - Gemfile
52
+ - LICENSE.txt
53
+ - README.md
54
+ - Rakefile
55
+ - lib/tag_along.rb
56
+ - lib/tag_along/version.rb
57
+ - tag_along.gemspec
58
+ homepage: ''
59
+ licenses:
60
+ - MIT
61
+ metadata: {}
62
+ post_install_message:
63
+ rdoc_options: []
64
+ require_paths:
65
+ - lib
66
+ required_ruby_version: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ requirements: []
77
+ rubyforge_project:
78
+ rubygems_version: 2.0.3
79
+ signing_key:
80
+ specification_version: 4
81
+ summary: A user who runs a search tool on a text would find multiple text fragments
82
+ corresponding to the search. These fragments can be found again by storing their start
83
+ and end offsets. This gem places arbitrary markup tags surrounding the fragments.
84
+ test_files: []