dotiw 1.0.0 → 1.1.0

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.
data/.gitignore CHANGED
@@ -2,3 +2,4 @@ tmp
2
2
  pkg
3
3
  spec/fixtures/database.yml
4
4
  .rvmrc
5
+ Gemfile.lock
data/lib/dotiw/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module DOTIW
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
data/lib/dotiw.rb CHANGED
@@ -39,13 +39,14 @@ module ActionView
39
39
  options.symbolize_keys!
40
40
  I18n.locale = options[:locale] if options[:locale]
41
41
 
42
- time_measurements = { :years => I18n.t(:years, :default => "years"),
43
- :months => I18n.t(:months, :default => "months"),
44
- :weeks => I18n.t(:weeks, :default => "weeks"),
45
- :days => I18n.t(:days, :default => "days"),
46
- :hours => I18n.t(:hours, :default => "hours"),
47
- :minutes => I18n.t(:minutes, :default => "minutes"),
48
- :seconds => I18n.t(:seconds, :default => "seconds") }
42
+ time_measurements = ActiveSupport::OrderedHash.new
43
+ time_measurements[:years] = I18n.t(:years, :default => "years")
44
+ time_measurements[:months] = I18n.t(:months, :default => "months")
45
+ time_measurements[:weeks] = I18n.t(:weeks, :default => "weeks")
46
+ time_measurements[:days] = I18n.t(:days, :default => "days")
47
+ time_measurements[:hours] = I18n.t(:hours, :default => "hours")
48
+ time_measurements[:minutes] = I18n.t(:minutes, :default => "minutes")
49
+ time_measurements[:seconds] = I18n.t(:seconds, :default => "seconds")
49
50
 
50
51
  hash.delete(time_measurements[:seconds]) if !include_seconds && hash[time_measurements[:minutes]]
51
52
 
@@ -206,7 +206,7 @@ describe "A better distance_of_time_in_words" do
206
206
  [Time.now,
207
207
  Time.now + 2.year + 3.months + 4.days + 5.hours + 6.minutes + 7.seconds,
208
208
  { :singularize => :always },
209
- "2 year, 3 month, 4 day, 4 hour, 6 minute, and 7 second"]
209
+ "2 year, 3 month, 4 day, 5 hour, 6 minute, and 7 second"]
210
210
  ].each do |start, finish, options, output|
211
211
  it "should be #{output}" do
212
212
  distance_of_time_in_words(start, finish, true, options).should eql(output)
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dotiw
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
- prerelease: false
6
- segments:
7
- - 1
8
- - 0
9
- - 0
10
- version: 1.0.0
4
+ prerelease:
5
+ version: 1.1.0
11
6
  platform: ruby
12
7
  authors:
13
8
  - Ryan Bigg
@@ -26,11 +21,6 @@ dependencies:
26
21
  requirements:
27
22
  - - ~>
28
23
  - !ruby/object:Gem::Version
29
- hash: 7
30
- segments:
31
- - 3
32
- - 0
33
- - 0
34
24
  version: 3.0.0
35
25
  type: :runtime
36
26
  version_requirements: *id001
@@ -42,11 +32,6 @@ dependencies:
42
32
  requirements:
43
33
  - - ~>
44
34
  - !ruby/object:Gem::Version
45
- hash: 23
46
- segments:
47
- - 1
48
- - 0
49
- - 0
50
35
  version: 1.0.0
51
36
  type: :development
52
37
  version_requirements: *id002
@@ -58,10 +43,6 @@ dependencies:
58
43
  requirements:
59
44
  - - ~>
60
45
  - !ruby/object:Gem::Version
61
- hash: 3
62
- segments:
63
- - 2
64
- - 0
65
46
  version: "2.0"
66
47
  type: :development
67
48
  version_requirements: *id003
@@ -74,10 +55,8 @@ extensions: []
74
55
  extra_rdoc_files: []
75
56
 
76
57
  files:
77
- - .bundle/config
78
58
  - .gitignore
79
59
  - Gemfile
80
- - Gemfile.lock
81
60
  - MIT-LICENSE
82
61
  - README.markdown
83
62
  - Rakefile
@@ -105,25 +84,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
84
  requirements:
106
85
  - - ">="
107
86
  - !ruby/object:Gem::Version
108
- hash: 3
109
- segments:
110
- - 0
111
87
  version: "0"
112
88
  required_rubygems_version: !ruby/object:Gem::Requirement
113
89
  none: false
114
90
  requirements:
115
91
  - - ">="
116
92
  - !ruby/object:Gem::Version
117
- hash: 23
118
- segments:
119
- - 1
120
- - 3
121
- - 6
122
93
  version: 1.3.6
123
94
  requirements: []
124
95
 
125
96
  rubyforge_project:
126
- rubygems_version: 1.3.7
97
+ rubygems_version: 1.5.2
127
98
  signing_key:
128
99
  specification_version: 3
129
100
  summary: Better distance_of_time_in_words for Rails
data/.bundle/config DELETED
@@ -1,3 +0,0 @@
1
- ---
2
- BUNDLE_DISABLE_SHARED_GEMS: "1"
3
- BUNDLE_WITHOUT: production
data/Gemfile.lock DELETED
@@ -1,53 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- dotiw (1.0.0)
5
- actionpack (~> 3.0.0)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- abstract (1.0.0)
11
- actionpack (3.0.3)
12
- activemodel (= 3.0.3)
13
- activesupport (= 3.0.3)
14
- builder (~> 2.1.2)
15
- erubis (~> 2.6.6)
16
- i18n (~> 0.4)
17
- rack (~> 1.2.1)
18
- rack-mount (~> 0.6.13)
19
- rack-test (~> 0.5.6)
20
- tzinfo (~> 0.3.23)
21
- activemodel (3.0.3)
22
- activesupport (= 3.0.3)
23
- builder (~> 2.1.2)
24
- i18n (~> 0.4)
25
- activesupport (3.0.3)
26
- builder (2.1.2)
27
- diff-lcs (1.1.2)
28
- erubis (2.6.6)
29
- abstract (>= 1.0.0)
30
- i18n (0.5.0)
31
- rack (1.2.1)
32
- rack-mount (0.6.13)
33
- rack (>= 1.0.0)
34
- rack-test (0.5.6)
35
- rack (>= 1.0)
36
- rspec (2.3.0)
37
- rspec-core (~> 2.3.0)
38
- rspec-expectations (~> 2.3.0)
39
- rspec-mocks (~> 2.3.0)
40
- rspec-core (2.3.1)
41
- rspec-expectations (2.3.0)
42
- diff-lcs (~> 1.1.2)
43
- rspec-mocks (2.3.0)
44
- tzinfo (0.3.23)
45
-
46
- PLATFORMS
47
- ruby
48
-
49
- DEPENDENCIES
50
- actionpack (~> 3.0.0)
51
- bundler (~> 1.0.0)
52
- dotiw!
53
- rspec (~> 2.0)