Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit ca715c8

Browse files
committed
Reorganized the library to comply with arduino 1.5+ library standards https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification
1 parent 3d03b52 commit ca715c8

27 files changed

+32
-31
lines changed

library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=firebase-arduino
2-
version=0.4
2+
version=0.5
33
author=
44
maintainer=
55
sentence=Fill in later
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

modem/test/Makefile renamed to test/modem/Makefile

+19-17
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,21 @@
1717
# Points to the root of Google Test, relative to where this file is.
1818
# Remember to tweak this if you move this file, or if you want to use
1919
# a copy of Google Test at a different location.
20-
GTEST_DIR = ../../test/googletest/googletest/
20+
GTEST_DIR = ../googletest/googletest/
2121

2222
# Points to the root of Google Mock, relative to where this file is.
2323
# Remember to tweak this if you move this file.
24-
GMOCK_DIR = ../../test/googletest/googlemock/
24+
GMOCK_DIR = ../googletest/googlemock/
2525

2626
# Points to the root of Arduino mock, relative to where this file is.
2727
# Remember to tweak this if you move this file.
28-
ARDUINO_MOCK_DIR = ../../test/arduino-mock/
28+
ARDUINO_MOCK_DIR = ../arduino-mock/
2929

3030
# Where to find user code.
3131
TEST_DIR = .
3232

3333
PROJECT_ROOT = ../../
34+
SRC_ROOT = $(PROJECT_ROOT)/src
3435

3536
# Flags passed to the preprocessor.
3637
# Set Google Test and Google Mock's header directories as system
@@ -40,6 +41,7 @@ CPPFLAGS += -isystem $(GTEST_DIR)/include -isystem $(GMOCK_DIR)/include \
4041
-I$(ARDUINO_MOCK_DIR)/include/arduino-mock/ \
4142
-I$(ARDUINO_MOCK_DIR)/include/ \
4243
-I$(PROJECT_ROOT)/test/dummies \
44+
-I$(PROJECT_ROOT)/src \
4345
-I$(PROJECT_ROOT)
4446

4547
# Flags passed to the C++ compiler.
@@ -122,16 +124,16 @@ arduino_mock_all.a : ArduinoMockAll.o
122124

123125
# Builds shared objects.
124126

125-
Firebase.o : $(PROJECT_ROOT)/Firebase.cpp
126-
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(PROJECT_ROOT)/Firebase.cpp
127+
Firebase.o : $(SRC_ROOT)/Firebase.cpp
128+
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SRC_ROOT)/Firebase.cpp
127129

128130
FirebaseHttpClient_dummy.o : $(PROJECT_ROOT)/test/dummies/FirebaseHttpClient_dummy.cpp
129131
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(PROJECT_ROOT)/test/dummies/FirebaseHttpClient_dummy.cpp
130132

131133
# Builds tests.
132134

133-
get-command.o : $(PROJECT_ROOT)/modem/get-command.cpp
134-
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(PROJECT_ROOT)/modem/get-command.cpp
135+
get-command.o : $(SRC_ROOT)/modem/get-command.cpp
136+
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SRC_ROOT)/modem/get-command.cpp
135137

136138
get-command_test.o : $(TEST_DIR)/get-command_test.cpp $(GMOCK_HEADERS)
137139
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(TEST_DIR)/get-command_test.cpp
@@ -141,8 +143,8 @@ get-command_test : get-command_test.o Firebase.o FirebaseHttpClient_dummy.o get-
141143
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@
142144

143145

144-
set-command.o : $(PROJECT_ROOT)/modem/set-command.cpp
145-
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(PROJECT_ROOT)/modem/set-command.cpp
146+
set-command.o : $(SRC_ROOT)/modem/set-command.cpp
147+
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SRC_ROOT)/modem/set-command.cpp
146148

147149
set-command_test.o : $(TEST_DIR)/set-command_test.cpp $(GMOCK_HEADERS)
148150
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(TEST_DIR)/set-command_test.cpp
@@ -152,8 +154,8 @@ set-command_test : set-command.o set-command_test.o Firebase.o FirebaseHttpClien
152154
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@
153155

154156

155-
remove-command.o : $(PROJECT_ROOT)/modem/remove-command.cpp
156-
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(PROJECT_ROOT)/modem/remove-command.cpp
157+
remove-command.o : $(SRC_ROOT)/modem/remove-command.cpp
158+
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SRC_ROOT)/modem/remove-command.cpp
157159

158160
remove-command_test.o : $(TEST_DIR)/remove-command_test.cpp $(GMOCK_HEADERS)
159161
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(TEST_DIR)/remove-command_test.cpp
@@ -163,8 +165,8 @@ remove-command_test : remove-command.o remove-command_test.o Firebase.o Firebase
163165
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@
164166

165167

166-
push-command.o : $(PROJECT_ROOT)/modem/push-command.cpp
167-
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(PROJECT_ROOT)/modem/push-command.cpp
168+
push-command.o : $(SRC_ROOT)/modem/push-command.cpp
169+
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SRC_ROOT)/modem/push-command.cpp
168170

169171
push-command_test.o : $(TEST_DIR)/push-command_test.cpp $(GMOCK_HEADERS)
170172
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(TEST_DIR)/push-command_test.cpp
@@ -173,8 +175,8 @@ push-command_test : push-command.o push-command_test.o Firebase.o FirebaseHttpCl
173175
arduino_mock_all.a
174176
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@
175177

176-
begin-command.o : $(PROJECT_ROOT)/modem/begin-command.cpp
177-
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(PROJECT_ROOT)/modem/begin-command.cpp
178+
begin-command.o : $(SRC_ROOT)/modem/begin-command.cpp
179+
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SRC_ROOT)/modem/begin-command.cpp
178180

179181
begin-command_test.o : $(TEST_DIR)/begin-command_test.cpp $(GMOCK_HEADERS)
180182
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(TEST_DIR)/begin-command_test.cpp
@@ -183,8 +185,8 @@ begin-command_test : begin-command.o begin-command_test.o Firebase.o FirebaseHtt
183185
arduino_mock_all.a
184186
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@
185187

186-
stream-command.o : $(PROJECT_ROOT)/modem/stream-command.cpp
187-
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(PROJECT_ROOT)/modem/stream-command.cpp
188+
stream-command.o : $(SRC_ROOT)/modem/stream-command.cpp
189+
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(SRC_ROOT)/modem/stream-command.cpp
188190

189191
stream-command_test.o : $(TEST_DIR)/stream-command_test.cpp $(GMOCK_HEADERS)
190192
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(TEST_DIR)/stream-command_test.cpp

modem/test/begin-command_test.cpp renamed to test/modem/begin-command_test.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include "Firebase.h"
22
#include "gtest/gtest.h"
33
#include "modem/commands.h"
4-
#include "modem/test/mock-input-stream.h"
5-
#include "modem/test/mock-output-stream.h"
4+
#include "test/modem/mock-input-stream.h"
5+
#include "test/modem/mock-output-stream.h"
66
#include "test/mock-firebase.h"
77

88
namespace firebase {

modem/test/get-command_test.cpp renamed to test/modem/get-command_test.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include "Firebase.h"
22
#include "gtest/gtest.h"
33
#include "modem/commands.h"
4-
#include "modem/test/mock-input-stream.h"
5-
#include "modem/test/mock-output-stream.h"
4+
#include "test/modem/mock-input-stream.h"
5+
#include "test/modem/mock-output-stream.h"
66
#include "test/mock-firebase.h"
77

88
namespace firebase {
File renamed without changes.
File renamed without changes.

modem/test/push-command_test.cpp renamed to test/modem/push-command_test.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#include "gtest/gtest.h"
33
#include "modem/commands.h"
44
#include "modem/json_util.h"
5-
#include "modem/test/mock-input-stream.h"
6-
#include "modem/test/mock-output-stream.h"
5+
#include "test/modem/mock-input-stream.h"
6+
#include "test/modem/mock-output-stream.h"
77
#include "test/mock-firebase.h"
88

99
namespace firebase {

modem/test/remove-command_test.cpp renamed to test/modem/remove-command_test.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "gtest/gtest.h"
2-
#include "modem/test/mock-output-stream.h"
3-
#include "modem/test/mock-input-stream.h"
2+
#include "test/modem/mock-output-stream.h"
3+
#include "test/modem/mock-input-stream.h"
44
#include "test/mock-firebase.h"
55
#include "Firebase.h"
66
#include "modem/commands.h"

modem/test/set-command_test.cpp renamed to test/modem/set-command_test.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
#include "gtest/gtest.h"
33
#include "modem/commands.h"
44
#include "modem/json_util.h"
5-
#include "modem/test/mock-input-stream.h"
6-
#include "modem/test/mock-output-stream.h"
5+
#include "test/modem/mock-input-stream.h"
6+
#include "test/modem/mock-output-stream.h"
77
#include "test/mock-firebase.h"
88

99
namespace firebase {

modem/test/stream-command_test.cpp renamed to test/modem/stream-command_test.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#include "Firebase.h"
22
#include "gtest/gtest.h"
33
#include "modem/commands.h"
4-
#include "modem/test/mock-input-stream.h"
5-
#include "modem/test/mock-output-stream.h"
4+
#include "test/modem/mock-input-stream.h"
5+
#include "test/modem/mock-output-stream.h"
66
#include "test/mock-firebase.h"
77

88
namespace firebase {

utility

-1
This file was deleted.

0 commit comments

Comments
 (0)