habitica_cli 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/lib/habitica_cli/api.rb +1 -1
- data/lib/habitica_cli/commands/add.rb +2 -2
- data/lib/habitica_cli/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 92c5d618ede9ee4d3817e32abb337fde64bc9d13
|
4
|
+
data.tar.gz: ab1bdfaa12419136c94f77d68afc2d58077ea0a9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37c71354f0d8e5d4c81429d84eab7db25456150906798cf062ef1439751655980de8002d00a7d4554d237d9b5ee7f5ae7a64bef17570ccaf5a69e9e76f90e590
|
7
|
+
data.tar.gz: ca44d0ea77106904391351f9174f8ffe35c08594993b1d61d7162ddfcba2391e0690770ffeefed0966bf8b15b6411aa8fd6a1874aff54baa6f8ded61ca0009e9
|
data/lib/habitica_cli/api.rb
CHANGED
@@ -24,7 +24,7 @@ Habitica Error (#{path}): #{@response.body['message']}
|
|
24
24
|
class HabiticaResponseMiddleware < Faraday::Middleware
|
25
25
|
def call(request_env)
|
26
26
|
@app.call(request_env).on_complete do |response_env|
|
27
|
-
fail ApiError.new(response_env) unless response_env.success? # rubocop:disable Style/RaiseArgs,
|
27
|
+
fail ApiError.new(response_env) unless response_env.success? # rubocop:disable Style/RaiseArgs, Metrics/LineLength
|
28
28
|
response_env
|
29
29
|
end
|
30
30
|
end
|
@@ -4,10 +4,10 @@ module HabiticaCli
|
|
4
4
|
module Commands
|
5
5
|
def self.add(env, type, text)
|
6
6
|
validate_type(type)
|
7
|
-
response = env.api.post('tasks', type: type, text: text)
|
7
|
+
response = env.api.post('tasks/user', type: type, text: text)
|
8
8
|
|
9
9
|
if response.success?
|
10
|
-
task = cache_tasks(env, [response.body], type).first
|
10
|
+
task = cache_tasks(env, [response.body['data']], type).first
|
11
11
|
puts "Added #{task['text']} [#{task['cid']}]"
|
12
12
|
else
|
13
13
|
puts "Error adding #{text}: #{response.body}"
|
data/lib/habitica_cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: habitica_cli
|
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
|
- Nick Tomlin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -207,4 +207,3 @@ test_files:
|
|
207
207
|
- spec/habitica_cli_spec.rb
|
208
208
|
- spec/spec_helper.rb
|
209
209
|
- spec/support/.gitkeep
|
210
|
-
has_rdoc:
|