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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 75e78755c72d1f2d71fb5182d80d5494be646b21
4
- data.tar.gz: 6bad26ae765114f02b088120c237b815a6e3c1dc
3
+ metadata.gz: 92c5d618ede9ee4d3817e32abb337fde64bc9d13
4
+ data.tar.gz: ab1bdfaa12419136c94f77d68afc2d58077ea0a9
5
5
  SHA512:
6
- metadata.gz: c9ad679bdbb9c424940928f5029540cdb36e3ce76cca681ff2d4cdcdfb349cc2f5e14d03de4b119b351832c04da3c48c00d10ddac0569fdccc73a424d8b5e37c
7
- data.tar.gz: d390df0596dedb534f7629fe58265a8ea07ea8abb90645fe8979b015fbc8a289d722086a186d755a5740d409a76796c02c50577c678ecc1b5b53b91d468c0394
6
+ metadata.gz: 37c71354f0d8e5d4c81429d84eab7db25456150906798cf062ef1439751655980de8002d00a7d4554d237d9b5ee7f5ae7a64bef17570ccaf5a69e9e76f90e590
7
+ data.tar.gz: ca44d0ea77106904391351f9174f8ffe35c08594993b1d61d7162ddfcba2391e0690770ffeefed0966bf8b15b6411aa8fd6a1874aff54baa6f8ded61ca0009e9
@@ -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, Style/LineLength
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}"
@@ -1,3 +1,3 @@
1
1
  module HabiticaCli
2
- VERSION = '0.1.0'.freeze
2
+ VERSION = '0.1.1'.freeze
3
3
  end
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.0
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-06-10 00:00:00.000000000 Z
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: