text_analysis 0.2.0 → 0.2.1

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: 8bf0a077bb90faf47c6a8dbb4a390099b6128b4f
4
- data.tar.gz: 080a37894e3d3118ebca46617eb3a75216a68490
3
+ metadata.gz: f7a0300244ea6804b7bd37bb0f7f05004e881b43
4
+ data.tar.gz: 72970db79eee8e68ab43b65bedede259d3a2e0a1
5
5
  SHA512:
6
- metadata.gz: eed1848f7929c86359066a959a777cfac269e97f87aada48a8d1956c47d7cd985e5b3359e4508843610f4cfacd5b2b3aeedf6ffee0a06af601c831caafdb9652
7
- data.tar.gz: c56d71c7d7c6cd2c949761bd1afa275c3a790e8a57defd0fc8048414bf36b65e0fae8d80898a4ddd68dd3cd7933912ed110d9c1d106b1c3ccceedef103bd3e5f
6
+ metadata.gz: 687ac822acd92fd8f23764c0b93880bb6c7e834d25dc36f0a807a3b83b6f2dbb16e9b7ac5786c39680a009841c04c5e2d0080aa212d928130aded8da3bb543f9
7
+ data.tar.gz: a05f9b1c79610260da81c5c41789ce37cc6b51978fb2a21ba4295d0f198641b35ba4d07940c506acb79119f0f8002397577bb6773dc1117586d8738947774a7e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.2.1 (2016-07-23)
2
+ Fixes bug with loading of stop words file.
3
+
1
4
  ## 0.2.0 (2016-07-22)
2
5
 
3
6
  New features
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- text_analysis (0.2.0)
4
+ text_analysis (0.2.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/lib/text_analysis.rb CHANGED
@@ -1,10 +1,12 @@
1
1
  require "text_analysis/version"
2
2
 
3
3
  module TextAnalysis
4
+ ROOT = File.expand_path("../..", __FILE__)
5
+
4
6
  def self.analyze_text(text_input)
5
7
  result = Result.new
6
8
 
7
- stop_words = File.readlines('data/stop_words/en.txt').map { |word| word.gsub("\n", '') }.inspect
9
+ stop_words = File.readlines("#{ROOT}/data/stop_words/en.txt").map { |word| word.gsub("\n", '') }.inspect
8
10
  input_words = text_input.split(/[\s]+/)
9
11
 
10
12
  result.total_characters = text_input.length
@@ -1,3 +1,3 @@
1
1
  module TextAnalysis
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: text_analysis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasilis Kalligas