dates_from_string 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce5ca5eeda2096485eb46bd32dffbea36d9d7303
4
- data.tar.gz: 26db1fe8ad81a31c76215cf74df75cd3cd4d3e3f
3
+ metadata.gz: 420a88c30d1e4c27226cb513d5f9ff99f31fc4a8
4
+ data.tar.gz: d1816088a417d53a6b96d334892a0e635a53a6f3
5
5
  SHA512:
6
- metadata.gz: 21e956e1ddfcab3cf25a66cc72082890691aa3e14b9f3cd638831a3006b41b29cdfbe31417e9cb7ad28aa58f9a24b5efe5df76f2fdb6376e3d823a7c150bdd85
7
- data.tar.gz: 87141f753df9b55fceb2e9b34e741a36672b3ca5c1f07bfda1be597fdea978723bc7e03d7ab22da91af1168ad38c7951fa4c2135a8800a211828c93986cf0c39
6
+ metadata.gz: c82cb87ad028c5a051a32611fd96925229c4167ec68a20fb726c0b42b46554dd755ba578def4c1ffe347fddfd16e7ae34e3b46c3da7b142dc66c7408ade15433
7
+ data.tar.gz: be6219215bae79b00287b7f955e3bf6f2d046bcdbbaa13a62888bb4bc601a19f4e3b6e3e943b6c2a5a7fe23f9909c27816e902d7a0ea524addfc1aef3f85421f
data/README.md CHANGED
@@ -106,6 +106,20 @@ obj.get_structure(input)
106
106
  # [{:type=>:year, :value=>"1960", :distance=>2, :key_words=>['and']},
107
107
  # {:type=>:year, :value=>"1965", :distance=>0, :key_words=>[]},]
108
108
 
109
+ input = "In September 2011, following a change in the law extending
110
+ the presidential term from four years to six,[5] Putin announced
111
+ that he would seek a third, non-consecutive term as President in
112
+ the 2012 presidential election, an announcement which led to
113
+ large-scale protests in many Russian cities. In March 2012 he won the election,
114
+ which was criticized for procedural irregularities, and is serving a six-year term"
115
+ dates_from_string.get_structure(input)
116
+
117
+ #=> return
118
+ # [{:type=>:month, :value=>"09", :distance=>1, :key_words=>[]},
119
+ # {:type=>:year, :value=>"2011", :distance=>30, :key_words=>[]},
120
+ # {:type=>:year, :value=>"2012", :distance=>15, :key_words=>[]},
121
+ # {:type=>:month, :value=>"03", :distance=>1, :key_words=>[]},
122
+ # {:type=>:year, :value=>"2012", :distance=>0, :key_words=>[]}]
109
123
  ```
110
124
 
111
125
  ## Development
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["kompotdrinker@gmail.com"]
11
11
 
12
12
  spec.summary = %q{Flexible solution for finding all formats of dates in text}
13
- spec.description = %q{Find dates in string and return array of dates}
13
+ spec.description = %q{Flexible solution for finding all formats of dates in text}
14
14
  spec.homepage = ""
15
15
  spec.license = "MIT"
16
16
 
@@ -1,5 +1,5 @@
1
1
  require "dates_from_string/version"
2
- require "pry-rails"
2
+
3
3
 
4
4
  class DatesFromString
5
5
 
@@ -1,3 +1,3 @@
1
1
  class DatesFromString
2
- VERSION = "0.8.0"
2
+ VERSION = "0.9.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dates_from_string
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Chechaev
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-04-30 00:00:00.000000000 Z
11
+ date: 2015-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,7 +52,7 @@ dependencies:
52
52
  - - '>='
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
- description: Find dates in string and return array of dates
55
+ description: Flexible solution for finding all formats of dates in text
56
56
  email:
57
57
  - kompotdrinker@gmail.com
58
58
  executables: []