maily 0.4.0 → 0.5.0

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: de8e4fc672413008f9fba27e3bd37063f544035a
4
- data.tar.gz: e4e16a797ec0e23dcfd8aefa73f04b6343f95a7b
3
+ metadata.gz: 4eec9f6ff7965b84fade274481f733f6f943e24c
4
+ data.tar.gz: f94b2820645289fb453cdd84924bff70a1db1eed
5
5
  SHA512:
6
- metadata.gz: d01ba2a9b7c0433dd369d32ec26da9ebc86922caca2aae774bf9fa01d199c91aa82c1b5f584dbbb8fcc58c5f1af245b5d688d868212e3db8acb40cd05103f181
7
- data.tar.gz: 9ea9c77b7bb632d0c279cbf788ad9f44b476ade72f3289f09abade83de6d4a693ff7ad63b64c25ed669bd740a591cd631b20647b3fa992010b2cd3d00b51b5dc
6
+ metadata.gz: 4271c5cd492c9c6c030f89a0014d3e4257b5d4b5821098863a34e0cb38f619aff346a55831c9e8eb73fb6e2970b9fe889d517fed0d2128324450a035e3824606
7
+ data.tar.gz: 25625b8e6558ae187158fe431572aad65b6ac11b5fcafc237f95280770a19bbd321ed3029e1f72f6ca36852932af36cb4504995c2965645824561d44128f39d3
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  .bundle/
2
2
  pkg/
3
3
  Gemfile.lock
4
+ *.gemfile.lock
4
5
  spec/dummy/log/*.log
5
6
  spec/dummy/tmp/
@@ -1,5 +1,26 @@
1
1
  language: ruby
2
+
3
+ cache: bundler
4
+
5
+ sudo: false
6
+
2
7
  rvm:
8
+ - 2.4.0
9
+ - 2.3.3
10
+ - 2.2.6
3
11
  - 2.1
4
- - 2.0.0
5
- - 1.9.3
12
+
13
+ gemfile:
14
+ - gemfiles/rails_5.0.gemfile
15
+ - gemfiles/rails_4.2.gemfile
16
+ - gemfiles/rails_4.1.gemfile
17
+ - gemfiles/rails_3.2.gemfile
18
+
19
+ matrix:
20
+ exclude:
21
+ - rvm: 2.1
22
+ gemfile: gemfiles/rails_5.0.gemfile
23
+ - rvm: 2.4.0
24
+ gemfile: gemfiles/rails_4.1.gemfile
25
+ - rvm: 2.4.0
26
+ gemfile: gemfiles/rails_3.2.gemfile
@@ -0,0 +1,15 @@
1
+ appraise "rails-5.0" do
2
+ gem "rails", "~> 5.0.0"
3
+ end
4
+
5
+ appraise "rails-4.2" do
6
+ gem "rails", github: 'rails/rails', branch: '4-2-stable'
7
+ end
8
+
9
+ appraise "rails-4.1" do
10
+ gem "rails", "~> 4.1.0"
11
+ end
12
+
13
+ appraise "rails-3.2" do
14
+ gem "rails", "~> 3.2.0"
15
+ end
@@ -1,4 +1,4 @@
1
- Copyright 2013-2014 Marc Anguera Insa
1
+ Copyright 2013-2017 Marc Anguera Insa
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -34,7 +34,7 @@ Run generator:
34
34
  rails g maily:install
35
35
  ```
36
36
 
37
- This installator makes some tasks for you:
37
+ This generator runs some tasks for you:
38
38
 
39
39
  * Mounts the engine (to `/maily` by default) in your routes
40
40
  * Adds an initializer (into `config/initializers/maily.rb`) to customize some settings
@@ -83,7 +83,7 @@ So, templates edition is not allowed running `production` mode.
83
83
 
84
84
  ## Hooks
85
85
 
86
- Most of emails need to populate data to consume it and do intersting things. Hooks are used to define this data with a little DSL. Example:
86
+ Most of emails need to populate data to consume it and do interesting things. Hooks are used to define this data with a little DSL. Example:
87
87
 
88
88
  ```ruby
89
89
  # lib/maily_hooks.rb
@@ -151,4 +151,4 @@ Alternatively, there are some other plugins to get a similar functionality with
151
151
 
152
152
  ## License
153
153
 
154
- Copyright (c) 2013-2014 Marc Anguera. Maily is released under the [MIT](MIT-LICENSE) License.
154
+ Copyright (c) Marc Anguera. Maily is released under the [MIT](MIT-LICENSE) License.
@@ -49,6 +49,7 @@
49
49
  <% if @email.html_part || @email.text_part || @email.body.present? %>
50
50
  <iframe class="maily_preview" onload='javascript:resizeIframe(this);' src="<%= raw_maily_email_path(mailer: params[:mailer], email: params[:email], locale: params[:locale], part: params[:part]) %>" frameborder="1" width="100%"></iframe>
51
51
  <% end %>
52
+
52
53
  <% if @email.attachments.present? %>
53
54
  <ul class="maily_mail_attachments">
54
55
  <li>Attachments:</li>
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 3.2.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 4.1.0"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", :github => "rails/rails", :branch => "4-2-stable"
6
+
7
+ gemspec :path => "../"
@@ -0,0 +1,7 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "rails", "~> 5.0.0"
6
+
7
+ gemspec :path => "../"
@@ -27,7 +27,7 @@ module Maily
27
27
 
28
28
  # Load hooks
29
29
  hooks_file_path = "#{Rails.root}/lib/maily_hooks.rb"
30
- require hooks_file_path if File.exists?(hooks_file_path)
30
+ require hooks_file_path if File.exist?(hooks_file_path)
31
31
  end
32
32
 
33
33
  def hooks_for(mailer_name)
@@ -51,4 +51,4 @@ module Maily
51
51
  end
52
52
  end
53
53
  end
54
- end
54
+ end
@@ -9,12 +9,16 @@ module Maily
9
9
  self.template_path = mailer
10
10
  end
11
11
 
12
+ def parameters
13
+ mailer_klass.instance_method(name).parameters
14
+ end
15
+
12
16
  def require_hook?
13
- mailer_klass.instance_method(name).parameters.any?
17
+ parameters.any?
14
18
  end
15
19
 
16
20
  def required_arguments
17
- mailer_klass.instance_method(name).parameters.map(&:last)
21
+ parameters.map(&:last)
18
22
  end
19
23
 
20
24
  def register_hook(*args)
@@ -66,4 +70,4 @@ module Maily
66
70
  end
67
71
  end
68
72
  end
69
- end
73
+ end
@@ -3,4 +3,4 @@ module Maily
3
3
  isolate_namespace Maily
4
4
  load_generators
5
5
  end
6
- end
6
+ end
@@ -34,4 +34,4 @@ module Maily
34
34
  emails.find { |email| email.name == email_name.to_s }
35
35
  end
36
36
  end
37
- end
37
+ end
@@ -1,3 +1,3 @@
1
1
  module Maily
2
- VERSION = "0.4.0"
2
+ VERSION = "0.5.0"
3
3
  end
@@ -1,9 +1,5 @@
1
- $:.push File.expand_path("../lib", __FILE__)
1
+ require "./lib/maily/version"
2
2
 
3
- # Maintain your gem's version:
4
- require "maily/version"
5
-
6
- # Describe your gem and declare its dependencies:
7
3
  Gem::Specification.new do |s|
8
4
  s.name = "maily"
9
5
  s.version = Maily::VERSION
@@ -21,5 +17,8 @@ Gem::Specification.new do |s|
21
17
 
22
18
  s.add_dependency "rails", ">= 3.0.0"
23
19
 
24
- s.add_development_dependency "rspec-rails", "~> 3.0.0"
20
+ s.add_development_dependency "rspec-rails"
21
+ s.add_development_dependency "appraisal"
22
+ s.add_development_dependency 'test-unit', '~> 3.0'
23
+ s.add_development_dependency "byebug" if RUBY_VERSION.to_i >= 2
25
24
  end
@@ -1,9 +1,5 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
- $LOAD_PATH.unshift(File.dirname(__FILE__))
3
-
4
1
  ENV['RAILS_ENV'] = 'test'
5
2
  require File.expand_path("../dummy/config/environment.rb", __FILE__)
6
-
7
3
  require 'rspec/rails'
8
4
  require 'maily'
9
5
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maily
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - markets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-30 00:00:00.000000000 Z
11
+ date: 2017-01-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -26,18 +26,60 @@ dependencies:
26
26
  version: 3.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec-rails
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: appraisal
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: test-unit
29
57
  requirement: !ruby/object:Gem::Requirement
30
58
  requirements:
31
59
  - - "~>"
32
60
  - !ruby/object:Gem::Version
33
- version: 3.0.0
61
+ version: '3.0'
34
62
  type: :development
35
63
  prerelease: false
36
64
  version_requirements: !ruby/object:Gem::Requirement
37
65
  requirements:
38
66
  - - "~>"
39
67
  - !ruby/object:Gem::Version
40
- version: 3.0.0
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: byebug
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
41
83
  description: Rails Engine to preview, follow up, test and edit the emails of your
42
84
  applications in the browser
43
85
  email:
@@ -48,6 +90,7 @@ extra_rdoc_files: []
48
90
  files:
49
91
  - ".gitignore"
50
92
  - ".travis.yml"
93
+ - Appraisals
51
94
  - Gemfile
52
95
  - MIT-LICENSE
53
96
  - README.md
@@ -75,6 +118,10 @@ files:
75
118
  - app/views/maily/shared/_header.html.erb
76
119
  - app/views/maily/shared/_sidebar.html.erb
77
120
  - config/routes.rb
121
+ - gemfiles/rails_3.2.gemfile
122
+ - gemfiles/rails_4.1.gemfile
123
+ - gemfiles/rails_4.2.gemfile
124
+ - gemfiles/rails_5.0.gemfile
78
125
  - lib/generators/maily/install_generator.rb
79
126
  - lib/generators/templates/initializer.rb
80
127
  - lib/maily.rb
@@ -152,7 +199,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
199
  version: '0'
153
200
  requirements: []
154
201
  rubyforge_project:
155
- rubygems_version: 2.2.2
202
+ rubygems_version: 2.5.1
156
203
  signing_key:
157
204
  specification_version: 4
158
205
  summary: Rails Engine to preview emails in the browser.