date_time_precision 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 28cf9dcb22c71507eea053a3dc86447797156bb1
4
+ data.tar.gz: f5c6c99396d465523361a2da976a545e0727eb79
5
+ SHA512:
6
+ metadata.gz: 9e03bcaca16094a878d0fac4a45b1b8d8c7d7e124360672b96a02ab73f58a4c5b236fa1ca959ac19f8ea042ef4fdb126593753a28b870f3b09267b0b7039b196
7
+ data.tar.gz: 18e685aa7f91fb58b405f4905c5a4e4251ef4569edd343d6fd716dddbea53099bf70a1ce0fe896cfcfba68f0b7e79c4a4bb7ec9a77f8e87a9ace426c1323fbe0
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ spec/reports
16
16
  test/tmp
17
17
  test/version_tmp
18
18
  tmp
19
+ .idea/
@@ -1,13 +1,15 @@
1
1
  rvm:
2
2
  - ree
3
- - rbx-18mode
4
- - rbx-19mode
5
3
  - 1.8.7
6
4
  - 1.9.2
7
5
  - 1.9.3
8
6
  - 2.0.0
7
+ - 2.1.0
8
+ - 2.1.1
9
+ - 2.1.2
9
10
  - jruby-18mode
10
11
  - jruby-19mode
12
+ - rbx-2
11
13
  gemfile:
12
14
  - gemfiles/activesupport2.gemfile
13
15
  - gemfiles/activesupport3.gemfile
@@ -20,9 +22,15 @@ matrix:
20
22
  gemfile: gemfiles/activesupport2.gemfile
21
23
  - rvm: 2.0.0
22
24
  gemfile: gemfiles/activesupport2.gemfile
25
+ - rvm: 2.1.0
26
+ gemfile: gemfiles/activesupport2.gemfile
27
+ - rvm: 2.1.1
28
+ gemfile: gemfiles/activesupport2.gemfile
29
+ - rvm: 2.1.2
30
+ gemfile: gemfiles/activesupport2.gemfile
23
31
  - rvm: jruby-19mode
24
32
  gemfile: gemfiles/activesupport2.gemfile
25
- - rvm: rbx-19mode
33
+ - rvm: rbx-2
26
34
  gemfile: gemfiles/activesupport2.gemfile
27
35
  - rvm: 1.8.7
28
36
  gemfile: gemfiles/activesupport4.gemfile
@@ -30,7 +38,5 @@ matrix:
30
38
  gemfile: gemfiles/activesupport4.gemfile
31
39
  - rvm: ree
32
40
  gemfile: gemfiles/activesupport4.gemfile
33
- - rvm: rbx-18mode
34
- gemfile: gemfiles/activesupport4.gemfile
35
41
  - rvm: jruby-18mode
36
42
  gemfile: gemfiles/activesupport4.gemfile
data/Gemfile CHANGED
@@ -1,7 +1,9 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
4
 
5
- if RUBY_VERSION < '1.9'
6
- gem 'activesupport', '~> 3.2', :platforms => :ruby_18
7
- end
5
+ if RUBY_VERSION < '1.9.3'
6
+ gem 'activesupport', '~> 3.2'
7
+ end
8
+
9
+ gem 'pry'
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 David Butler
1
+ Copyright (c) 2012-2013 Spokeo
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -112,7 +112,7 @@ Time.iso8601("2000-05").precision
112
112
 
113
113
  ## Ruby Compatibility
114
114
 
115
- Tested in MRI 1.8.7/1.9.2/1.9.3/2.0.0, REE, JRuby 1.8/1.9, and Rubinius 1.8/1.9.
115
+ Tested in MRI 1.8.7/1.9.2/1.9.3/2.0.0/2.1.0, REE, JRuby 1.8/1.9, and Rubinius 1.8/1.9.
116
116
 
117
117
  Note that starting in MRI 1.9.3, the core Date/Time classes were rewritten in C, making it difficult to
118
118
  override internal functionality. Some functions are now implemented internally and are not exposed.
@@ -134,6 +134,7 @@ So far, the following gems are on the compatibility watch list:
134
134
  - [ ] [Chronic](https://github.com/mojombo/chronic)
135
135
  - [ ] [Timeliness](https://github.com/adzap/timeliness)
136
136
  - [ ] [Timecop](https://github.com/travisjeffery/timecop)
137
+ - [ ] [delocalize](https://github.com/clemens/delocalize)
137
138
 
138
139
  If you know of any others, feel free to submit a pull request!
139
140
 
@@ -14,6 +14,7 @@ Gem::Specification.new do |gem|
14
14
  gem.name = "date_time_precision"
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = DateTimePrecision::VERSION
17
+ gem.license = 'MIT'
17
18
 
18
19
  gem.add_development_dependency 'rake'
19
20
  gem.add_development_dependency 'rspec'
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
2
 
3
3
  gem 'rake'
4
4
  gem 'rspec'
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
2
 
3
3
  gem 'rake'
4
4
  gem 'rspec'
@@ -1,4 +1,4 @@
1
- source :rubygems
1
+ source "https://rubygems.org"
2
2
 
3
3
  gem 'rake'
4
4
  gem 'rspec'
@@ -2,9 +2,9 @@ require 'date_time_precision/lib'
2
2
 
3
3
  class Hash
4
4
  DATE_FORMATS = {
5
- :short => [:y, :m, :d, :h, :min, :s, :sec_frac],
6
- :long => [:year, :month, :day, :hour, :minute, :second, :second_fraction],
7
- :ruby => [:year, :mon, :day, :hour, :min, :sec, :sec_frac]
5
+ :short => [:y, :m, :d, :h, :min, :s, :us],
6
+ :long => [:year, :month, :day, :hour, :minute, :second, :micro_seconds],
7
+ :ruby => [:year, :mon, :day, :hour, :min, :sec, :usec]
8
8
  }
9
9
  DATE_FORMATS[:default] = DATE_FORMATS[:ruby]
10
10
 
@@ -13,7 +13,7 @@ class Hash
13
13
  end
14
14
 
15
15
  def to_datetime
16
- DateTime.new(*date_time_args.take(DateTime::MAX_PRECISION))
16
+ DateTime.new(*date_time_args.take(DateTime::SEC))
17
17
  end
18
18
 
19
19
  def to_date
@@ -22,13 +22,16 @@ class Hash
22
22
 
23
23
  protected
24
24
  def date_time_args
25
- [self[:year] || self[:y] || self[:yr] || self['year'] || self['y'] || self['yr'],
26
- self[:mon] || self[:m] || self[:month] || self['mon'] || self['m'] || self['month'],
27
- self[:mday] || self[:d] || self[:day] || self['mday'] || self['d'] || self['day'],
28
- self[:hour] || self[:h] || self[:hr] || self['hour'] || self['h'] || self['hr'],
29
- self[:min] || self[:minute] || self['min'] || self["minute"],
30
- self[:sec] || self[:s] || self[:second] || self['sec'] || self['s'] || self["second"],
31
- self[:sec_frac] || self[:second_fraction] || self['sec_frac'] || self['second_fraction']]
25
+ year = self[:year] || self[:y] || self[:yr] || self['year'] || self['y'] || self['yr']
26
+ month = self[:mon] || self[:m] || self[:month] || self['mon'] || self['m'] || self['month']
27
+ day = self[:mday] || self[:d] || self[:day] || self['mday'] || self['d'] || self['day']
28
+ hour = self[:hour] || self[:h] || self[:hr] || self['hour'] || self['h'] || self['hr']
29
+ minute = self[:min] || self[:minute] || self['min'] || self["minute"]
30
+ second = self[:sec] || self[:s] || self[:second] || self['sec'] || self['s'] || self["second"]
31
+ micro_second = self[:sec_frac] || self[:second_fraction] || self['sec_frac'] || self['second_fraction'] ||
32
+ self[:usec] || self[:micro_second] || self['usec'] || self['micro_second']
33
+
34
+ [year, month, day, hour, minute, second, micro_second]
32
35
  end
33
36
  end
34
37
 
@@ -9,15 +9,16 @@ end
9
9
  alias_method :xmlschema_without_precision, :xmlschema
10
10
  end
11
11
 
12
- def xmlschema
13
- iso8601
12
+ def xmlschema(fraction_digits=0)
13
+ iso8601(fraction_digits)
14
14
  end
15
15
 
16
16
  if method_defined?(:iso8601)
17
17
  alias_method :iso8601_original, :iso8601
18
18
  end
19
19
 
20
- def iso8601
20
+ def iso8601(fraction_digits=0)
21
+ fraction_digits = fraction_digits.to_i
21
22
  precision = self.precision || 0
22
23
  format = ""
23
24
  if precision > DateTimePrecision::NONE
@@ -32,8 +33,12 @@ end
32
33
  output = sprintf(format, year < 0 ? 5 : 4, *self.fragments)
33
34
 
34
35
  # Fractional seconds
35
- if sec_frac? && sec_frac > 0
36
- output << '.' + sprintf('%0*d', sec_frac, (subsec * 10**sec_frac).floor)
36
+ if fraction_digits > 0 && usec? && usec > 0
37
+ if fraction_digits <= 6
38
+ output << '.' + sprintf('%06d', usec)[0, fraction_digits]
39
+ else
40
+ output << '.' + sprintf('%06d', usec) + '0' * (fraction_digits - 6)
41
+ end
37
42
  end
38
43
 
39
44
  # Timezone
@@ -98,7 +103,7 @@ Time.instance_eval do
98
103
  hour = $4 && $4.to_i
99
104
  min = $5 && $5.to_i
100
105
  sec = $6 && $6.to_i
101
- usec = 0
106
+ usec = nil
102
107
  if $7
103
108
  usec = Rational($7) * 1000000
104
109
  end
@@ -24,8 +24,10 @@ class Date
24
24
  end
25
25
 
26
26
  module DateTimePrecision
27
+ MICROSECONDS_SUPPORTED = !!Time.now.usec
28
+
27
29
  unless constants.include? "NONE"
28
- FRAC = 7
30
+ USEC = FRAC = 7
29
31
  SEC = 6
30
32
  MIN = 5
31
33
  HOUR = 4
@@ -44,7 +46,7 @@ module DateTimePrecision
44
46
  :hour,
45
47
  :min,
46
48
  :sec,
47
- :sec_frac
49
+ :usec
48
50
  ]
49
51
 
50
52
  DATE_ATTRIBUTE_PRECISIONS = {
@@ -54,7 +56,7 @@ module DateTimePrecision
54
56
  :hour => HOUR,
55
57
  :min => MIN,
56
58
  :sec => SEC,
57
- :sec_frac => FRAC
59
+ :usec => FRAC
58
60
  }
59
61
  end
60
62
 
@@ -75,7 +77,7 @@ module DateTimePrecision
75
77
  val.precision
76
78
  when Hash
77
79
  case
78
- when val[:sec_frac], val[:subsec]
80
+ when val[:sec_frac], val[:subsec], val[:usec]
79
81
  FRAC
80
82
  when val[:sec]
81
83
  SEC
@@ -101,12 +103,13 @@ module DateTimePrecision
101
103
 
102
104
  def fragments
103
105
  frags = []
104
- frags << self.year if self.year?
105
- frags << self.month if self.month?
106
- frags << self.day if self.day?
107
- frags << self.hour if self.hour?
108
- frags << self.min if self.min?
109
- frags << self.sec if self.sec?
106
+ frags << year if year?
107
+ frags << month if month?
108
+ frags << day if day?
109
+ frags << hour if hour?
110
+ frags << min if min?
111
+ frags << sec if sec?
112
+ frags << usec if usec?
110
113
  frags
111
114
  end
112
115
 
@@ -179,7 +182,7 @@ module DateTimePrecision
179
182
  base.extend(ClassMethods)
180
183
 
181
184
  # Define attribute query methods, including:
182
- # year?, mon?, day?, hour?, min?, sec?, sec_frac?
185
+ # year?, mon?, day?, hour?, min?, sec?, usec?
183
186
  DATE_ATTRIBUTE_PRECISIONS.each do |attribute_name, precision|
184
187
  #next unless precision <= base::MAX_PRECISION
185
188
 
@@ -201,16 +204,7 @@ module DateTimePrecision
201
204
  end
202
205
  EOM
203
206
 
204
- base.class_eval do
205
- if method_defined?(:usec)
206
- alias_method :usec?, :sec_frac?
207
- alias_method :sec_frac, :usec
208
- end
209
-
210
- if method_defined?(:subsec)
211
- alias_method :subsec?, :sec_frac?
212
- end
213
-
207
+ base.instance_eval do
214
208
  alias_method :month?, :mon?
215
209
 
216
210
  alias_method :mday, :day
@@ -1,11 +1,6 @@
1
- require 'date_time_precision/lib'
2
- require 'date'
1
+ require 'date_time_precision/patch/common/date'
3
2
 
4
3
  class Date
5
- MAX_PRECISION = DateTimePrecision::DAY
6
-
7
- include DateTimePrecision
8
-
9
4
  class << self
10
5
  def parse(str='-4712-01-01T00:00:00+00:00', comp=false, sg=Date::ITALY)
11
6
  elem = _parse(str, comp)
@@ -1,11 +1,6 @@
1
- require 'date_time_precision/lib'
2
- require 'date'
1
+ require 'date_time_precision/patch/common/date_time'
3
2
 
4
3
  class DateTime < Date
5
- MAX_PRECISION = DateTimePrecision::SEC
6
-
7
- include DateTimePrecision
8
-
9
4
  class << self
10
5
  def parse(str='-4712-01-01T00:00:00+00:00', comp=false, sg=DateTime::ITALY)
11
6
  elem = _parse(str, comp)
@@ -1,11 +1,7 @@
1
- require 'date_time_precision/lib'
1
+ require 'date_time_precision/patch/common/time'
2
2
  require 'time'
3
3
 
4
4
  class Time
5
- MAX_PRECISION = DateTimePrecision::SEC
6
-
7
- include DateTimePrecision
8
-
9
5
  class << self
10
6
  alias_method :mktime_orig, :mktime
11
7
  def mktime(*args)
@@ -1,7 +1,6 @@
1
1
  require 'date_time_precision/patch/1.8.7/date_time'
2
2
 
3
3
  class DateTime < Date
4
-
5
4
  def self.civil(y=nil, m=nil, d=nil, h=nil, min=nil, s=nil, of=0, sg=ITALY)
6
5
  time_args = [y,m,d,h,min,s]
7
6
  precision = self.precision(time_args)
@@ -1,11 +1,6 @@
1
- require 'date_time_precision/lib'
2
- require 'date'
1
+ require 'date_time_precision/patch/common/date'
3
2
 
4
3
  class Date
5
- include DateTimePrecision
6
-
7
- MAX_PRECISION = DateTimePrecision::DAY
8
-
9
4
  class << self
10
5
  alias_method :new_orig, :new
11
6
  def new(*args)
@@ -1,11 +1,6 @@
1
- require 'date_time_precision/lib'
2
- require 'date'
1
+ require 'date_time_precision/patch/common/date_time'
3
2
 
4
3
  class DateTime < Date
5
- include DateTimePrecision
6
-
7
- MAX_PRECISION = DateTimePrecision::SEC
8
-
9
4
  class << self
10
5
  alias_method :new_orig, :new
11
6
  def new(*args)
@@ -0,0 +1,8 @@
1
+ require 'date_time_precision/lib'
2
+ require 'date'
3
+
4
+ class Date
5
+ MAX_PRECISION = DateTimePrecision::DAY
6
+
7
+ include DateTimePrecision
8
+ end
@@ -0,0 +1,22 @@
1
+ require 'date_time_precision/lib'
2
+ require 'date'
3
+
4
+ class DateTime < Date
5
+ MAX_PRECISION =
6
+ if DateTimePrecision::MICROSECONDS_SUPPORTED
7
+ DateTimePrecision::USEC
8
+ else
9
+ DateTimePrecision::SEC
10
+ end
11
+
12
+ include DateTimePrecision
13
+
14
+ if method_defined?(:sec_fraction)
15
+ alias_method :sec_frac?, :usec?
16
+ alias_method :sec_fraction?, :usec?
17
+
18
+ def usec
19
+ (sec_fraction.to_f*1_000_000).to_i
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,13 @@
1
+ require 'date_time_precision/lib'
2
+ require 'time'
3
+
4
+ class Time
5
+ MAX_PRECISION =
6
+ if DateTimePrecision::MICROSECONDS_SUPPORTED
7
+ DateTimePrecision::USEC
8
+ else
9
+ DateTimePrecision::SEC
10
+ end
11
+
12
+ include DateTimePrecision
13
+ end
@@ -1,3 +1,3 @@
1
1
  module DateTimePrecision
2
- VERSION = "0.7.0"
2
+ VERSION = "0.7.1"
3
3
  end
@@ -20,7 +20,7 @@ describe DateTimePrecision, 'Conversions' do
20
20
  it 'loses precision when converting from DateTime or Time to Date' do
21
21
  t = Time::parse('2000-1-1 00:00:00 EST') # => Fri Dec 31 21:00:00 -0800 1999
22
22
  t.precision.should == DateTimePrecision::SEC
23
- t.to_datetime.precision.should == DateTime::MAX_PRECISION
23
+ t.to_datetime.precision.should == DateTimePrecision::SEC
24
24
  t.to_date.precision.should == DateTimePrecision::DAY
25
25
  end
26
26
 
@@ -8,7 +8,7 @@ describe DateTimePrecision do
8
8
  let(:datetime) { DateTime.new(1989, 3, 11, 8, 30, 15) }
9
9
  let(:time) do
10
10
  args = [1989, 3, 11, 8, 30, 15]
11
- args << 1 if Time::MAX_PRECISION == DateTimePrecision::FRAC
11
+ args << 1 if DateTimePrecision::MICROSECONDS_SUPPORTED
12
12
  Time.mktime(*args)
13
13
  end
14
14
 
@@ -91,7 +91,7 @@ describe DateTimePrecision do
91
91
 
92
92
  let(:time_hash) do
93
93
  @time_hash = datetime_hash
94
- @time_hash.merge!(:sec_frac => 1) if Time::MAX_PRECISION == DateTimePrecision::FRAC
94
+ @time_hash.merge!(:usec => 1) if DateTimePrecision::MICROSECONDS_SUPPORTED
95
95
  @time_hash
96
96
  end
97
97
 
@@ -150,14 +150,18 @@ describe DateTimePrecision do
150
150
  end
151
151
 
152
152
  it 'should convert Time to a short hash' do
153
- time.to_h(:short).should == {
154
- :y => 1989,
155
- :m => 3,
156
- :d => 11,
157
- :h => 8,
158
- :min => 30,
159
- :s => 15
153
+ hash = {
154
+ :y => 1989,
155
+ :m => 3,
156
+ :d => 11,
157
+ :h => 8,
158
+ :min => 30,
159
+ :s => 15
160
160
  }
161
+
162
+ hash.merge!(:us => 1) if DateTimePrecision::MICROSECONDS_SUPPORTED
163
+
164
+ time.to_h(:short).should == hash
161
165
  end
162
166
 
163
167
  it 'should convert Time to a custom hash' do
@@ -1,6 +1,10 @@
1
1
  require 'rubygems'
2
- require 'bundler'
3
- Bundler.setup
2
+ require 'bundler/setup'
3
+
4
+ begin
5
+ require 'pry'
6
+ rescue LoadError
7
+ end
4
8
 
5
9
  Dir['./spec/support/**/*.rb'].map {|f| require f}
6
10
 
metadata CHANGED
@@ -1,119 +1,81 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: date_time_precision
3
- version: !ruby/object:Gem::Version
4
- version: 0.7.0
5
- prerelease:
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.7.1
6
5
  platform: ruby
7
- authors:
6
+ authors:
8
7
  - David Butler
9
- autorequire:
8
+ autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-07-15 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
11
+
12
+ date: 2014-05-28 00:00:00 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ version_requirements: &id001 !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - &id002
18
+ - ">="
19
+ - !ruby/object:Gem::Version
20
+ version: "0"
15
21
  name: rake
16
- version_requirements: !ruby/object:Gem::Requirement
17
- requirements:
18
- - - '>='
19
- - !ruby/object:Gem::Version
20
- version: '0'
21
- none: false
22
- requirement: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - '>='
25
- - !ruby/object:Gem::Version
26
- version: '0'
27
- none: false
22
+ requirement: *id001
28
23
  prerelease: false
29
24
  type: :development
30
- - !ruby/object:Gem::Dependency
25
+ - !ruby/object:Gem::Dependency
26
+ version_requirements: &id003 !ruby/object:Gem::Requirement
27
+ requirements:
28
+ - *id002
31
29
  name: rspec
32
- version_requirements: !ruby/object:Gem::Requirement
33
- requirements:
34
- - - '>='
35
- - !ruby/object:Gem::Version
36
- version: '0'
37
- none: false
38
- requirement: !ruby/object:Gem::Requirement
39
- requirements:
40
- - - '>='
41
- - !ruby/object:Gem::Version
42
- version: '0'
43
- none: false
30
+ requirement: *id003
44
31
  prerelease: false
45
32
  type: :development
46
- - !ruby/object:Gem::Dependency
33
+ - !ruby/object:Gem::Dependency
34
+ version_requirements: &id004 !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - *id002
47
37
  name: activesupport
48
- version_requirements: !ruby/object:Gem::Requirement
49
- requirements:
50
- - - '>='
51
- - !ruby/object:Gem::Version
52
- version: '0'
53
- none: false
54
- requirement: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - '>='
57
- - !ruby/object:Gem::Version
58
- version: '0'
59
- none: false
38
+ requirement: *id004
60
39
  prerelease: false
61
40
  type: :development
62
- - !ruby/object:Gem::Dependency
41
+ - !ruby/object:Gem::Dependency
42
+ version_requirements: &id005 !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - *id002
63
45
  name: json
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - '>='
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- none: false
70
- requirement: !ruby/object:Gem::Requirement
71
- requirements:
72
- - - '>='
73
- - !ruby/object:Gem::Version
74
- version: '0'
75
- none: false
46
+ requirement: *id005
76
47
  prerelease: false
77
48
  type: :development
78
- - !ruby/object:Gem::Dependency
79
- name: virtus
80
- version_requirements: !ruby/object:Gem::Requirement
81
- requirements:
82
- - - '='
83
- - !ruby/object:Gem::Version
84
- version: 0.5.4
85
- none: false
86
- requirement: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - '='
89
- - !ruby/object:Gem::Version
49
+ - !ruby/object:Gem::Dependency
50
+ version_requirements: &id006 !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "="
53
+ - !ruby/object:Gem::Version
90
54
  version: 0.5.4
91
- none: false
55
+ name: virtus
56
+ requirement: *id006
92
57
  prerelease: false
93
58
  type: :development
94
- - !ruby/object:Gem::Dependency
95
- name: coercible
96
- version_requirements: !ruby/object:Gem::Requirement
97
- requirements:
98
- - - '='
99
- - !ruby/object:Gem::Version
100
- version: 0.0.1
101
- none: false
102
- requirement: !ruby/object:Gem::Requirement
103
- requirements:
104
- - - '='
105
- - !ruby/object:Gem::Version
59
+ - !ruby/object:Gem::Dependency
60
+ version_requirements: &id007 !ruby/object:Gem::Requirement
61
+ requirements:
62
+ - - "="
63
+ - !ruby/object:Gem::Version
106
64
  version: 0.0.1
107
- none: false
65
+ name: coercible
66
+ requirement: *id007
108
67
  prerelease: false
109
68
  type: :development
110
69
  description: Patches Date, Time, and DateTime ruby classes to keep track of precision
111
- email:
70
+ email:
112
71
  - dwbutler@ucla.edu
113
72
  executables: []
73
+
114
74
  extensions: []
75
+
115
76
  extra_rdoc_files: []
116
- files:
77
+
78
+ files:
117
79
  - .gitignore
118
80
  - .travis.yml
119
81
  - Gemfile
@@ -146,6 +108,9 @@ files:
146
108
  - lib/date_time_precision/patch/1.9.3/date.rb
147
109
  - lib/date_time_precision/patch/1.9.3/date_time.rb
148
110
  - lib/date_time_precision/patch/1.9.3/time.rb
111
+ - lib/date_time_precision/patch/common/date.rb
112
+ - lib/date_time_precision/patch/common/date_time.rb
113
+ - lib/date_time_precision/patch/common/time.rb
149
114
  - lib/date_time_precision/version.rb
150
115
  - spec/active_support_spec.rb
151
116
  - spec/compatibility_spec.rb
@@ -153,36 +118,29 @@ files:
153
118
  - spec/format_spec.rb
154
119
  - spec/spec_helper.rb
155
120
  homepage: http://github.com/Spokeo/date_time_precision
156
- licenses: []
157
- post_install_message:
121
+ licenses:
122
+ - MIT
123
+ metadata: {}
124
+
125
+ post_install_message:
158
126
  rdoc_options: []
159
- require_paths:
127
+
128
+ require_paths:
160
129
  - lib
161
- required_ruby_version: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - '>='
164
- - !ruby/object:Gem::Version
165
- segments:
166
- - 0
167
- version: '0'
168
- hash: 2
169
- none: false
170
- required_rubygems_version: !ruby/object:Gem::Requirement
171
- requirements:
172
- - - '>='
173
- - !ruby/object:Gem::Version
174
- segments:
175
- - 0
176
- version: '0'
177
- hash: 2
178
- none: false
130
+ required_ruby_version: !ruby/object:Gem::Requirement
131
+ requirements:
132
+ - *id002
133
+ required_rubygems_version: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - *id002
179
136
  requirements: []
180
- rubyforge_project:
181
- rubygems_version: 1.8.24
182
- signing_key:
183
- specification_version: 3
137
+
138
+ rubyforge_project:
139
+ rubygems_version: 2.2.2
140
+ signing_key:
141
+ specification_version: 4
184
142
  summary: Patches Date, Time, and DateTime ruby classes to keep track of precision
185
- test_files:
143
+ test_files:
186
144
  - spec/active_support_spec.rb
187
145
  - spec/compatibility_spec.rb
188
146
  - spec/date_time_precision_spec.rb