mailing_client 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,8 @@
1
+ module Mailing
2
+ # Wraps around Hydra for readibility
3
+ module ParallelRequests
4
+ def self.run
5
+ HYDRA.run
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,16 @@
1
+ require 'mailing_client/service_configuration'
2
+ module Mailing
3
+ class ScheduledMail < LogicalModel
4
+ include MailingClient::ServiceConfiguration
5
+
6
+ set_resource_path '/scheduled_mails'
7
+
8
+ attribute :recipient_email # The person who is receiving the email
9
+ attribute :send_at # When the email has been sent or will be sent
10
+ attribute :delivered_at # When the email has been delivered
11
+ attribute :contact_id # The padma-contact id
12
+ attribute :username # The username who sends the mail
13
+ attribute :template_name # The template name
14
+
15
+ end
16
+ end
@@ -0,0 +1,11 @@
1
+ Mailing::HYDRA = Typhoeus::Hydra.new
2
+ Mailing::HOST = case Rails.env
3
+ when "production"
4
+ "padma-mailing.herokuapp.com"
5
+ when "development"
6
+ "localhost:3004"
7
+ when "staging"
8
+ "padma-mailing-staging.herokuapp.com"
9
+ when "test"
10
+ "localhost:3004"
11
+ end
@@ -0,0 +1,4 @@
1
+ module MailingClient
2
+ class Engine < Rails::Engine
3
+ end
4
+ end
@@ -0,0 +1,10 @@
1
+ module MailingClient
2
+ module ServiceConfiguration
3
+ def self.included(base)
4
+ base.send('use_hydra', Mailing::HYDRA)
5
+ base.send('force_ssl')
6
+ base.send('set_resource_host', Mailing::HOST)
7
+ base.send('configure_index_response', {collection: 'data', total: 'total'})
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,4 @@
1
+ require 'logical_model'
2
+ if defined?(Rails)
3
+ require 'mailing_client/railties'
4
+ end
metadata ADDED
@@ -0,0 +1,84 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: mailing_client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Alex Falke
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-06-24 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: railties
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '3.1'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '3.1'
30
+ - !ruby/object:Gem::Dependency
31
+ name: logical_model
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ~>
36
+ - !ruby/object:Gem::Version
37
+ version: 0.5.5
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.5.5
46
+ description: This is client library for Padma-Mailing API.
47
+ email:
48
+ - afalkear@gmail.com
49
+ executables: []
50
+ extensions: []
51
+ extra_rdoc_files: []
52
+ files:
53
+ - app/helpers/mailing/parallel_requests.rb
54
+ - app/models/mailing/scheduled_mail.rb
55
+ - lib/mailing_client.rb
56
+ - lib/mailing_client/railties.rb
57
+ - lib/mailing_client/service_configuration.rb
58
+ - config/initializers/mailing_client.rb
59
+ homepage: ''
60
+ licenses: []
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ required_rubygems_version: !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ requirements: []
78
+ rubyforge_project:
79
+ rubygems_version: 1.8.25
80
+ signing_key:
81
+ specification_version: 3
82
+ summary: Client library Padma-mailing API
83
+ test_files: []
84
+ has_rdoc: