theampm 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- MjU1NDcxZGI2YTlkYThhYTI5MDRlNTRmZjljNjgwMjczZjU4MzE3ZA==
4
+ NDljZmJmOTI0YmVmNDdmYTcxOTcxNjFjZjA3OWI1ZDVhMmJhNGQwYg==
5
5
  data.tar.gz: !binary |-
6
- MGVhMGViNzVkYmNiY2IyYTU1NzFmMzAyOWY2NmEyNTM1YjJkMmU3Nw==
6
+ ZTkxNmUxN2MyZWNmZmU5MDJmZmFmODVkYTM0YjhkNGI2YTQ5MjdlYQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MmQyMmQ3MjQxZDFlYzk5ZjMzYTkyZmVlMDQ0NjZlNGRkZWExMGVlMmQ0NmZm
10
- OGExODQwYjM2YTkzM2RmMmEyZDIxMjc0MzFjZjViMWJmOTdjM2NkMzNmNTM0
11
- M2IxZGVmZjdiYmM0MWQ4OGQ1ZTA1ZTBkYTM1YTNhNGQ0MjkxZWU=
9
+ MWU1MDFjNTUzYzEyOTRlMmE0ODUxNjAwMzBkODRkZWUxYTRmY2JhN2Y5NGIy
10
+ ZTFlNTE5YjIyNDNmNDE2NGMyMWY1MDM1M2FlOGE2ZTY3YWJkZjFiOTQ5MmNk
11
+ MjFlOGZkYTJlMTgzYmIwYWExZmM4NjI2MGM0OTZhZDQ5YzAzYmY=
12
12
  data.tar.gz: !binary |-
13
- MGU5MDY0ZWEyMWQ2MGExNjUwNTkwY2FhNmQ5Nzk0MjBiNWJiYTY5ODI4NDIx
14
- Mjc3NTdhZGY1ZGY5MGI2MWU3YTcxY2MxNGRkMWExMWY4ZmMwYWI2YmRjZDhh
15
- MTJiZjQ2M2JlNzllNzEyNTI3MGRmZGJmYTI0YzVmMWZiMmNjYzY=
13
+ MmY0YjRlMjIzZjg5MzI2OTk3NTMxYjEyODZiYmU1MGY5NTdlMTlkZmI5OGY0
14
+ OWEyZTc1MDFiYjkxZmNlZjEwN2U3MWIyMTYyYzQ1YjljYjljMDg5MDU5MDgw
15
+ NDY3ZjFmM2NhYTNkZGY2OWRkYjFjMjE2M2UwOGUzYjMwNGJlOTU=
data/README.md CHANGED
@@ -1,38 +1,37 @@
1
- # Theampm
1
+ theampm
2
+ ===========
2
3
 
3
- A nice way to write time in Ruby:
4
+ With theampm, write Time like this in Ruby:
4
5
 
6
+ ```
5
7
  1.am
8
+ => 2013-10-08 01:00:00 -0500
6
9
 
7
10
  130.am
11
+ => 2013-10-08 01:30:00 -0500
8
12
 
9
13
  4.pm
14
+ => 2013-10-08 16:00:00 -0500
10
15
 
11
- 1515.to_time
12
-
13
- ## Installation
14
-
15
- Add this line to your application's Gemfile:
16
-
17
- gem 'theampm'
16
+ 925.pm
17
+ => 2013-10-08 21:25:00 -0500
18
18
 
19
- And then execute:
20
-
21
- $ bundle
22
-
23
- Or install it yourself as:
19
+ # There's also a to_time method
20
+ 1515.to_time
21
+ => 2013-10-08 15:15:00 -0500
22
+ ```
24
23
 
25
- $ gem install theampm
24
+ This code is so simple I debated even creating a gem for it, but I find myself creating it repeatedly for new projects, and now again for [Draft](http://draftin.com), an app to help people [write better](http://draftin.com).
26
25
 
27
- ## Usage
28
26
 
29
- There's really nothing to it.
27
+ Installation
28
+ ------------
30
29
 
30
+ 1. Add `gem 'theampm'` to your Gemfile.
31
+ 2. Run `bundle install`.
32
+ 3. Restart your server
31
33
 
32
- ## Contributing
33
34
 
34
- 1. Fork it
35
- 2. Create your feature branch (`git checkout -b my-new-feature`)
36
- 3. Commit your changes (`git commit -am 'Add some feature'`)
37
- 4. Push to the branch (`git push origin my-new-feature`)
38
- 5. Create new Pull Request
35
+ Feedback
36
+ --------
37
+ [Source code available on Github](https://github.com/n8/theampm). Feedback and pull requests are greatly appreciated. Let me know if I can improve this.
@@ -1,3 +1,3 @@
1
1
  module Theampm
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
data/theampm.gemspec CHANGED
@@ -20,4 +20,5 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
+ spec.add_runtime_dependency 'chronic'
23
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: theampm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - nate
@@ -38,6 +38,20 @@ dependencies:
38
38
  - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: chronic
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ! '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
41
55
  description: am/pm convenience methods on integers to create time objects
42
56
  email:
43
57
  - nate@cityposh.com