argonuts-ruby 0.1.2 → 0.1.3

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: e2eebc8c0a3b2502db0b47ad785762c0d237b753b02b26772a7b2174e67104d9
4
- data.tar.gz: 50d0552f780e45ea9d3d97825c6e76c85040a9b9ade93199a45998610fc23747
3
+ metadata.gz: 8f8e2a68fc344e060726da5927b02d9cf98f524f1445972648893e224aed869f
4
+ data.tar.gz: 7ee74e811fc91535f2526a2e7aed4bea495054ebd3acd909defcd11caeedd8f6
5
5
  SHA512:
6
- metadata.gz: 211adbb3435d2ad43f5ca17596d9adc5f782ef0a7994d3111f4f4e020fead87a78a7bf35cbfc652953e969ec87432533f8a2c6657150180267147f489375e888
7
- data.tar.gz: de68d2b6b95b31e770eaa605f9055f592df03ea1bb2990c78d3df3c81a79504a10cbd3c5fa9cfea69dd255a1e4e74a2cccee96c292e49d0d9364b8ff47284295
6
+ metadata.gz: 21589065fa54df1fabf446050acb0cda07696fc90e3f4f2fce81096f74ae95b0dc67437b799c0344a524b6bd58c5a6ab40d03d5af12352e47d6166238b73c902
7
+ data.tar.gz: 36e10d5e2fc59331b730df88aa874cc61241cb92f8f8627cf11035da9b2cf581f1632c4e6195b5a45d0c3042c6079eb2da0538306223f918d3045382b57b50df
data/README.md CHANGED
@@ -30,14 +30,13 @@ bundle install
30
30
 
31
31
  ## Usage
32
32
 
33
- The library needs you to set your API key which can be found in your [dashboard](https://argonuts.co/dashboard).
33
+ The library needs you to set your API key which can be found in your [profile](https://argonuts.co/profile).
34
34
 
35
35
 
36
36
  ```ruby
37
37
  Argonuts.api_key = 'api-key'
38
38
 
39
39
  Argonuts.notification = {
40
- type: "http",
41
40
  url: "https://yoursite.co/api/argonuts/webhook"
42
41
  }
43
42
 
@@ -49,7 +48,7 @@ Argonuts.storage = {
49
48
  ## Creating a job
50
49
 
51
50
  ```ruby
52
- Argonuts::Job.create(
51
+ job = Argonuts::Job.create({
53
52
  input: { url: "https://yoursite.co/path/file.mp4" },
54
53
  outputs: {
55
54
  "jpg:300x": { path: "/image.jpg" },
@@ -58,27 +57,13 @@ Argonuts::Job.create(
58
57
  hls: { path: "hls/" }
59
58
  }
60
59
  }
61
- )
60
+ })
62
61
  ```
63
62
 
64
63
  ## Getting information about a job
65
64
 
66
65
  ```ruby
67
- Argonuts::Job.retrieve("OolQXaiU86NFki")
68
- ```
69
-
70
- ## Retrieving metadata
71
-
72
- ```ruby
73
- Argonuts::Metadata.retrieve("OolQXaiU86NFki")
74
-
75
- ```
76
-
77
- ## Per-request configuration
78
-
79
- ```ruby
80
- cli = Argonuts::Client.new(api_key: "api-key-prod")
81
- Argonuts::Job.create(job, client: cli)
66
+ Argonuts::Job.retrieve(job.id)
82
67
  ```
83
68
 
84
69
  *Released under the [MIT license](http://www.opensource.org/licenses/mit-license.php).*
@@ -1,3 +1,3 @@
1
1
  module Argonuts
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/argonuts-ruby.rb CHANGED
@@ -6,7 +6,7 @@ require "argonuts/metadata"
6
6
  require "argonuts/version"
7
7
 
8
8
  module Argonuts
9
- ENDPOINT = "https://argonuts.co/api/v1"
9
+ ENDPOINT = "https://argonuts.co/api/v1/"
10
10
 
11
11
  def self.api_key=(key)
12
12
  @api_key = key
@@ -11,7 +11,6 @@ class ArgonutsTest < Test::Unit::TestCase
11
11
  Argonuts.endpoint = ENV["ARGONUTS_ENDPOINT"]
12
12
 
13
13
  Argonuts.notification = {
14
- type: "http",
15
14
  url: ENV["ARGONUTS_WEBHOOK_URL"]
16
15
  }
17
16
 
@@ -52,13 +51,13 @@ class ArgonutsTest < Test::Unit::TestCase
52
51
  assert_equal "job.starting", job.status
53
52
  end
54
53
 
55
- # def test_retrieve_job
56
- # job = Argonuts::Job.retrieve(create_job.id)
57
- # assert job.is_a?(Argonuts::Job)
58
- # assert_not_nil job.id
59
- # assert_equal "job.starting", job.status
60
- # end
61
- #
54
+ def test_retrieve_job
55
+ job = Argonuts::Job.retrieve(create_job.id)
56
+ assert job.is_a?(Argonuts::Job)
57
+ assert_not_nil job.id
58
+ assert_equal "job.starting", job.status
59
+ end
60
+
62
61
  # def test_create_job_error
63
62
  # create_job(input: {url: "notvalidurl"})
64
63
  # rescue => e
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: argonuts-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Argonuts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-03 00:00:00.000000000 Z
11
+ date: 2022-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http