citrus-mail 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +19 -0
- data/Gemfile +7 -7
- data/Gemfile.lock +21 -9
- data/Rakefile +20 -41
- data/citrus-mail.gemspec +14 -51
- data/lib/citrus_mail.rb +4 -8
- data/lib/citrus_mail/version.rb +3 -0
- data/test/test_response.rb +0 -15
- metadata +21 -66
- data/VERSION +0 -1
data/.gitignore
ADDED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,20 +1,32 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
citrus-mail (0.2.0)
|
5
|
+
|
1
6
|
GEM
|
2
|
-
remote:
|
7
|
+
remote: https://rubygems.org/
|
3
8
|
specs:
|
4
9
|
git (1.2.5)
|
5
|
-
jeweler (1.
|
6
|
-
bundler (~> 1.0
|
10
|
+
jeweler (1.8.3)
|
11
|
+
bundler (~> 1.0)
|
7
12
|
git (>= 1.2.5)
|
8
13
|
rake
|
9
|
-
|
10
|
-
|
11
|
-
|
14
|
+
rdoc
|
15
|
+
json (1.7.3)
|
16
|
+
rake (0.9.2.2)
|
17
|
+
rdoc (3.12)
|
18
|
+
json (~> 1.4)
|
19
|
+
shoulda (3.0.1)
|
20
|
+
shoulda-context (~> 1.0.0)
|
21
|
+
shoulda-matchers (~> 1.0.0)
|
22
|
+
shoulda-context (1.0.0)
|
23
|
+
shoulda-matchers (1.0.0)
|
12
24
|
|
13
25
|
PLATFORMS
|
14
26
|
ruby
|
15
27
|
|
16
28
|
DEPENDENCIES
|
17
|
-
bundler
|
18
|
-
|
19
|
-
|
29
|
+
bundler
|
30
|
+
citrus-mail!
|
31
|
+
jeweler
|
20
32
|
shoulda
|
data/Rakefile
CHANGED
@@ -1,29 +1,26 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require '
|
4
|
-
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
5
7
|
begin
|
6
|
-
|
7
|
-
rescue
|
8
|
-
|
9
|
-
|
10
|
-
|
8
|
+
require 'rdoc/task'
|
9
|
+
rescue LoadError
|
10
|
+
require 'rdoc/rdoc'
|
11
|
+
require 'rake/rdoctask'
|
12
|
+
RDoc::Task = Rake::RDocTask
|
11
13
|
end
|
12
|
-
require 'rake'
|
13
14
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
gem.summary = %Q{Nifty Rails gem for nice FreshMail integration}
|
21
|
-
gem.description = %Q{Gem that gives you easy integration with polish mailing service FreshMail (freshmail.pl)}
|
22
|
-
gem.email = "piotr@galdomedia.pl"
|
23
|
-
gem.authors = ["Piotr Boniecki", "GaldoMedia"]
|
24
|
-
# dependencies defined in Gemfile
|
15
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
16
|
+
rdoc.rdoc_dir = 'rdoc'
|
17
|
+
rdoc.title = 'citrus-mail'
|
18
|
+
rdoc.options << '--line-numbers'
|
19
|
+
rdoc.rdoc_files.include('README.rdoc')
|
20
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
25
21
|
end
|
26
|
-
|
22
|
+
|
23
|
+
require "bundler/gem_tasks"
|
27
24
|
|
28
25
|
require 'rake/testtask'
|
29
26
|
Rake::TestTask.new(:test) do |test|
|
@@ -32,22 +29,4 @@ Rake::TestTask.new(:test) do |test|
|
|
32
29
|
test.verbose = true
|
33
30
|
end
|
34
31
|
|
35
|
-
|
36
|
-
Rcov::RcovTask.new do |test|
|
37
|
-
test.libs << 'test'
|
38
|
-
test.pattern = 'test/**/test_*.rb'
|
39
|
-
test.verbose = true
|
40
|
-
test.rcov_opts << '--exclude "gems/*"'
|
41
|
-
end
|
42
|
-
|
43
|
-
task :default => :test
|
44
|
-
|
45
|
-
require 'rake/rdoctask'
|
46
|
-
Rake::RDocTask.new do |rdoc|
|
47
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
48
|
-
|
49
|
-
rdoc.rdoc_dir = 'rdoc'
|
50
|
-
rdoc.title = "citrus-test #{version}"
|
51
|
-
rdoc.rdoc_files.include('README*')
|
52
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
53
|
-
end
|
32
|
+
task :default => [:test]
|
data/citrus-mail.gemspec
CHANGED
@@ -1,64 +1,27 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
1
|
# -*- encoding: utf-8 -*-
|
5
2
|
|
3
|
+
$:.push File.expand_path("../lib", __FILE__)
|
4
|
+
|
5
|
+
require 'citrus_mail/version'
|
6
|
+
|
6
7
|
Gem::Specification.new do |s|
|
7
|
-
s.name =
|
8
|
-
s.version =
|
8
|
+
s.name = "citrus-mail"
|
9
|
+
s.version = CitrusMail::VERSION
|
9
10
|
|
10
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
12
|
s.authors = ["Piotr Boniecki", "GaldoMedia"]
|
12
13
|
s.date = %q{2011-05-17}
|
13
14
|
s.description = %q{Gem that gives you easy integration with polish mailing service FreshMail (freshmail.pl)}
|
15
|
+
s.summary = %q{Nifty Rails gem for nice FreshMail integration}
|
14
16
|
s.email = %q{piotr@galdomedia.pl}
|
15
|
-
s.
|
16
|
-
"LICENSE.txt",
|
17
|
-
"README.rdoc"
|
18
|
-
]
|
19
|
-
s.files = [
|
20
|
-
"Gemfile",
|
21
|
-
"Gemfile.lock",
|
22
|
-
"LICENSE.txt",
|
23
|
-
"README.rdoc",
|
24
|
-
"Rakefile",
|
25
|
-
"VERSION",
|
26
|
-
"citrus-mail.gemspec",
|
27
|
-
"lib/citrus_mail.rb",
|
28
|
-
"lib/citrus_mail/client.rb",
|
29
|
-
"lib/citrus_mail/list.rb",
|
30
|
-
"lib/citrus_mail/response.rb",
|
31
|
-
"test/helper.rb",
|
32
|
-
"test/test_client.rb",
|
33
|
-
"test/test_list.rb",
|
34
|
-
"test/test_response.rb"
|
35
|
-
]
|
36
|
-
s.homepage = %q{https://github.com/galdomedia/citrus-mail}
|
17
|
+
s.homepage = "https://github.com/galdomedia/citrus-mail"
|
37
18
|
s.licenses = ["MIT"]
|
38
|
-
s.require_paths = ["lib"]
|
39
|
-
s.rubygems_version = %q{1.3.6}
|
40
|
-
s.summary = %q{Nifty Rails gem for nice FreshMail integration}
|
41
19
|
|
42
|
-
|
43
|
-
|
44
|
-
|
20
|
+
#s.files = Dir["{lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"]
|
21
|
+
s.files = `git ls-files`.split($\)
|
22
|
+
s.executables = s.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
23
|
+
#s.test_files = Dir["test/**/*"]
|
24
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
45
25
|
|
46
|
-
|
47
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
48
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.6.0"])
|
49
|
-
s.add_development_dependency(%q<rcov>, [">= 0"])
|
50
|
-
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
51
|
-
else
|
52
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
53
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
|
54
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
55
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
56
|
-
end
|
57
|
-
else
|
58
|
-
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
59
|
-
s.add_dependency(%q<jeweler>, ["~> 1.6.0"])
|
60
|
-
s.add_dependency(%q<rcov>, [">= 0"])
|
61
|
-
s.add_dependency(%q<shoulda>, [">= 0"])
|
62
|
-
end
|
26
|
+
s.require_paths = ["lib"]
|
63
27
|
end
|
64
|
-
|
data/lib/citrus_mail.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
module CitrusMail
|
2
4
|
HOST = 'https://app.freshmail.pl'
|
3
5
|
ERRORS = {
|
@@ -55,13 +57,7 @@ module CitrusMail
|
|
55
57
|
end
|
56
58
|
end
|
57
59
|
|
60
|
+
require "citrus_mail/version"
|
58
61
|
require 'citrus_mail/client'
|
59
62
|
require 'citrus_mail/list'
|
60
|
-
require 'citrus_mail/response'
|
61
|
-
|
62
|
-
# jtidhzdxlp
|
63
|
-
|
64
|
-
#require 'citrus_mail'
|
65
|
-
#cm = CitrusMail::Client.new('0633bb5ff7191ff48c4f065aa17f0321')
|
66
|
-
#list = cm.get_list('hi03a662gw')
|
67
|
-
#r = list.add_subscriber('piotr@galdomedia.pl')
|
63
|
+
require 'citrus_mail/response'
|
data/test/test_response.rb
CHANGED
@@ -54,21 +54,6 @@ class TestResponse < Test::Unit::TestCase
|
|
54
54
|
end
|
55
55
|
end
|
56
56
|
|
57
|
-
context "when freshmail response is greater than 100" do
|
58
|
-
setup do
|
59
|
-
@http_response = FakeHttpResponse.new('200', '<root><response>201</response></root>')
|
60
|
-
end
|
61
|
-
should "raise CitrusMail::CitrusMailError" do
|
62
|
-
exception = nil
|
63
|
-
begin
|
64
|
-
CitrusMail::Response.build_from_http_response(@http_response)
|
65
|
-
rescue => e
|
66
|
-
exception = e
|
67
|
-
end
|
68
|
-
assert exception.is_a?(CitrusMail::CitrusMailError)
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
57
|
context "when freshmail response is lower than 100" do
|
73
58
|
setup do
|
74
59
|
@http_response = FakeHttpResponse.new('200', '<root><response>1</response></root>')
|
metadata
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: citrus-mail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
hash: 23
|
5
|
+
prerelease:
|
5
6
|
segments:
|
6
7
|
- 0
|
7
|
-
-
|
8
|
+
- 2
|
8
9
|
- 0
|
9
|
-
version: 0.
|
10
|
+
version: 0.2.0
|
10
11
|
platform: ruby
|
11
12
|
authors:
|
12
13
|
- Piotr Boniecki
|
@@ -15,87 +16,34 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2011-05-17 00:00:00
|
19
|
-
|
20
|
-
|
21
|
-
- !ruby/object:Gem::Dependency
|
22
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - ~>
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
segments:
|
27
|
-
- 1
|
28
|
-
- 0
|
29
|
-
- 0
|
30
|
-
version: 1.0.0
|
31
|
-
prerelease: false
|
32
|
-
requirement: *id001
|
33
|
-
name: bundler
|
34
|
-
type: :development
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
version_requirements: &id002 !ruby/object:Gem::Requirement
|
37
|
-
requirements:
|
38
|
-
- - ~>
|
39
|
-
- !ruby/object:Gem::Version
|
40
|
-
segments:
|
41
|
-
- 1
|
42
|
-
- 6
|
43
|
-
- 0
|
44
|
-
version: 1.6.0
|
45
|
-
prerelease: false
|
46
|
-
requirement: *id002
|
47
|
-
name: jeweler
|
48
|
-
type: :development
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
version_requirements: &id003 !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
segments:
|
55
|
-
- 0
|
56
|
-
version: "0"
|
57
|
-
prerelease: false
|
58
|
-
requirement: *id003
|
59
|
-
name: rcov
|
60
|
-
type: :development
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
version_requirements: &id004 !ruby/object:Gem::Requirement
|
63
|
-
requirements:
|
64
|
-
- - ">="
|
65
|
-
- !ruby/object:Gem::Version
|
66
|
-
segments:
|
67
|
-
- 0
|
68
|
-
version: "0"
|
69
|
-
prerelease: false
|
70
|
-
requirement: *id004
|
71
|
-
name: shoulda
|
72
|
-
type: :development
|
19
|
+
date: 2011-05-17 00:00:00 Z
|
20
|
+
dependencies: []
|
21
|
+
|
73
22
|
description: Gem that gives you easy integration with polish mailing service FreshMail (freshmail.pl)
|
74
23
|
email: piotr@galdomedia.pl
|
75
24
|
executables: []
|
76
25
|
|
77
26
|
extensions: []
|
78
27
|
|
79
|
-
extra_rdoc_files:
|
80
|
-
|
81
|
-
- README.rdoc
|
28
|
+
extra_rdoc_files: []
|
29
|
+
|
82
30
|
files:
|
31
|
+
- .gitignore
|
83
32
|
- Gemfile
|
84
33
|
- Gemfile.lock
|
85
34
|
- LICENSE.txt
|
86
35
|
- README.rdoc
|
87
36
|
- Rakefile
|
88
|
-
- VERSION
|
89
37
|
- citrus-mail.gemspec
|
90
38
|
- lib/citrus_mail.rb
|
91
39
|
- lib/citrus_mail/client.rb
|
92
40
|
- lib/citrus_mail/list.rb
|
93
41
|
- lib/citrus_mail/response.rb
|
42
|
+
- lib/citrus_mail/version.rb
|
94
43
|
- test/helper.rb
|
95
44
|
- test/test_client.rb
|
96
45
|
- test/test_list.rb
|
97
46
|
- test/test_response.rb
|
98
|
-
has_rdoc: true
|
99
47
|
homepage: https://github.com/galdomedia/citrus-mail
|
100
48
|
licenses:
|
101
49
|
- MIT
|
@@ -105,25 +53,32 @@ rdoc_options: []
|
|
105
53
|
require_paths:
|
106
54
|
- lib
|
107
55
|
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
+
none: false
|
108
57
|
requirements:
|
109
58
|
- - ">="
|
110
59
|
- !ruby/object:Gem::Version
|
60
|
+
hash: 3
|
111
61
|
segments:
|
112
62
|
- 0
|
113
63
|
version: "0"
|
114
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
115
66
|
requirements:
|
116
67
|
- - ">="
|
117
68
|
- !ruby/object:Gem::Version
|
69
|
+
hash: 3
|
118
70
|
segments:
|
119
71
|
- 0
|
120
72
|
version: "0"
|
121
73
|
requirements: []
|
122
74
|
|
123
75
|
rubyforge_project:
|
124
|
-
rubygems_version: 1.
|
76
|
+
rubygems_version: 1.8.24
|
125
77
|
signing_key:
|
126
78
|
specification_version: 3
|
127
79
|
summary: Nifty Rails gem for nice FreshMail integration
|
128
|
-
test_files:
|
129
|
-
|
80
|
+
test_files:
|
81
|
+
- test/helper.rb
|
82
|
+
- test/test_client.rb
|
83
|
+
- test/test_list.rb
|
84
|
+
- test/test_response.rb
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.1.0
|