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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1f9db2250261fa933e58fb16c93258b5eea9a2620a3eff8a08ff1206fbd890c4
4
- data.tar.gz: 2fd1fda5bc099e1fb32ca02febb466b6af23c9db92c6795d5d924b89792303cd
3
+ metadata.gz: de2d7fa98a1ff3d173796e4595aea035f4a83adbb84b669db7edef52a48b2076
4
+ data.tar.gz: '089964fa3b1e46297afd7409ea9e19090a8f1734623ce7234e24feae2c4a0012'
5
5
  SHA512:
6
- metadata.gz: 9be13fd8b6969e4ccad6d6c55af1ec3445adff37302b1146aea87ec9cc0ced7ac2a01e6124f18f0847814178d5f17c2bb213615edbcda41c2341e82e855287ed
7
- data.tar.gz: a0d3d6abc6df2fc7687e771302490b04c46d42d9b73c5545c6848ed305f2e7635dec74021c99fb1bb03be56296b4d45597d531286bc6fa21c7137dce16120240
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bored (0.1.0)
4
+ bored (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -53,4 +53,4 @@ DEPENDENCIES
53
53
  standard
54
54
 
55
55
  BUNDLED WITH
56
- 2.2.30
56
+ 2.3.14
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
@@ -1,3 +1,3 @@
1
1
  module Bored
2
- VERSION = "0.1.0"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/bored.rb CHANGED
@@ -13,11 +13,8 @@ module Bored
13
13
  )
14
14
 
15
15
  class << self
16
- def now(key: nil, participants: nil)
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.1.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: 2021-12-02 00:00:00.000000000 Z
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.2.22
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