litmus 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +5 -22
- data/VERSION +1 -1
- data/lib/litmus/email_test.rb +12 -2
- data/litmus.gemspec +2 -2
- metadata +2 -2
data/Rakefile
CHANGED
@@ -19,27 +19,10 @@ rescue LoadError
|
|
19
19
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
20
20
|
end
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
#
|
28
|
-
# RSpec::Core::RakeTask.new(:rcov) do |spec|
|
29
|
-
# spec.pattern = 'spec/**/*_spec.rb'
|
30
|
-
# spec.rcov = true
|
31
|
-
# end
|
32
|
-
|
33
|
-
task :spec => :check_dependencies
|
22
|
+
begin
|
23
|
+
require 'rspec/core/rake_task'
|
24
|
+
RSpec::Core::RakeTask.new(:spec)
|
25
|
+
rescue LoadError
|
26
|
+
end
|
34
27
|
|
35
28
|
task :default => :spec
|
36
|
-
#
|
37
|
-
# require 'rake/rdoctask'
|
38
|
-
# Rake::RDocTask.new do |rdoc|
|
39
|
-
# version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
40
|
-
#
|
41
|
-
# rdoc.rdoc_dir = 'rdoc'
|
42
|
-
# rdoc.title = "litmus #{version}"
|
43
|
-
# rdoc.rdoc_files.include('README*')
|
44
|
-
# rdoc.rdoc_files.include('lib/**/*.rb')
|
45
|
-
# end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.5.0
|
data/lib/litmus/email_test.rb
CHANGED
@@ -4,11 +4,21 @@ module Litmus
|
|
4
4
|
super.reject{|test| test["service"] != 'email'}
|
5
5
|
end
|
6
6
|
|
7
|
-
def self.create(email={}, name = nil, sandbox = false)
|
7
|
+
def self.create(email={}, name = nil, sandbox = false, application_codes=[])
|
8
8
|
builder = Builder::XmlMarkup.new
|
9
9
|
builder.instruct! :xml, :version=>"1.0"
|
10
10
|
builder.test_set do |test_set|
|
11
|
-
|
11
|
+
if application_codes
|
12
|
+
application_codes.each do |application_code|
|
13
|
+
test_set.tag!("applications", {type: "array"}) do |applications|
|
14
|
+
applications.application do |application|
|
15
|
+
application.code application_code
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
test_set.use_defaults application_codes.empty?
|
12
22
|
test_set.save_defaults false
|
13
23
|
test_set.name name if name
|
14
24
|
test_set.sandbox true if sandbox
|
data/litmus.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "litmus"
|
8
|
-
s.version = "0.
|
8
|
+
s.version = "0.5.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Matt Fawcett"]
|
12
|
-
s.date = "
|
12
|
+
s.date = "2015-07-31"
|
13
13
|
s.description = "A wrapper to the Litmus customer API"
|
14
14
|
s.email = "mail@matthewfawcett.co.uk"
|
15
15
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: litmus
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-07-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: httparty
|