replicate-ruby 0.1.3 → 0.1.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b82680774a3b7399bb70fd85693674d1ff8b3cb08345ef015a402d9066a9cffa
4
- data.tar.gz: 7cdb52a0920a8e8962f0f91523845cd706d4296f247e9a70747ea3d386897c48
3
+ metadata.gz: '02895b25fb1bd80157fc270391b89dc3b63c17d16d8623f0ed383fc4cdb2a53d'
4
+ data.tar.gz: eebeaa717885a7fba14adbcc13ba917d8448ce0e5defaaead60fd78ac647cd2f
5
5
  SHA512:
6
- metadata.gz: 92cefd3d237a73d1ffae16330ec9e252acbfc922cdb8755cd6c11f264a3ab40765d5a84c3fb73ffa29d50ee58285f8ea20fd5232de9bd0c785b2f9f2f29b1489
7
- data.tar.gz: 10b0f4536ef15bc4e5294d833c6159087d5e8f2141ba5976b8d14b275417b710e1c07ee876f160be4ad73c30b565d4bd46f05feaa2b8f4314660c9446e122d45
6
+ metadata.gz: e9766d1550ada548a759e289a3ee3ae359a68657f6c0b4c9435b166b4cd6ae087d0d98707bf346854900544310717640d3659827f568f08a84f131feddbc11f3
7
+ data.tar.gz: 2c68c4d700d67b22345dae0035cb7cf21830638881966eee7ba8150bf474c6b909707215538a86a8bafa7fdf0c411b307bfd346289267b001f0b34d3d7047cd2
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- replicate-ruby (0.1.2)
4
+ replicate-ruby (0.1.4)
5
5
  addressable
6
6
  faraday (>= 2.0)
7
7
  faraday-retry
@@ -15,10 +15,10 @@ GEM
15
15
  coderay (1.1.3)
16
16
  crack (0.4.5)
17
17
  rexml
18
- faraday (2.6.0)
18
+ faraday (2.7.1)
19
19
  faraday-net_http (>= 2.0, < 3.1)
20
20
  ruby2_keywords (>= 0.0.4)
21
- faraday-net_http (3.0.1)
21
+ faraday-net_http (3.0.2)
22
22
  faraday-retry (2.0.0)
23
23
  faraday (~> 2.0)
24
24
  hashdiff (1.0.1)
@@ -68,4 +68,4 @@ DEPENDENCIES
68
68
  webmock
69
69
 
70
70
  BUNDLED WITH
71
- 2.3.7
71
+ 2.3.26
@@ -4,11 +4,20 @@ module Replicate
4
4
  module Record
5
5
  class Prediction < Base
6
6
  def refetch
7
- self.assign_attributes = client.retrieve_prediction(id)
7
+ @data = client.retrieve_prediction(id).data
8
8
  end
9
9
 
10
10
  def cancel
11
- self.assign_attributes = client.cancel_prediction(id)
11
+ @data = client.cancel_prediction(id).data
12
+ end
13
+
14
+ def finished?
15
+ case status
16
+ when "succeeded", "failed", "canceled"
17
+ true
18
+ else
19
+ false
20
+ end
12
21
  end
13
22
  end
14
23
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Replicate
4
- VERSION = "0.1.3"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: replicate-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dreaming Tulpa
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-12-07 00:00:00.000000000 Z
11
+ date: 2022-12-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday