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 +4 -4
- data/lib/visdiff/config.rb +2 -2
- data/lib/visdiff/revision.rb +6 -1
- data/lib/visdiff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 540dad59be340b8e8df8324fc40071d0ab4afcbe
|
|
4
|
+
data.tar.gz: 59dc48f248de6e6825f54aa8c87b0d050b59e7ff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 12fa33651866b247ee0a0ccef3f603259411b76ade0e781d82cf6fe48aa40ac449fe19a42fe7c7b840daeced86647fe69912e67529f0380afb192eacde4e351f
|
|
7
|
+
data.tar.gz: 539ea37b5c15ac74fe50cc001e2ad251891d31097270aefc7c2a19b6903bdd165acff7c21ef3be04de80b4cd7af55f8fa926be534fb906698be896dc4bfcf3be
|
data/lib/visdiff/config.rb
CHANGED
|
@@ -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
|
data/lib/visdiff/revision.rb
CHANGED
|
@@ -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
|
data/lib/visdiff/version.rb
CHANGED
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.
|
|
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-
|
|
11
|
+
date: 2015-02-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|