Skip to content

Commit

Permalink
Merge pull request #13 from orkonano/develop
Browse files Browse the repository at this point in the history
Develop into master
  • Loading branch information
orkonano committed Feb 14, 2016
2 parents 6cebb9b + f69aed8 commit af0869a
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 144 deletions.
24 changes: 18 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ buildscript {

plugins {
id "io.spring.dependency-management" version "0.5.4.RELEASE"
id "com.jfrog.bintray" version "1.2"
}

version "2.0.0"
version "2.0.1"
group "org.grails.plugins"

apply plugin: 'maven-publish'
Expand All @@ -25,10 +24,8 @@ apply plugin: 'idea'
apply plugin: "spring-boot"
apply plugin: "org.grails.grails-plugin"
apply plugin: "org.grails.grails-gsp"
apply plugin: "org.grails.grails-plugin-publish"
apply plugin: "jacoco"
// Used for publishing to central repository, remove if not needed
apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/grailsCentralPublishing.gradle'
apply from:'https://raw.githubusercontent.com/grails/grails-profile-repository/master/profiles/plugin/templates/bintrayPublishing.gradle'

ext {
grailsVersion = project.grailsVersion
Expand Down Expand Up @@ -102,4 +99,19 @@ bintray {
name = project.version
}
}
}
}

grailsPublish {
// TODO: Provide values here
user = 'user'
key = 'key'
githubSlug = 'orkonano/grails-mailgun'
license {
name = 'Apache-2.0'
}
title = "Mailgun Plugin"
desc = "Grails plugin to use Mailgun Api."
developers = [orkonano: "Mariano Kfuri"]
portalUser = ""
portalPassword = ""
}
134 changes: 0 additions & 134 deletions build/.dependencies

This file was deleted.

4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
grailsVersion=3.0.11
gradleWrapperVersion=2.3
grailsVersion=3.1.1
gradleWrapperVersion=2.9
5 changes: 4 additions & 1 deletion grails-app/conf/logback.groovy
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
import ch.qos.logback.classic.encoder.PatternLayoutEncoder
import ch.qos.logback.core.ConsoleAppender
import ch.qos.logback.core.FileAppender
import grails.util.BuildSettings
import grails.util.Environment

Expand All @@ -8,7 +11,7 @@ appender('STDOUT', ConsoleAppender) {
}
}

root(ERROR, ['STDOUT'])
root(INFO, ['STDOUT'])

def targetDir = BuildSettings.TARGET_DIR
if (Environment.isDevelopmentMode() && targetDir) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import grails.plugins.rest.client.RestBuilder
import grails.plugins.rest.client.RestResponse
import org.grails.web.json.JSONObject
import org.jsoup.Jsoup
import org.springframework.http.MediaType

class MailgunService {

Expand Down Expand Up @@ -49,6 +50,7 @@ class MailgunService {
RestResponse resp = restBuilder.post("https://api.mailgun.net/v3/$grailsApplication.config.mailgun.domain/messages"){
auth 'api', grailsApplication.config.mailgun.apiKey
accept JSONObject
contentType MediaType.MULTIPART_FORM_DATA_VALUE
setProperty 'from', from
recipients.each { to ->
setProperty 'to', to.trim()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import grails.plugins.*
class GrailsMailgunGrailsPlugin extends Plugin {

// the version or versions of Grails the plugin is designed for
def grailsVersion = "3.0 > *"
def grailsVersion = "3.1 > *"
// resources that are excluded from plugin packaging
def pluginExcludes = [
"grails-app/views/**",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package grails.plugin.mailgun

import grails.converters.JSON
import grails.plugin.mailgun.render.EmailHtmlRender
import grails.plugins.rest.client.RequestCustomizer
import grails.plugins.rest.client.RestBuilder
Expand All @@ -16,6 +17,7 @@ import spock.lang.Specification
* See the API for {@link grails.test.mixin.support.GrailsUnitTestMixin} for usage instructions
*/
@TestFor(MailgunService)

class MailgunServiceSpec extends Specification {

String keyAuthorization
Expand Down

0 comments on commit af0869a

Please sign in to comment.