mandao 0.0.2pre2 → 0.0.3pre
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/mandao/configuration.rb +4 -0
- data/lib/mandao/resources/address_list.rb +4 -0
- data/lib/mandao/resources/base.rb +4 -1
- data/lib/mandao/resources/document.rb +2 -0
- data/lib/mandao/version.rb +1 -1
- data/lib/mandao.rb +4 -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: eba788f8339ddfe8d67f17219206da4ae5781227
|
4
|
+
data.tar.gz: 7c7bbf3cea729c3183070b847d007c59f9497aff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0b97f6c26ddde7bac9da50c03239dec5618b26e2790778e8cb35db898a5fb934e131b2c91420394fa5576405d35c43747b79a2fb07fbab20dbcc24853738bd36
|
7
|
+
data.tar.gz: cf852ef82e11ca2a3accba36c179aa5ff4219c59a5dc5f04fce8e7a76bfe63ad5f576b4e08b865ab65abf205b6272f646349fe0312627462e67486364ee8efcc
|
data/lib/mandao/configuration.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'active_resource'
|
2
|
+
require File.expand_path('../resources/base', __FILE__)
|
1
3
|
|
2
4
|
module Mandao
|
3
5
|
|
@@ -26,10 +28,12 @@ module Mandao
|
|
26
28
|
REQUIRED_OPTIONS = [:username, :password]
|
27
29
|
DEFAULT_PROTOCOL = "https".freeze
|
28
30
|
DEFAULT_ENDPOINT = 'stage.rest.click2mail.com/v1'.freeze # TODO [ add production endpoint by default ]
|
31
|
+
DEFAULT_FORMAT = ActiveResource::Formats::XmlFormat
|
29
32
|
|
30
33
|
def initialize
|
31
34
|
@endpoint = DEFAULT_ENDPOINT
|
32
35
|
@protocol = DEFAULT_PROTOCOL
|
36
|
+
@format = DEFAULT_FORMAT
|
33
37
|
end
|
34
38
|
|
35
39
|
def api_endpoint
|
@@ -1,3 +1,6 @@
|
|
1
|
+
require 'active_resource'
|
2
|
+
require File.expand_path('../../configuration', __FILE__)
|
3
|
+
|
1
4
|
module Mandao
|
2
5
|
class Base < ActiveResource::Base
|
3
6
|
self.include_format_in_path = false
|
@@ -6,7 +9,7 @@ module Mandao
|
|
6
9
|
|
7
10
|
def activate
|
8
11
|
self.site = Mandao.config.api_endpoint
|
9
|
-
self.format =
|
12
|
+
self.format = Mandao.config.format
|
10
13
|
end
|
11
14
|
|
12
15
|
def parse_response(xml)
|
data/lib/mandao/version.rb
CHANGED
data/lib/mandao.rb
CHANGED
@@ -1,4 +1,7 @@
|
|
1
1
|
require 'mandao/version'
|
2
|
-
Dir.glob(File.expand_path('../resources/*', __FILE__)).each { |file| require(file) }
|
3
2
|
require 'mandao/xml_format'
|
3
|
+
require 'mandao/resources/base'
|
4
|
+
require 'mandao/resources/address'
|
5
|
+
require 'mandao/resources/address_list'
|
6
|
+
require 'mandao/resources/document'
|
4
7
|
require 'mandao/configuration'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mandao
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marlon Mantilla
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeresource
|