labtime 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9df5928a6e0a89b97214af314f4887ebe3c534f42b7a8b474c7063f9dfb3cbb4
4
- data.tar.gz: 7e3c201ec39bf0eb48c040e6cbb23a5d3bbdc816ec2757d2b391c5129d5ed3ae
3
+ metadata.gz: 4f14b823bc4b483cbfcac0eabbf08e33bff80308acf88786d2c77fde89a58c69
4
+ data.tar.gz: f29fccdc88338dbfe2482ae9ea40e97956458fd0735235ecb1bfc74f640d3ab4
5
5
  SHA512:
6
- metadata.gz: 40f06438d4e409d853181106e44722300e83db0e270c9406afe20660720405b3241af31b4cb5fc8e58aa51418c96071baa350b636c96692cdfd7628d94412810
7
- data.tar.gz: 993fc77a68da862c1a404745e29797f5fc978a1bf050c68b2b6d41879d40836f17bcf8cfe60eab5032b61736de5a85ce52a30c8c1cd73066d061f252f38210db
6
+ metadata.gz: b8f7ee1e2acfec0fadfb82e9330f7c96372b3c59c6995d0ae75974130ff6f11caf665f6dc4ee1315998fe30f6c118ce69a8a3beb91c1c9096127035b073b0a59
7
+ data.tar.gz: 20d07cb31743238112c61c60ed009613d85078ddc5b491accd0eb77785435cfa5e1987ae63bc7760f582d53d27c801acdcb1d443a0c8a0b8ecc803f29838c0ab
data/README.md CHANGED
@@ -1,25 +1,33 @@
1
1
  # Labtime
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/Labtime`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
3
 
6
4
  ## Installation
5
+ 1. Make sure you have ruby and ruby gems installed. Refer to https://www.ruby-lang.org/en/documentation/installation/.
7
6
 
8
- Add this line to your application's Gemfile:
7
+ 2. Install the labtime gem using this command: `gem install labtime`
9
8
 
10
- ```ruby
11
- gem 'Labtime'
12
- ```
9
+ ## CLI Usage
10
+ Run `labtime` and you should get this output:
13
11
 
14
- And then execute:
15
-
16
- $ bundle
12
+ ```
13
+ $ labtime
14
+ Commands:
15
+ labtime convert_decimal [decimal_labtime] [year] # Convert a decimal labtime in a given year to real time in string format
16
+ labtime hello [name] # say my name
17
+ labtime help [COMMAND] # Describe available commands or one specific command
18
+ ```
17
19
 
18
- Or install it yourself as:
20
+ ## Python Usage
19
21
 
20
- $ gem install Labtime
22
+ ```python
23
+ import subprocess
24
+ import datetime
21
25
 
22
- ## Usage
26
+ realtime = subprocess.check_output(['labtime','convert_decimal','1000.0', '2000']).decode('utf-8')
27
+ realtime = datetime.datetime.strptime(realtime.strip(), "%Y-%m-%d %H:%M:%S %z")
28
+ realtime.isoformat()
29
+ # '2000-02-11T16:00:00-05:00'
30
+ ```
23
31
 
24
32
  ## Development
25
33
 
@@ -27,9 +35,20 @@ After checking out the repo, run `bin/setup` to install dependencies. Then, run
27
35
 
28
36
  To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
29
37
 
38
+ ## Including in your project
39
+ Add this line to your application's Gemfile:
40
+
41
+ ```ruby
42
+ gem 'labtime'
43
+ ```
44
+
45
+ And then execute:
46
+
47
+ $ bundle
48
+
30
49
  ## Contributing
31
50
 
32
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/Labtime.
51
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/labtime.
33
52
 
34
53
  ## License
35
54
 
@@ -28,4 +28,5 @@ Gem::Specification.new do |spec|
28
28
 
29
29
  spec.add_dependency "activesupport", "~> 4.2.0"
30
30
  spec.add_dependency "thor"
31
+ spec.add_dependency "tzinfo-data"
31
32
  end
@@ -44,7 +44,7 @@ module Labtime
44
44
  hour = decimal_labtime.to_i
45
45
  remainder = decimal_labtime - hour.to_f
46
46
 
47
- minute_labtime = 6.0 * remainder
47
+ minute_labtime = 60 * remainder
48
48
  minute = minute_labtime.to_i
49
49
 
50
50
  remainder = minute_labtime - minute.to_f
@@ -1,3 +1,3 @@
1
1
  module Labtime
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: labtime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Piotr Mankowski
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-08-03 00:00:00.000000000 Z
11
+ date: 2018-08-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,6 +80,20 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: tzinfo-data
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :runtime
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
83
97
  description:
84
98
  email:
85
99
  - pmanko@uw.edu