visdiff 0.0.3 → 0.0.4

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
  SHA1:
3
- metadata.gz: 5376198f8d0264ccc14036bde93a5d30c911b159
4
- data.tar.gz: 856a61c4f3c6162abdae4b606be8628747fc31b4
3
+ metadata.gz: 540dad59be340b8e8df8324fc40071d0ab4afcbe
4
+ data.tar.gz: 59dc48f248de6e6825f54aa8c87b0d050b59e7ff
5
5
  SHA512:
6
- metadata.gz: 308413d3e3ae07dea394001bf0eb60c2d91eb9b6726da21ac029ed9a26e179fa6fce4409128740b66745fd3bccf3d046b918a63da66005e9d16781d45e7c6819
7
- data.tar.gz: 008c91a01ba17e12b1538f694740e83cd6d26c9f6dee4d769b756890c9ec787a456c3d84cd8a68098da3ff61b969aed97712cb0045e00f7f3511b4df6c54bd06
6
+ metadata.gz: 12fa33651866b247ee0a0ccef3f603259411b76ade0e781d82cf6fe48aa40ac449fe19a42fe7c7b840daeced86647fe69912e67529f0380afb192eacde4e351f
7
+ data.tar.gz: 539ea37b5c15ac74fe50cc001e2ad251891d31097270aefc7c2a19b6903bdd165acff7c21ef3be04de80b4cd7af55f8fa926be534fb906698be896dc4bfcf3be
@@ -2,7 +2,7 @@ require 'faraday'
2
2
 
3
3
  module Visdiff
4
4
  class Config
5
- attr_accessor :base_url, :api_key
5
+ attr_accessor :base_url, :api_key, :debug
6
6
 
7
7
  def initialize
8
8
  end
@@ -12,7 +12,7 @@ module Visdiff
12
12
  @connection ||= Faraday.new(:url => base_url) do |faraday|
13
13
  faraday.request :multipart
14
14
  faraday.request :url_encoded
15
- faraday.response :logger
15
+ faraday.response :logger if debug
16
16
  faraday.adapter Faraday.default_adapter
17
17
  end
18
18
  end
@@ -1,12 +1,13 @@
1
1
  module Visdiff
2
2
  class Revision
3
- attr_reader :identifier, :images, :description
3
+ attr_reader :identifier, :images, :description, :url, :id
4
4
  attr_accessor :client
5
5
 
6
6
  def initialize identifier, images=[], description=nil
7
7
  @identifier = identifier
8
8
  @images = images
9
9
  @description = description
10
+ @url = @id = nil
10
11
  end
11
12
 
12
13
  def add_image identifier, filename
@@ -17,6 +18,8 @@ module Visdiff
17
18
 
18
19
  def submit!
19
20
  response = client.submit_revision(self)
21
+ @id = response['id']
22
+ @url = response['url']
20
23
 
21
24
  missing_images = []
22
25
  response['images'].each do |rimg|
@@ -28,6 +31,8 @@ module Visdiff
28
31
  next unless missing_images.include?(image.signature)
29
32
  client.submit_image(image)
30
33
  end
34
+
35
+ puts @url
31
36
  end
32
37
 
33
38
  def attributes
@@ -1,3 +1,3 @@
1
1
  module Visdiff
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: visdiff
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Hawthorn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-17 00:00:00.000000000 Z
11
+ date: 2015-02-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday