dates_from_string 1.1.0 → 1.2.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: 4ce5d6669e4b39b504ff78a30f78b64c5c012c5e
4
- data.tar.gz: 55c376fd09cefdead06bac094535100849c86560
3
+ metadata.gz: ceac526dbab85896fb300cdea42d295106bad0f7
4
+ data.tar.gz: 8dd6708c3646d678c4d6ae1ffec1ef7a8f7d2e05
5
5
  SHA512:
6
- metadata.gz: bf8b9440e726359d740aaa81bef20e89faec028f02379a30a8679815d918e700316397057c7e0255997ce65982aa0e5e913a3aebb0eedeb1c7c6dc57cf56a5b0
7
- data.tar.gz: 8466aee9d4ab3f334f66daa1942c690a8f987b2a934771999b95fa89731335d7ca6202e56fba9b15e581afc02f652630aec3a14a2b7cefcb8ba584084653e622
6
+ metadata.gz: 96cb57b5651249388d3ddef23598a711e704b8fa97f060012acb0c32a30f4e2f8bdb3071aeaa263ece3ea715a1b9ae5f1aa05e05d2cc3dc2ffe89c334a7e5d86
7
+ data.tar.gz: f1a8e53536da1d4411b45465ee3bd994fdd6c2e0c593cca5ce58a7295ca139df40c091a8eff73fbb478fa407b5ce1c75de456373d6fb0993420cb06547d6ca59
data/.travis.yml CHANGED
@@ -1,3 +1,4 @@
1
1
  language: ruby
2
2
  rvm:
3
3
  - 2.2.1
4
+ before_install: gem install bundler -v 1.12.5
data/Rakefile CHANGED
@@ -1 +1,7 @@
1
1
  require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
7
+
@@ -29,8 +29,10 @@ Gem::Specification.new do |spec|
29
29
  # Only with ruby 2.0.x
30
30
  spec.required_ruby_version = '~> 2.0'
31
31
 
32
- spec.add_development_dependency "bundler", "~> 1.9"
32
+ spec.add_development_dependency "bundler", "~> 1.13.6"
33
33
  spec.add_development_dependency "rake", "~> 10.0"
34
+ spec.add_development_dependency "rspec", "~> 3.0"
35
+
34
36
 
35
37
  spec.add_development_dependency 'pry-rails'
36
38
  end
@@ -1,3 +1,3 @@
1
1
  class DatesFromString
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
@@ -50,6 +50,10 @@ class DatesFromString
50
50
  @clear_text.strip
51
51
  end
52
52
 
53
+ def email_date(email)
54
+ email.match(/(?:(?:19|20)[0-9]{2})/).to_s
55
+ end
56
+
53
57
  def date_format_by_country(date_format)
54
58
  DATE_COUNTRY_FORMAT[date_format.to_sym].call
55
59
  end
metadata CHANGED
@@ -1,55 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dates_from_string
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.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: 2016-09-01 00:00:00.000000000 Z
11
+ date: 2016-11-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.9'
19
+ version: 1.13.6
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.9'
26
+ version: 1.13.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: pry-rails
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
- - - '>='
59
+ - - ">="
46
60
  - !ruby/object:Gem::Version
47
61
  version: '0'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
- - - '>='
66
+ - - ">="
53
67
  - !ruby/object:Gem::Version
54
68
  version: '0'
55
69
  description: Flexible solution for finding all formats of dates in text
@@ -59,9 +73,9 @@ executables: []
59
73
  extensions: []
60
74
  extra_rdoc_files: []
61
75
  files:
62
- - .gitignore
63
- - .rspec
64
- - .travis.yml
76
+ - ".gitignore"
77
+ - ".rspec"
78
+ - ".travis.yml"
65
79
  - CODE_OF_CONDUCT.md
66
80
  - Gemfile
67
81
  - LICENSE.txt
@@ -83,17 +97,17 @@ require_paths:
83
97
  - lib
84
98
  required_ruby_version: !ruby/object:Gem::Requirement
85
99
  requirements:
86
- - - ~>
100
+ - - "~>"
87
101
  - !ruby/object:Gem::Version
88
102
  version: '2.0'
89
103
  required_rubygems_version: !ruby/object:Gem::Requirement
90
104
  requirements:
91
- - - '>='
105
+ - - ">="
92
106
  - !ruby/object:Gem::Version
93
107
  version: '0'
94
108
  requirements: []
95
109
  rubyforge_project:
96
- rubygems_version: 2.0.14
110
+ rubygems_version: 2.2.2
97
111
  signing_key:
98
112
  specification_version: 4
99
113
  summary: Flexible solution for finding all formats of dates in text