habitica_cli 1.0.1 → 1.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 +4 -4
- data/lib/habitica_cli/config.rb +2 -1
- data/lib/habitica_cli/main.rb +2 -4
- data/lib/habitica_cli/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 94e605f7b9f4bae9183cb8895d5a494ec6272eff
|
4
|
+
data.tar.gz: 0873a83f13858b108185e76727caaab721d348a8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 852dfb8f1277bb29edcb86cbcc0c679f461a86d27e32614bbaedc41636011374ccbd47296096bfcb92a59848229cdac260160c06586023db2e4ad761c7e40866
|
7
|
+
data.tar.gz: 1d9378f8a53cf5545ebae0ca4dfe2121dcd2f6b061141fceb7506f75743b8ee0de47683993b41f75988bce5fc5876ef6c2c78f835cc390a4f3a0da82e341ba81
|
data/lib/habitica_cli/config.rb
CHANGED
@@ -9,7 +9,8 @@ module HabiticaCli
|
|
9
9
|
|
10
10
|
def user_and_api_key
|
11
11
|
config = Kefir.config('habitica_cli')
|
12
|
-
habit_user
|
12
|
+
habit_user = @options[:habit_user] || ENV['HABIT_USER']
|
13
|
+
habit_key = @options[:habit_key] || ENV['HABIT_KEY']
|
13
14
|
|
14
15
|
if blank?(habit_user) || blank?(habit_key)
|
15
16
|
habit_user = config.get('habit_user')
|
data/lib/habitica_cli/main.rb
CHANGED
@@ -4,10 +4,8 @@ module HabiticaCli
|
|
4
4
|
# out top level tasks into individual files
|
5
5
|
# (thor's DSL makes that a little bit of a chore)
|
6
6
|
class Main < Thor
|
7
|
-
|
8
|
-
class_option :
|
9
|
-
class_option :habit_key, hide: true, aliases: '--habit-key', default: ENV['HABIT_KEY']
|
10
|
-
# rubocop:enable Metrics/LineLength
|
7
|
+
class_option :habit_user, hide: true, aliases: '--habit-user'
|
8
|
+
class_option :habit_key, hide: true, aliases: '--habit-key'
|
11
9
|
|
12
10
|
def initialize(*args)
|
13
11
|
super(*args)
|
data/lib/habitica_cli/version.rb
CHANGED