leadersend 1.0.0 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce9b8259f8b1e82631796939e260515e24b9f5a0
4
- data.tar.gz: 1bfa1fe938bddb1a1f7da47d7be64729658a5e9d
3
+ metadata.gz: fc4330110cb3c2886948c54ad5c5f4a39c33d0a2
4
+ data.tar.gz: 62d3623c959bfd6e7ef508d29fdaea77af73afcf
5
5
  SHA512:
6
- metadata.gz: e5a905477a67dc7213822f7d64672bd8f94a4a871b615e026e69531a3f21dbb88156d1b001a7aeeaca2740e74ae8c07d8fa8433089972702f3eb82563fbd59a1
7
- data.tar.gz: 5646ef8c222edf8f8005ad3b5892fc2b24480b8a3f5af18cbd277a2dee45e2d8e3328b260a111ac800773a00b75ba977955e77d73552792982ce5244aa93e98e
6
+ metadata.gz: e9276e529f80e01a205b232cf17d740ac044682e745eb04b977d914a97e365f009c7f4ba0541eb84458474ae4046dadac92c0771252c4fa431e3c70023938092
7
+ data.tar.gz: 8c425ffc11a4c5111904ff710548bb5d693f58d0e8b3cf8de507d8e52b753511dfff9bbb546bf122dfdf53c0f5f11a347cd2f1c3a247a817eb66054cae5a416f
data/README.md CHANGED
@@ -47,7 +47,7 @@ ActionMailer::Base.smtp_settings = {
47
47
  ```
48
48
 
49
49
  ### Send Email
50
- Instantiate a Leadersend::Mail object with given parameters
50
+ Instantiate a `Leadersend::Mail` object with given parameters
51
51
  ```ruby
52
52
  mailer = Leadersend::Mail.new to: self.email, from: from, fromname: fromname, subject: subject, template_path: template_path, locals: locals, title: title
53
53
  ```
@@ -57,12 +57,12 @@ to: "example@email.com"
57
57
  from: "coworker@company.com"
58
58
  fromname: "Bob"
59
59
  subject: "Friday party!"
60
- template_path = "delivery/partials/party_markup"
61
- title = "It is friday!"
62
- locals = {variable: value, another_variable: different_value} # These will be made available in the template
60
+ template_path: "delivery/partials/party_markup"
61
+ title: "It is friday!"
62
+ locals: {variable: value, another_variable: different_value} # These will be made available in the template
63
63
  ```
64
64
 
65
- Call the #send method on the instantiated objecto send an email. This method returns a hash
65
+ Call the *#send* method on the instantiated objec to send an email. This method returns a hash with response
66
66
  ```ruby
67
67
  sent_mail_hash = mailer.send
68
68
  ```
@@ -2,11 +2,6 @@ require 'leadersend/version'
2
2
  require 'leadersend/mailer'
3
3
 
4
4
  module Leadersend
5
- ROOT = File.expand_path("../..", __FILE__)
6
-
7
- def self.root
8
- return ROOT
9
- end
10
5
 
11
6
  class << self
12
7
  attr_accessor :config
@@ -1,9 +1,9 @@
1
1
  module Leadersend
2
2
  class Mail
3
3
  def initialize to: nil, from: nil, fromname: nil, subject: "System", template_path: nil, locals: {}, title: "System"
4
- @api_email_url = LEADERSEND_API_URL
5
- @api_user = LEADERSEND_USERNAME
6
- @api_key = LEADERSEND_API_KEY
4
+ @api_email_url = Leadersend.config.api_url
5
+ @api_user = Leadersend.config.username
6
+ @api_key = Leadersend.config.api_key
7
7
  @to = to
8
8
  @subject = subject
9
9
  @template_path = template_path
@@ -1,3 +1,3 @@
1
1
  module Leadersend
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -1,9 +1,5 @@
1
1
  # rspec spec/tests/basic_spec.rb
2
2
  describe "Leadersend" do
3
- it "#root returns gem root" do
4
- expect(Leadersend.root).to eq File.expand_path("../../..", __FILE__)
5
- end
6
-
7
3
  describe "config" do
8
4
  it "default username should be ok" do
9
5
  expect(Leadersend.config.username).to eq "example@domain.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leadersend
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Epigene