date_time_precision 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -5,7 +5,7 @@ rvm:
5
5
  - 1.8.7
6
6
  - 1.9.2
7
7
  - 1.9.3
8
- #- 2.0.0
8
+ - 2.0.0
9
9
  - jruby-18mode
10
10
  - jruby-19mode
11
11
  gemfile:
@@ -17,6 +17,8 @@ matrix:
17
17
  gemfile: gemfiles/activesupport2.gemfile
18
18
  - rvm: 1.9.3
19
19
  gemfile: gemfiles/activesupport2.gemfile
20
+ - rvm: 2.0.0
21
+ gemfile: gemfiles/activesupport2.gemfile
20
22
  - rvm: jruby-19mode
21
23
  gemfile: gemfiles/activesupport2.gemfile
22
24
  - rvm: rbx-19mode
data/Gemfile CHANGED
@@ -1,3 +1,3 @@
1
- source :rubygems
1
+ source "http://rubygems.org"
2
2
 
3
3
  gemspec
data/README.md CHANGED
@@ -70,7 +70,7 @@ JSON.parse(json).to_date.precision
70
70
 
71
71
  ## Ruby Compatibility
72
72
 
73
- Tested in MRI 1.8.7/1.9.2/1.9.3, REE, JRuby 1.8/1.9, and Rubinius 1.8/1.9.
73
+ 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.
74
74
 
75
75
  Note that starting in MRI 1.9.3, the core Date/Time classes were rewritten in C, making it difficult to
76
76
  override internal functionality. Some functions are now implemented internally and are not exposed.
@@ -22,5 +22,5 @@ Gem::Specification.new do |gem|
22
22
  gem.add_development_dependency 'json'
23
23
 
24
24
  gem.add_development_dependency 'virtus', '0.5.4'
25
- gem.add_development_dependency 'coercible'
25
+ gem.add_development_dependency 'coercible', '0.0.1'
26
26
  end
@@ -7,4 +7,4 @@ gem 'activesupport', '~> 2', :require => false
7
7
 
8
8
  gem 'json'
9
9
  gem 'virtus', '0.5.4'
10
- gem 'coercible'
10
+ gem 'coercible', '0.0.1'
@@ -7,4 +7,4 @@ gem 'activesupport', '~> 3', :require => false
7
7
 
8
8
  gem 'json'
9
9
  gem 'virtus', '0.5.4'
10
- gem 'coercible'
10
+ gem 'coercible', '0.0.1'
@@ -43,5 +43,5 @@ module DateTimePrecision
43
43
  end
44
44
  end
45
45
 
46
- require 'date_time_precision/compat/virtus'
47
- require 'date_time_precision/compat/coercible'
46
+ require 'date_time_precision/compat/virtus' if defined?(Virtus)
47
+ require 'date_time_precision/compat/coercible' if defined?(Coercible)
@@ -6,6 +6,9 @@ DateTimePrecision::PATCH_VERSION = begin
6
6
  if defined?(JRUBY_VERSION) || (defined?(RUBY_ENGINE) and RUBY_ENGINE == 'rbx')
7
7
  #JRuby and Rubinius implement the Date/Time classes in pure Ruby, so they can use the 1.9.2 patch
8
8
  RUBY_VERSION >= '1.9' ? '1.9.2' : '1.8.7'
9
+ elsif RUBY_VERSION > '2'
10
+ # The 1.9.3 patch works in Ruby 2.0.0
11
+ '1.9.3'
9
12
  else
10
13
  RUBY_VERSION
11
14
  end
@@ -1,3 +1,3 @@
1
1
  module DateTimePrecision
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
@@ -20,8 +20,10 @@ describe DateTimePrecision do
20
20
  let(:time_hash) { {:yr => 1950, 'm' => 5, :day => 19, :hr => 5} }
21
21
 
22
22
  context 'with Virtus' do
23
+ require 'date_time_precision/compat/virtus'
24
+
23
25
  let(:model) { VirtusModel.new }
24
- before(:all) do
26
+ before(:each) do
25
27
  model.date = date_hash
26
28
  model.datetime = datetime_hash
27
29
  model.time = time_hash
@@ -57,6 +59,8 @@ describe DateTimePrecision do
57
59
  end
58
60
 
59
61
  context 'with Coercible' do
62
+ require 'date_time_precision/compat/coercible'
63
+
60
64
  let(:coercer) { Coercible::Coercer::Hash.new }
61
65
 
62
66
  context 'when coercing a hash to a Date' do
metadata CHANGED
@@ -1,118 +1,119 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: date_time_precision
3
- version: !ruby/object:Gem::Version
4
- hash: 17
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.2
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 3
9
- - 1
10
- version: 0.3.1
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - David Butler
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2013-02-06 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
21
- version_requirements: &id001 !ruby/object:Gem::Requirement
22
- none: false
23
- requirements:
24
- - - ">="
25
- - !ruby/object:Gem::Version
26
- hash: 3
27
- segments:
28
- - 0
29
- version: "0"
30
- prerelease: false
31
- type: :development
12
+ date: 2013-02-26 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
32
15
  name: rake
33
- requirement: *id001
34
- - !ruby/object:Gem::Dependency
35
- version_requirements: &id002 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
36
17
  none: false
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- hash: 3
41
- segments:
42
- - 0
43
- version: "0"
44
- prerelease: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
45
22
  type: :development
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
46
31
  name: rspec
47
- requirement: *id002
48
- - !ruby/object:Gem::Dependency
49
- version_requirements: &id003 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
50
33
  none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- hash: 3
55
- segments:
56
- - 0
57
- version: "0"
58
- prerelease: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
59
38
  type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
60
47
  name: activesupport
61
- requirement: *id003
62
- - !ruby/object:Gem::Dependency
63
- version_requirements: &id004 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
64
49
  none: false
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- hash: 3
69
- segments:
70
- - 0
71
- version: "0"
72
- prerelease: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
73
54
  type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
74
63
  name: json
75
- requirement: *id004
76
- - !ruby/object:Gem::Dependency
77
- version_requirements: &id005 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
78
65
  none: false
79
- requirements:
80
- - - "="
81
- - !ruby/object:Gem::Version
82
- hash: 3
83
- segments:
84
- - 0
85
- - 5
86
- - 4
87
- version: 0.5.4
88
- prerelease: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
89
70
  type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
90
79
  name: virtus
91
- requirement: *id005
92
- - !ruby/object:Gem::Dependency
93
- version_requirements: &id006 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
94
81
  none: false
95
- requirements:
96
- - - ">="
97
- - !ruby/object:Gem::Version
98
- hash: 3
99
- segments:
100
- - 0
101
- version: "0"
102
- prerelease: false
82
+ requirements:
83
+ - - '='
84
+ - !ruby/object:Gem::Version
85
+ version: 0.5.4
103
86
  type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - '='
92
+ - !ruby/object:Gem::Version
93
+ version: 0.5.4
94
+ - !ruby/object:Gem::Dependency
104
95
  name: coercible
105
- requirement: *id006
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - '='
100
+ - !ruby/object:Gem::Version
101
+ version: 0.0.1
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - '='
108
+ - !ruby/object:Gem::Version
109
+ version: 0.0.1
106
110
  description: Patches Date, Time, and DateTime ruby classes to keep track of precision
107
- email:
111
+ email:
108
112
  - dwbutler@ucla.edu
109
113
  executables: []
110
-
111
114
  extensions: []
112
-
113
115
  extra_rdoc_files: []
114
-
115
- files:
116
+ files:
116
117
  - .gitignore
117
118
  - .travis.yml
118
119
  - Gemfile
@@ -148,38 +149,35 @@ files:
148
149
  - spec/spec_helper.rb
149
150
  homepage: http://github.com/Spokeo/date_time_precision
150
151
  licenses: []
151
-
152
152
  post_install_message:
153
153
  rdoc_options: []
154
-
155
- require_paths:
154
+ require_paths:
156
155
  - lib
157
- required_ruby_version: !ruby/object:Gem::Requirement
156
+ required_ruby_version: !ruby/object:Gem::Requirement
158
157
  none: false
159
- requirements:
160
- - - ">="
161
- - !ruby/object:Gem::Version
162
- hash: 3
163
- segments:
158
+ requirements:
159
+ - - ! '>='
160
+ - !ruby/object:Gem::Version
161
+ version: '0'
162
+ segments:
164
163
  - 0
165
- version: "0"
166
- required_rubygems_version: !ruby/object:Gem::Requirement
164
+ hash: 1472346425061426600
165
+ required_rubygems_version: !ruby/object:Gem::Requirement
167
166
  none: false
168
- requirements:
169
- - - ">="
170
- - !ruby/object:Gem::Version
171
- hash: 3
172
- segments:
167
+ requirements:
168
+ - - ! '>='
169
+ - !ruby/object:Gem::Version
170
+ version: '0'
171
+ segments:
173
172
  - 0
174
- version: "0"
173
+ hash: 1472346425061426600
175
174
  requirements: []
176
-
177
175
  rubyforge_project:
178
- rubygems_version: 1.8.24
176
+ rubygems_version: 1.8.25
179
177
  signing_key:
180
178
  specification_version: 3
181
179
  summary: Patches Date, Time, and DateTime ruby classes to keep track of precision
182
- test_files:
180
+ test_files:
183
181
  - spec/date_time_precision/active_support_spec.rb
184
182
  - spec/date_time_precision/compatibility_spec.rb
185
183
  - spec/date_time_precision/date_time_precision_spec.rb