bored 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +2 -2
- data/lib/bored/cli.rb +15 -1
- data/lib/bored/version.rb +1 -1
- data/lib/bored.rb +2 -5
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: de2d7fa98a1ff3d173796e4595aea035f4a83adbb84b669db7edef52a48b2076
|
4
|
+
data.tar.gz: '089964fa3b1e46297afd7409ea9e19090a8f1734623ce7234e24feae2c4a0012'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 418912a5b8aaa4882be648875c3fb0baa4a6a21ba01bbf6030539fde1a40330358deda9fcae1edf8a13ee2252704b82feb7be353ca80c1a08322dbfa2535f37f
|
7
|
+
data.tar.gz: 7fa02e633472a344f6d01aca1fe83746c7d674caa6a7e528f8d99da023f473bbaef364bdffba709a86d1500f2f118fd550f4bb8b36aef70de7c0dac82e0e4157
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
## [Unreleased]
|
2
2
|
|
3
|
+
## [0.2.0] - 2022-05-19
|
4
|
+
|
5
|
+
- Add `--type` filter option in the CLI
|
6
|
+
[#15](https://github.com/testdouble/bored/pull/15) by
|
7
|
+
[@radglob](https://github.com/radglob) and
|
8
|
+
[@BrianBorge](@https://github.com/BrianBorge)
|
9
|
+
|
3
10
|
## [0.1.0] - 2021-12-02
|
4
11
|
|
5
12
|
- Add filtering by Activity ID
|
data/Gemfile.lock
CHANGED
data/lib/bored/cli.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require "optparse"
|
2
|
+
|
1
3
|
module Bored
|
2
4
|
class Cli
|
3
5
|
def initialize(argv)
|
@@ -5,7 +7,19 @@ module Bored
|
|
5
7
|
end
|
6
8
|
|
7
9
|
def run
|
8
|
-
puts Bored.now.description
|
10
|
+
puts Bored.now(**params).description
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def params
|
16
|
+
options = {}
|
17
|
+
OptionParser.new do |opts|
|
18
|
+
opts.on("--type TYPE", "Pick the type of activity") do |t|
|
19
|
+
options[:type] = t
|
20
|
+
end
|
21
|
+
end.parse!
|
22
|
+
options
|
9
23
|
end
|
10
24
|
end
|
11
25
|
end
|
data/lib/bored/version.rb
CHANGED
data/lib/bored.rb
CHANGED
@@ -13,11 +13,8 @@ module Bored
|
|
13
13
|
)
|
14
14
|
|
15
15
|
class << self
|
16
|
-
def now(
|
17
|
-
json = JSON.parse(Net::HTTP.get(uri(
|
18
|
-
key: key,
|
19
|
-
participants: participants
|
20
|
-
})))
|
16
|
+
def now(params = {})
|
17
|
+
json = JSON.parse(Net::HTTP.get(uri(params)))
|
21
18
|
raise Error.new(json["error"]) if json["error"]
|
22
19
|
|
23
20
|
Activity.new(
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bored
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Searls
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -54,7 +54,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
requirements: []
|
57
|
-
rubygems_version: 3.
|
57
|
+
rubygems_version: 3.3.6
|
58
58
|
signing_key:
|
59
59
|
specification_version: 4
|
60
60
|
summary: Gives you ideas of stuff to do when you're bored
|