Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored package names #133

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions jbot-example/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>me.ramswaroop.jbot</groupId>
<groupId>com.rampatra.jbot</groupId>
<artifactId>jbot-parent</artifactId>
<version>4.1.2-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>

<artifactId>jbot-example</artifactId>
<version>4.1.2-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>JBot Example</name>
<description>A sample Slack/Facebook bot using JBot.</description>

<dependencies>
<dependency>
<groupId>me.ramswaroop.jbot</groupId>
<groupId>com.rampatra.jbot</groupId>
<artifactId>jbot</artifactId>
<version>4.1.2-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication(scanBasePackages = {"me.ramswaroop.jbot", "example.jbot"})
@SpringBootApplication(scanBasePackages = {"com.rampatra.jbot", "example.jbot"})
public class JBotApplication {

@Bean
Expand Down
21 changes: 13 additions & 8 deletions jbot-example/src/main/java/example/jbot/facebook/FbBot.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
package example.jbot.facebook;

import me.ramswaroop.jbot.core.common.Controller;
import me.ramswaroop.jbot.core.common.EventType;
import me.ramswaroop.jbot.core.common.JBot;
import me.ramswaroop.jbot.core.facebook.Bot;
import me.ramswaroop.jbot.core.facebook.models.*;
import com.rampatra.jbot.core.common.Controller;
import com.rampatra.jbot.core.common.EventType;
import com.rampatra.jbot.core.common.JBot;
import com.rampatra.jbot.core.facebook.Bot;
import com.rampatra.jbot.core.facebook.models.Attachment;
import com.rampatra.jbot.core.facebook.models.Button;
import com.rampatra.jbot.core.facebook.models.Element;
import com.rampatra.jbot.core.facebook.models.Event;
import com.rampatra.jbot.core.facebook.models.Message;
import com.rampatra.jbot.core.facebook.models.Payload;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Profile;

Expand All @@ -13,7 +18,7 @@
* extending {@link Bot} class like this one. Though it is
* recommended to create only bot per jbot instance.
*
* @author ramswaroop
* @author rampatra
* @version 17/09/2016
*/
@JBot
Expand Down Expand Up @@ -95,7 +100,7 @@ public void onReceiveQuickReply(Event event) {
@Controller(events = EventType.MESSAGE, pattern = "(?i:button)")
public void showButtons(Event event) {
Button[] buttons = new Button[]{
new Button().setType("web_url").setUrl("http://blog.ramswaroop.me").setTitle("JBot Docs"),
new Button().setType("web_url").setUrl("http://blog.rampatra.com").setTitle("JBot Docs"),
new Button().setType("web_url").setUrl("https://goo.gl/uKrJWX").setTitle("Buttom Template")
};
reply(event, new Message().setAttachment(new Attachment().setType("template").setPayload(new Payload()
Expand Down Expand Up @@ -137,7 +142,7 @@ public void showList(Event event) {
public void showGithubLink(Event event) {
reply(event, new Message().setAttachment(new Attachment().setType("template").setPayload(new Payload()
.setTemplateType("button").setText("Bye. Happy coding!").setButtons(new Button[]{new Button()
.setType("web_url").setTitle("View code").setUrl("https://github.com/ramswaroop/jbot")}))));
.setType("web_url").setTitle("View code").setUrl("https://github.com/rampatra/jbot")}))));
}


Expand Down
12 changes: 6 additions & 6 deletions jbot-example/src/main/java/example/jbot/slack/SlackBot.java
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package example.jbot.slack;

import me.ramswaroop.jbot.core.common.Controller;
import me.ramswaroop.jbot.core.common.EventType;
import me.ramswaroop.jbot.core.common.JBot;
import me.ramswaroop.jbot.core.slack.Bot;
import me.ramswaroop.jbot.core.slack.models.Event;
import com.rampatra.jbot.core.common.Controller;
import com.rampatra.jbot.core.common.EventType;
import com.rampatra.jbot.core.common.JBot;
import com.rampatra.jbot.core.slack.Bot;
import com.rampatra.jbot.core.slack.models.Event;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
Expand All @@ -18,7 +18,7 @@
* extending {@link Bot} class like this one. Though it is
* recommended to create only bot per jbot instance.
*
* @author ramswaroop
* @author rampatra
* @version 1.0.0, 05/06/2016
*/
@JBot
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import me.ramswaroop.jbot.core.slack.models.Attachment;
import me.ramswaroop.jbot.core.slack.models.RichMessage;
import com.rampatra.jbot.core.slack.models.Attachment;
import com.rampatra.jbot.core.slack.models.RichMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
Expand All @@ -17,7 +17,7 @@
/**
* Sample Slash Command Handler.
*
* @author ramswaroop
* @author rampatra
* @version 1.0.0, 20/06/2016
*/
@RestController
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import me.ramswaroop.jbot.core.slack.models.Attachment;
import me.ramswaroop.jbot.core.slack.models.RichMessage;
import com.rampatra.jbot.core.slack.models.Attachment;
import com.rampatra.jbot.core.slack.models.RichMessage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
Expand All @@ -21,7 +21,7 @@
* 1) Send as a JSON string as the payload parameter in a POST request
* 2) Send as a JSON string as the body of a POST request
*
* @author ramswaroop
* @author rampatra
* @version 1.0.0, 21/06/2016
*/
@Component
Expand Down
4 changes: 2 additions & 2 deletions jbot-example/src/main/resources/application.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# jbot
spring.profiles.active=slack,facebook
spring.jackson.property-naming-strategy=SNAKE_CASE
logging.level.me.ramswaroop=DEBUG
logging.level.com.rampatra=DEBUG
server.port=8080

# slack integrations
Expand All @@ -14,4 +14,4 @@ slackIncomingWebhookUrl=https://slack.com
# fb bot
fbGraphApi=https://graph.facebook.com/v3.2
fbBotToken=fb_token_for_jbot
fbPageAccessToken=<paste your page access token>
fbPageAccessToken=<paste your page access token>
4 changes: 2 additions & 2 deletions jbot-example/src/main/resources/banner.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ R JJ:::::::::JJ B::::::::::::::::B oo:::::::::::oo
R JJJJJJJJJ BBBBBBBBBBBBBBBBB ooooooooooo ttttttttttt R
R R
R R
R JBot v4.0.0 R
R https://github.com/ramswaroop/jbot R
R JBot v5.0 R
R https://github.com/rampatra/jbot R
R R
R R
RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR
12 changes: 6 additions & 6 deletions jbot-example/src/test/java/example/jbot/facebook/FbBotTest.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package example.jbot.facebook;

import com.fasterxml.jackson.databind.ObjectMapper;
import me.ramswaroop.jbot.core.common.Controller;
import me.ramswaroop.jbot.core.common.EventType;
import me.ramswaroop.jbot.core.facebook.Bot;
import me.ramswaroop.jbot.core.facebook.models.Callback;
import me.ramswaroop.jbot.core.facebook.models.Event;
import com.rampatra.jbot.core.common.Controller;
import com.rampatra.jbot.core.common.EventType;
import com.rampatra.jbot.core.facebook.Bot;
import com.rampatra.jbot.core.facebook.models.Callback;
import com.rampatra.jbot.core.facebook.models.Event;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand All @@ -23,7 +23,7 @@
import static org.junit.Assert.assertThat;

/**
* @author ramswaroop
* @author rampatra
* @version 11/03/2018
*/
@SpringBootTest
Expand Down
14 changes: 7 additions & 7 deletions jbot-example/src/test/java/example/jbot/slack/SlackBotTest.java
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
package example.jbot.slack;


import me.ramswaroop.jbot.core.common.Controller;
import me.ramswaroop.jbot.core.common.EventType;
import me.ramswaroop.jbot.core.slack.Bot;
import me.ramswaroop.jbot.core.slack.SlackService;
import me.ramswaroop.jbot.core.slack.models.Event;
import me.ramswaroop.jbot.core.slack.models.User;
import com.rampatra.jbot.core.common.Controller;
import com.rampatra.jbot.core.common.EventType;
import com.rampatra.jbot.core.slack.Bot;
import com.rampatra.jbot.core.slack.SlackService;
import com.rampatra.jbot.core.slack.models.Event;
import com.rampatra.jbot.core.slack.models.User;
import org.junit.Before;
import org.junit.Rule;
import org.junit.Test;
Expand All @@ -29,7 +29,7 @@
import static org.mockito.Mockito.when;

/**
* @author ramswaroop
* @author rampatra
* @version 20/06/2016
*/
@SpringBootTest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;

/**
* @author ramswaroop
* @author rampatra
* @version 05/08/2016
*/
@ActiveProfiles("slack")
Expand Down
14 changes: 7 additions & 7 deletions jbot/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,26 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>me.ramswaroop.jbot</groupId>
<groupId>com.rampatra.jbot</groupId>
<artifactId>jbot-parent</artifactId>
<version>4.1.2-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
</parent>

<artifactId>jbot</artifactId>
<version>4.1.2-SNAPSHOT</version>
<version>5.0.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>JBot</name>
<description>Make Slack and Facebook bots in Java in minutes.</description>
<url>https://github.com/ramswaroop/jbot</url>
<url>https://github.com/rampatra/jbot</url>

<developers>
<developer>
<id>ram</id>
<name>Ram Patra</name>
<email>hi at ramswaroop.me</email>
<organization>Ramswaroop.me</organization>
<organizationUrl>http://www.ramswaroop.me</organizationUrl>
<email>hi at rampatra.com</email>
<organization>RamPatra.com</organization>
<organizationUrl>http://www.rampatra.com</organizationUrl>
</developer>
</developers>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.ramswaroop.jbot.core.common;
package com.rampatra.jbot.core.common;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -10,7 +10,7 @@
import java.util.regex.Pattern;

/**
* @author ramswaroop
* @author rampatra
* @version 29/03/2017
*/
public abstract class BaseBot {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package me.ramswaroop.jbot.core.common;
package com.rampatra.jbot.core.common;

import me.ramswaroop.jbot.core.slack.Bot;
import com.rampatra.jbot.core.slack.Bot;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.socket.BinaryMessage;
Expand All @@ -10,7 +10,7 @@
import org.springframework.web.socket.handler.AbstractWebSocketHandler;

/**
* @author ramswaroop
* @author rampatra
* @version 05/06/2016
*/
public class BotWebSocketHandler extends AbstractWebSocketHandler {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package me.ramswaroop.jbot.core.common;
package com.rampatra.jbot.core.common;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
Expand All @@ -8,7 +8,7 @@
/**
* Annotation for different Event types in Slack RTM API, Fb Messenger Bot API.
*
* @author ramswaroop
* @author rampatra
* @version 1.0.0, 12/06/2016.
*/
@Target(ElementType.METHOD)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package me.ramswaroop.jbot.core.common;
package com.rampatra.jbot.core.common;

/**
* All events supported by Slack RTM API, Fb Messenger Bot API. This
* also includes extra events added by JBot.
*
* @author ramswaroop
* @author rampatra
* @version 1.0.1, 06/03/2018
*/
public enum EventType {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
package me.ramswaroop.jbot.core.common;
package com.rampatra.jbot.core.common;

import org.springframework.stereotype.Controller;

import java.lang.annotation.*;

/**
* @author ramswaroop
* @author rampatra
* @version 17/09/2016
*/
@Target({ElementType.TYPE})
Expand Down
Loading