ruby-montage 0.4.9 → 0.4.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/montage/client.rb +6 -2
- data/lib/montage/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: be9281c779906527968d19f2fe3521d05c68074f
|
4
|
+
data.tar.gz: a923f4b02050d263425ab9b6b01500d47268d3d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8a6333591feda7146fec9ad58524ad9151e166412926361972eaed3cbe4f4a981ab370b4567435c7f077f3a4c9b0a459dd0eccf1df64bb7ea8d028108317b12
|
7
|
+
data.tar.gz: 672a0e8c1b5025273163bf16959234847a06b8048dc0acd3161fdf2f907a743ac8e2d33fd0aa540e6e553e5ce960be4335ee077756a2f80e3af64a8ece655241
|
data/lib/montage/client.rb
CHANGED
@@ -13,7 +13,7 @@ module Montage
|
|
13
13
|
include Schemas
|
14
14
|
include Documents
|
15
15
|
|
16
|
-
attr_accessor :token, :username, :password, :domain, :api_version
|
16
|
+
attr_accessor :token, :username, :password, :domain, :api_version, :url_prefix
|
17
17
|
|
18
18
|
def initialize
|
19
19
|
@api_version = 1
|
@@ -21,6 +21,10 @@ module Montage
|
|
21
21
|
raise MissingAttributeError, "You must declare the domain attribute" unless @domain
|
22
22
|
end
|
23
23
|
|
24
|
+
def default_url_prefix
|
25
|
+
"http://#{domain}.dev.montagehot.club"
|
26
|
+
end
|
27
|
+
|
24
28
|
def content_type
|
25
29
|
"application/json"
|
26
30
|
end
|
@@ -97,7 +101,7 @@ module Montage
|
|
97
101
|
def connection
|
98
102
|
@connect ||= Faraday.new do |f|
|
99
103
|
f.adapter :net_http
|
100
|
-
f.url_prefix = "
|
104
|
+
f.url_prefix = "#{url_prefix || default_url_prefix}/api/v#{api_version}/"
|
101
105
|
f.headers["User-Agent"] = "Montage Ruby v#{Montage::VERSION}"
|
102
106
|
f.headers["Content-Type"] = content_type
|
103
107
|
f.headers["Accept"] = "*/*"
|
data/lib/montage/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ruby-montage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dphaener
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|