citrus-mail 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,6 @@
1
1
  require 'net/http'
2
2
  require 'net/https'
3
+ require 'cgi'
3
4
 
4
5
  module CitrusMail
5
6
  class Client
@@ -68,9 +69,8 @@ module CitrusMail
68
69
  end
69
70
  end
70
71
 
71
- #copied from ''net/http'
72
72
  def urlencode(str)
73
- str.gsub(/[^a-zA-Z0-9_\.\-]/n) { |s| sprintf('%%%02x', s[0]) }
73
+ CGI.escape(str).gsub('+', '%20')
74
74
  end
75
75
 
76
76
  end
@@ -14,7 +14,7 @@ module CitrusMail
14
14
  def add_subscriber(email, name=nil, custom_fields={}, options={:confirm_email => true})
15
15
  params = {:freshmail_email => email}
16
16
  params[:freshmail_name] = name if name
17
- params[:freshmail_custom_field] = custom_fields if custom_fields.empty?
17
+ params[:freshmail_custom_field] = custom_fields unless custom_fields.empty?
18
18
  unless options[:confirm_email].nil?
19
19
  params[:confirm_email] = options[:confirm_email]
20
20
  end
@@ -1,3 +1,3 @@
1
1
  module CitrusMail
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  end
metadata CHANGED
@@ -1,33 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: citrus-mail
3
- version: !ruby/object:Gem::Version
4
- hash: 23
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.1
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 2
9
- - 0
10
- version: 0.2.0
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Piotr Boniecki
14
9
  - GaldoMedia
15
10
  autorequire:
16
11
  bindir: bin
17
12
  cert_chain: []
18
-
19
- date: 2011-05-17 00:00:00 Z
13
+ date: 2011-05-17 00:00:00.000000000 Z
20
14
  dependencies: []
21
-
22
- description: Gem that gives you easy integration with polish mailing service FreshMail (freshmail.pl)
15
+ description: Gem that gives you easy integration with polish mailing service FreshMail
16
+ (freshmail.pl)
23
17
  email: piotr@galdomedia.pl
24
18
  executables: []
25
-
26
19
  extensions: []
27
-
28
20
  extra_rdoc_files: []
29
-
30
- files:
21
+ files:
31
22
  - .gitignore
32
23
  - Gemfile
33
24
  - Gemfile.lock
@@ -45,39 +36,34 @@ files:
45
36
  - test/test_list.rb
46
37
  - test/test_response.rb
47
38
  homepage: https://github.com/galdomedia/citrus-mail
48
- licenses:
39
+ licenses:
49
40
  - MIT
50
41
  post_install_message:
51
42
  rdoc_options: []
52
-
53
- require_paths:
43
+ require_paths:
54
44
  - lib
55
- required_ruby_version: !ruby/object:Gem::Requirement
45
+ required_ruby_version: !ruby/object:Gem::Requirement
56
46
  none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- hash: 3
61
- segments:
47
+ requirements:
48
+ - - ! '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ segments:
62
52
  - 0
63
- version: "0"
64
- required_rubygems_version: !ruby/object:Gem::Requirement
53
+ hash: -377581741
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
55
  none: false
66
- requirements:
67
- - - ">="
68
- - !ruby/object:Gem::Version
69
- hash: 3
70
- segments:
71
- - 0
72
- version: "0"
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
73
60
  requirements: []
74
-
75
61
  rubyforge_project:
76
62
  rubygems_version: 1.8.24
77
63
  signing_key:
78
64
  specification_version: 3
79
65
  summary: Nifty Rails gem for nice FreshMail integration
80
- test_files:
66
+ test_files:
81
67
  - test/helper.rb
82
68
  - test/test_client.rb
83
69
  - test/test_list.rb