maileon 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/README.md +2 -2
- data/lib/maileon/api.rb +6 -0
- data/lib/maileon/version.rb +1 -1
- data/maileon.gemspec +2 -1
- data/spec/lib/api_spec.rb +6 -0
- data/spec/spec_helper.rb +5 -0
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b84994c81ac1b29fa7664b9cfb9c320cbd4ae9da
|
4
|
+
data.tar.gz: 8bc2d6b6d1815bcc3c3f0ec2031f8c4469aefc6b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32dd4fa2d730b7df55beea43b406b6b2c8700bfb5e0ddf5695c28abe2637978e8720f1b7ee427971e8bad19fadb65ac9de7bb924237b627e4f5723920f82972c
|
7
|
+
data.tar.gz: fc454a2cc5e7d2292a857270e9d7625074755ac3703874fca8180a6b5798cf358201425002e027c3285ae9f921571ccea7db18653f415b2415de3d5134a2d857
|
data/.coveralls.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
service_name: travis-ci
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Maileon [![Build Status](http://travis-ci.org/interactive-pioneers/maileon.svg?branch=master)](https://travis-ci.org/interactive-pioneers/maileon) [![Gem Version](https://badge.fury.io/rb/maileon.svg)](http://badge.fury.io/rb/maileon)
|
1
|
+
# Maileon [![Build Status](http://travis-ci.org/interactive-pioneers/maileon.svg?branch=master)](https://travis-ci.org/interactive-pioneers/maileon) [![Gem Version](https://badge.fury.io/rb/maileon.svg)](http://badge.fury.io/rb/maileon) [![Coverage Status](https://coveralls.io/repos/interactive-pioneers/maileon/badge.svg)](https://coveralls.io/r/interactive-pioneers/maileon)
|
2
2
|
|
3
3
|
Ruby wrapper for Maileon email marketing software API.
|
4
4
|
|
@@ -79,7 +79,7 @@ maileon.delete_contact(attribs)
|
|
79
79
|
|
80
80
|
1. Fork it ( https://github.com/[my-github-username]/maileon/fork )
|
81
81
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
82
|
-
3. Develop your feature by concepts of
|
82
|
+
3. Develop your feature by concepts of [TDD](http://en.wikipedia.org/wiki/Test-driven_development). Run `guard` in parallel to automatically run your tests
|
83
83
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
84
84
|
4. Push to the branch (`git push origin my-new-feature`)
|
85
85
|
5. Create a new Pull Request
|
data/lib/maileon/api.rb
CHANGED
@@ -29,9 +29,15 @@ module Maileon
|
|
29
29
|
email = URI::escape(params[:email])
|
30
30
|
permission = params[:permission] ||= 1
|
31
31
|
sync_mode = params[:sync_mode] ||= 2
|
32
|
+
src = params[:src]
|
33
|
+
subscription_page = params[:subscription_page]
|
32
34
|
doi = params[:doi] ||= true
|
33
35
|
doiplus = params[:doiplus] ||= true
|
36
|
+
doimailing = params[:doimailing]
|
34
37
|
url = "contacts/#{email}?permission=#{permission}&sync_mode=#{sync_mode}&doi=#{doi}&doiplus=#{doiplus}"
|
38
|
+
url << "&doimailing=#{doimailing}" unless doimailing.nil?
|
39
|
+
url << "&src=#{src}" unless src.nil?
|
40
|
+
url << "&subscription_page=#{subscription_page}" unless subscription_page.nil?
|
35
41
|
@session.post(:path => "#{@path}#{url}", :headers => get_headers, :body => body.to_json)
|
36
42
|
end
|
37
43
|
|
data/lib/maileon/version.rb
CHANGED
data/maileon.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
16
16
|
|
17
17
|
spec.files = `git ls-files -z`.split("\x0")
|
18
18
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
19
|
-
spec.test_files = spec.files.grep(%r{^(
|
19
|
+
spec.test_files = spec.files.grep(%r{^(spec)/})
|
20
20
|
spec.require_paths = ["lib"]
|
21
21
|
|
22
22
|
spec.add_runtime_dependency "excon", "~> 0.44.4"
|
@@ -32,4 +32,5 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_development_dependency "pry-nav", "~> 0.2"
|
33
33
|
spec.add_development_dependency "webmock", "~> 1.20"
|
34
34
|
spec.add_development_dependency "sinatra", "~> 1.4"
|
35
|
+
spec.add_development_dependency "coveralls", "~> 0.7.11"
|
35
36
|
end
|
data/spec/lib/api_spec.rb
CHANGED
@@ -29,6 +29,12 @@ describe Maileon::API do
|
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
|
+
describe Maileon::API.new('asdfasdfasdfa', true) do
|
33
|
+
context 'with debug flag' do
|
34
|
+
it { is_expected.to have_attributes(:debug => true) }
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
32
38
|
describe '.ping' do
|
33
39
|
context 'with invalid API key' do
|
34
40
|
it {
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: maileon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ain Tohvri
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -192,6 +192,20 @@ dependencies:
|
|
192
192
|
- - "~>"
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '1.4'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: coveralls
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - "~>"
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: 0.7.11
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - "~>"
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: 0.7.11
|
195
209
|
description: Ruby wrapper for Maileon email marketing software API.
|
196
210
|
email:
|
197
211
|
- at@interactive-pioneers.de
|
@@ -199,6 +213,7 @@ executables: []
|
|
199
213
|
extensions: []
|
200
214
|
extra_rdoc_files: []
|
201
215
|
files:
|
216
|
+
- ".coveralls.yml"
|
202
217
|
- ".gitignore"
|
203
218
|
- ".rspec"
|
204
219
|
- ".travis.yml"
|