live_paper 0.0.8 → 0.0.9

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.
@@ -0,0 +1,16 @@
1
+ require 'spec_helper'
2
+
3
+ describe LivePaper::LivePaperSession do
4
+
5
+ describe '#shorten' do
6
+ pending
7
+ end
8
+
9
+ describe '#qr_bytes' do
10
+ pending
11
+ end
12
+
13
+ describe '#wm_bytes' do
14
+ pending
15
+ end
16
+ end
@@ -0,0 +1,6 @@
1
+ require 'live_paper' # and any other gems you need
2
+
3
+ # include helpers
4
+ Dir[File.expand_path(File.join(File.dirname(__FILE__), 'spec_helpers', '**', '*.rb'))].each { |f| require f }
5
+
6
+ require 'webmock/rspec'
@@ -0,0 +1,75 @@
1
+ def lpp_auth_response_json
2
+ <<-RESPONSE
3
+ {
4
+ "serviceName":"auth",
5
+ "apiVersion":"1.0",
6
+ "accessToken":"SECRETTOKEN",
7
+ "scope":"default"
8
+ }
9
+ RESPONSE
10
+ end
11
+
12
+ def lpp_payoff_response_json
13
+ <<-RESPONSE
14
+ {
15
+ "payoff": {
16
+ "id": "payoff_id",
17
+ "name": "name",
18
+ "URL": "url"
19
+ }
20
+ }
21
+ RESPONSE
22
+ end
23
+
24
+ def lpp_richpayoff_response_json
25
+ <<-RESPONSE
26
+ {
27
+ "payoff": {
28
+ "id": "payoff_id",
29
+ "name": "name",
30
+ "richPayoff" : {
31
+ "version": 1,
32
+ "private": {
33
+ "content-type": "data_type",
34
+ "data": "#{Base64.encode64('{ "field": 1 }').gsub(/\n/,'')}"
35
+ },
36
+ "public": {
37
+ "url": "url"
38
+ }
39
+ }
40
+ }
41
+ }
42
+ RESPONSE
43
+ end
44
+
45
+ def lpp_trigger_response_json
46
+ <<-RESPONSE
47
+ {
48
+ "trigger": {
49
+ "id": "trigger_id",
50
+ "name": "name",
51
+ "watermark": "watermark",
52
+ "link": [{"rel":"image", "href": "https://fileapi/id/image"}],
53
+ "subscription": "subscription"
54
+ }
55
+ }
56
+ RESPONSE
57
+ end
58
+
59
+ def lpp_link_response_json
60
+ <<-RESPONSE
61
+ {
62
+ "link": {
63
+ "id": "link_id",
64
+ "name": "name",
65
+ "triggerId": "trigger_id",
66
+ "payoffId": "payoff_id",
67
+ "link": [{"rel":"analytics", "href": "analytics"}]
68
+ }
69
+ }
70
+ RESPONSE
71
+ end
72
+
73
+ def lpp_watermark_response
74
+ 'watermark_data'
75
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: live_paper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Whitmarsh
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-08 00:00:00.000000000 Z
12
+ date: 2014-10-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rest-client
@@ -53,6 +53,34 @@ dependencies:
53
53
  - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rspec
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ - !ruby/object:Gem::Dependency
71
+ name: webmock
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - ">="
82
+ - !ruby/object:Gem::Version
83
+ version: '0'
56
84
  description: Ruby interface to use the Live Paper service by HP for creating watermarked
57
85
  images, mobile-friendly shortened URLs, and QR codes.
58
86
  email:
@@ -66,8 +94,24 @@ files:
66
94
  - README.md
67
95
  - Rakefile
68
96
  - lib/live_paper.rb
97
+ - lib/live_paper/base_object.rb
98
+ - lib/live_paper/http_client.rb
99
+ - lib/live_paper/image.rb
100
+ - lib/live_paper/link.rb
101
+ - lib/live_paper/payoff.rb
102
+ - lib/live_paper/qr_trigger.rb
103
+ - lib/live_paper/short_trigger.rb
69
104
  - lib/live_paper/version.rb
105
+ - lib/live_paper/wm_trigger.rb
70
106
  - live_paper.gemspec
107
+ - spec/live_paper/base_object_spec.rb
108
+ - spec/live_paper/http_client_spec.rb
109
+ - spec/live_paper/link_spec.rb
110
+ - spec/live_paper/payoff_spec.rb
111
+ - spec/live_paper/trigger_spec.rb
112
+ - spec/live_paper_session_spec.rb
113
+ - spec/spec_helper.rb
114
+ - spec/spec_helpers/lpp_client.rb
71
115
  homepage: https://github.com/IPGPTP/live_paper_rubygem
72
116
  licenses:
73
117
  - MIT
@@ -92,4 +136,12 @@ rubygems_version: 2.2.2
92
136
  signing_key:
93
137
  specification_version: 4
94
138
  summary: Ruby interface to the Live Paper service by HP.
95
- test_files: []
139
+ test_files:
140
+ - spec/live_paper/base_object_spec.rb
141
+ - spec/live_paper/http_client_spec.rb
142
+ - spec/live_paper/link_spec.rb
143
+ - spec/live_paper/payoff_spec.rb
144
+ - spec/live_paper/trigger_spec.rb
145
+ - spec/live_paper_session_spec.rb
146
+ - spec/spec_helper.rb
147
+ - spec/spec_helpers/lpp_client.rb