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 +4 -4
- data/README.md +32 -13
- data/labtime.gemspec +1 -0
- data/lib/labtime/labtime.rb +1 -1
- data/lib/labtime/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f14b823bc4b483cbfcac0eabbf08e33bff80308acf88786d2c77fde89a58c69
|
4
|
+
data.tar.gz: f29fccdc88338dbfe2482ae9ea40e97956458fd0735235ecb1bfc74f640d3ab4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
7
|
+
2. Install the labtime gem using this command: `gem install labtime`
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
```
|
9
|
+
## CLI Usage
|
10
|
+
Run `labtime` and you should get this output:
|
13
11
|
|
14
|
-
|
15
|
-
|
16
|
-
|
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
|
-
|
20
|
+
## Python Usage
|
19
21
|
|
20
|
-
|
22
|
+
```python
|
23
|
+
import subprocess
|
24
|
+
import datetime
|
21
25
|
|
22
|
-
|
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]/
|
51
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/labtime.
|
33
52
|
|
34
53
|
## License
|
35
54
|
|
data/labtime.gemspec
CHANGED
data/lib/labtime/labtime.rb
CHANGED
data/lib/labtime/version.rb
CHANGED
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.
|
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-
|
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
|