Merge branch 'develop' into unstable
This commit is contained in:
commit
61bb681178
|
@ -11,3 +11,4 @@
|
|||
.greenbar
|
||||
.rubocop-*
|
||||
measurements
|
||||
.byebug_history
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# Please keep AllCops, Bundler, Style, Metrics groups and then order cops
|
||||
# alphabetically
|
||||
inherit_from:
|
||||
- https://raw.githubusercontent.com/hanami/devtools/master/.rubocop.yml
|
12
.travis.yml
12
.travis.yml
|
@ -1,16 +1,12 @@
|
|||
language: ruby
|
||||
sudo: false
|
||||
cache: bundler
|
||||
before_install:
|
||||
- gem update --system
|
||||
- rvm @global do gem uninstall bundler -a -x
|
||||
- rvm @global do gem install bundler -v 1.13.7
|
||||
script: 'bundle exec rake --trace'
|
||||
script: ./script/ci
|
||||
rvm:
|
||||
- 2.3.3
|
||||
- 2.4.0
|
||||
- 2.3.5
|
||||
- 2.4.2
|
||||
- ruby-head
|
||||
- jruby-9.1.6.0
|
||||
- jruby-9.1.13.0
|
||||
- jruby-head
|
||||
|
||||
matrix:
|
||||
|
|
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -1,6 +1,16 @@
|
|||
# Hanami::Mailer
|
||||
Mail for Ruby applications
|
||||
|
||||
## v1.1.0 - 2017-10-25
|
||||
|
||||
## v1.1.0.rc1 - 2017-10-16
|
||||
|
||||
## v1.1.0.beta3 - 2017-10-04
|
||||
|
||||
## v1.1.0.beta2 - 2017-10-03
|
||||
|
||||
## v1.1.0.beta1 - 2017-08-11
|
||||
|
||||
## v1.0.0 - 2017-04-06
|
||||
|
||||
## v1.0.0.rc1 - 2017-03-31
|
||||
|
|
3
Gemfile
3
Gemfile
|
@ -6,7 +6,8 @@ unless ENV['TRAVIS']
|
|||
gem 'yard', require: false
|
||||
end
|
||||
|
||||
gem 'hanami-utils', '~> 1.0', require: false, git: 'https://github.com/hanami/utils.git', branch: '1.0.x'
|
||||
gem 'hanami-utils', '~> 1.1', require: false, git: 'https://github.com/hanami/utils.git', branch: 'unstable'
|
||||
gem 'haml'
|
||||
|
||||
gem 'hanami-devtools', require: false, git: 'https://github.com/hanami/devtools.git'
|
||||
gem 'coveralls', require: false
|
||||
|
|
|
@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|||
spec.require_paths = ['lib']
|
||||
spec.required_ruby_version = '>= 2.3.0'
|
||||
|
||||
spec.add_dependency 'hanami-utils', '~> 1.0'
|
||||
spec.add_dependency 'hanami-utils', '~> 1.1'
|
||||
spec.add_dependency 'tilt', '~> 2.0', '>= 2.0.1'
|
||||
spec.add_dependency 'mail', '~> 2.6'
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
require 'hanami/mailer' # rubocop:disable Style/FileName
|
||||
require 'hanami/mailer' # rubocop:disable Naming/FileName
|
||||
|
|
|
@ -31,7 +31,7 @@ module Hanami
|
|||
# @api private
|
||||
def compile!(namespace)
|
||||
tokens(namespace) { |token| replace!(token) }
|
||||
@name = Utils::String.new(@name).underscore
|
||||
@name = Utils::String.underscore(@name)
|
||||
end
|
||||
|
||||
# @since 0.1.0
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
module Hanami
|
||||
module Mailer
|
||||
# @since 0.1.0
|
||||
VERSION = '1.0.0'.freeze
|
||||
VERSION = '1.1.0'.freeze
|
||||
end
|
||||
end
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
#!/bin/bash
|
||||
set -euo pipefail
|
||||
IFS=$'\n\t'
|
||||
|
||||
run_code_quality_checks() {
|
||||
bundle exec rubocop .
|
||||
}
|
||||
|
||||
run_unit_tests() {
|
||||
bundle exec rake spec:coverage
|
||||
}
|
||||
|
||||
run_isolation_tests() {
|
||||
local pwd=$PWD
|
||||
local root="$pwd/spec/isolation"
|
||||
|
||||
if [ -d $root ]; then
|
||||
for test in $(find $root -name '*_spec.rb')
|
||||
do
|
||||
run_isolation_test $test
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
local exit_code=$?
|
||||
echo "Failing test: $test"
|
||||
exit $exit_code
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
run_isolation_test() {
|
||||
local test=$1
|
||||
|
||||
printf "\n\n\nRunning: $test\n"
|
||||
ruby $test --options spec/isolation/.rspec
|
||||
}
|
||||
|
||||
run_test() {
|
||||
local test=$1
|
||||
|
||||
printf "\n\n\nRunning: $test\n"
|
||||
COVERAGE=true bundle exec rspec $test
|
||||
}
|
||||
|
||||
main() {
|
||||
run_code_quality_checks &&
|
||||
run_unit_tests &&
|
||||
run_isolation_tests
|
||||
}
|
||||
|
||||
main
|
|
@ -21,7 +21,7 @@ RSpec.describe Hanami::Mailer do
|
|||
describe 'when no value is set' do
|
||||
it 'returns a set of templates' do
|
||||
template_formats = LazyMailer.templates.keys
|
||||
expect(template_formats).to eq(%i(html txt))
|
||||
expect(template_formats).to eq(%i[html txt])
|
||||
end
|
||||
|
||||
it 'returns only the template for the given format' do
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
RSpec.describe "Hanami::Mailer::VERSION" do
|
||||
it "returns current version" do
|
||||
expect(Hanami::Mailer::VERSION).to eq("1.0.0")
|
||||
expect(Hanami::Mailer::VERSION).to eq("1.1.0")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue