natural_time 0.0.5 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in natural_time.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,20 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ natural_time (0.0.5)
5
+ activesupport
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ activesupport (3.2.6)
11
+ i18n (~> 0.6)
12
+ multi_json (~> 1.0)
13
+ i18n (0.6.0)
14
+ multi_json (1.3.6)
15
+
16
+ PLATFORMS
17
+ ruby
18
+
19
+ DEPENDENCIES
20
+ natural_time!
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.1.0
data/lib/natural_time.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'rubygems'
2
- require 'active_support'
2
+ require 'active_support/core_ext/integer'
3
+ require 'active_support/core_ext/numeric'
3
4
 
4
5
  class NaturalTime
5
6
  attr_accessor :duration, :precision, :past
@@ -27,7 +28,7 @@ class NaturalTime
27
28
  end
28
29
 
29
30
  def to_a
30
- elapsed_time(duration)
31
+ [elapsed_time(duration)].flatten
31
32
  end
32
33
 
33
34
  def to_array
data/natural_time.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "natural_time"
8
- s.version = "0.0.5"
8
+ s.version = "0.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeff Coleman"]
12
- s.date = "2012-05-11"
12
+ s.date = "2012-07-11"
13
13
  s.description = "Smart enumeration of durations in natural language--\"4 hours, 3 minutes and 2 seconds\""
14
14
  s.email = "progressions@gmail.com"
15
15
  s.extra_rdoc_files = [
@@ -19,6 +19,8 @@ Gem::Specification.new do |s|
19
19
  s.files = [
20
20
  ".document",
21
21
  ".rvmrc",
22
+ "Gemfile",
23
+ "Gemfile.lock",
22
24
  "History.txt",
23
25
  "LICENSE",
24
26
  "README.rdoc",
@@ -39,11 +41,14 @@ Gem::Specification.new do |s|
39
41
  s.specification_version = 3
40
42
 
41
43
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
44
+ s.add_runtime_dependency(%q<natural_time>, [">= 0"])
42
45
  s.add_runtime_dependency(%q<activesupport>, [">= 0"])
43
46
  else
47
+ s.add_dependency(%q<natural_time>, [">= 0"])
44
48
  s.add_dependency(%q<activesupport>, [">= 0"])
45
49
  end
46
50
  else
51
+ s.add_dependency(%q<natural_time>, [">= 0"])
47
52
  s.add_dependency(%q<activesupport>, [">= 0"])
48
53
  end
49
54
  end
data/spec/spec_helper.rb CHANGED
@@ -1,9 +1,8 @@
1
1
  $LOAD_PATH.unshift(File.dirname(__FILE__))
2
2
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
3
3
  require 'natural_time'
4
- require 'spec'
5
- require 'spec/autorun'
4
+ require 'rspec'
6
5
 
7
- Spec::Runner.configure do |config|
6
+ RSpec.configure do |config|
8
7
 
9
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: natural_time
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 27
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
+ - 1
8
9
  - 0
9
- - 5
10
- version: 0.0.5
10
+ version: 0.1.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeff Coleman
@@ -15,11 +15,10 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-05-11 00:00:00 Z
18
+ date: 2012-07-11 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: activesupport
22
- prerelease: false
21
+ type: :runtime
23
22
  requirement: &id001 !ruby/object:Gem::Requirement
24
23
  none: false
25
24
  requirements:
@@ -29,8 +28,23 @@ dependencies:
29
28
  segments:
30
29
  - 0
31
30
  version: "0"
32
- type: :runtime
33
31
  version_requirements: *id001
32
+ name: natural_time
33
+ prerelease: false
34
+ - !ruby/object:Gem::Dependency
35
+ type: :runtime
36
+ requirement: &id002 !ruby/object:Gem::Requirement
37
+ none: false
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ hash: 3
42
+ segments:
43
+ - 0
44
+ version: "0"
45
+ version_requirements: *id002
46
+ name: activesupport
47
+ prerelease: false
34
48
  description: Smart enumeration of durations in natural language--"4 hours, 3 minutes and 2 seconds"
35
49
  email: progressions@gmail.com
36
50
  executables: []
@@ -43,6 +57,8 @@ extra_rdoc_files:
43
57
  files:
44
58
  - .document
45
59
  - .rvmrc
60
+ - Gemfile
61
+ - Gemfile.lock
46
62
  - History.txt
47
63
  - LICENSE
48
64
  - README.rdoc