forest_admin_rpc_agent 1.1.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/forest_admin_rpc_agent/thor/install.rb +22 -1
- data/lib/forest_admin_rpc_agent/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f61e7d863a99d03a218ed3e613aee82570b88354573153438d205ff2ad5d398e
|
4
|
+
data.tar.gz: 7a9d9eb6adcda01322130340aeb06aa946ad5a9cceb383d2fbb03775c5b3ae97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 63cb140b9d765dfdef7d417bcb67e29b5efbc55dd94a76894acc80cea7da56b77fead964a6578cba5693ef1c57ade1087b4646229c43bb6114976918c63afab1
|
7
|
+
data.tar.gz: fe5a48fdeea5e2086535137b9d9316dce83c6cd0c761f01425c347e7a1a9a857b6d992d969122ff9ba8bc9245cb1b83568a088ea864b03209ef10d278cecdc27
|
@@ -85,11 +85,32 @@ module ForestAdminRpcAgent
|
|
85
85
|
create_file agent_path, <<~RUBY
|
86
86
|
# This file contains code to create and configure your Forest Admin agent
|
87
87
|
# You can customize this file according to your needs
|
88
|
+
#
|
89
|
+
# For more information about customizing your agent:
|
90
|
+
# - Adding datasources: https://docs.forestadmin.com/developer-guide-agents-ruby
|
91
|
+
# - Customizing collections: https://docs.forestadmin.com/developer-guide-agents-ruby/agent-customization
|
88
92
|
|
89
93
|
module ForestAdminRpcAgent
|
90
94
|
class CreateRpcAgent
|
91
95
|
def self.setup!
|
92
|
-
#
|
96
|
+
# Get the agent instance
|
97
|
+
@agent = ForestAdminRpcAgent::Agent.instance
|
98
|
+
|
99
|
+
# Add your datasources here
|
100
|
+
# Example:
|
101
|
+
# datasource = ForestAdminDatasourceActiveRecord::Datasource.new
|
102
|
+
# @agent.add_datasource(datasource)
|
103
|
+
|
104
|
+
# Customize your collections (optional)
|
105
|
+
# Example:
|
106
|
+
# @agent.customize_collection('users') do |collection|
|
107
|
+
# collection.add_field('full_name', column_type: 'String') do |context|
|
108
|
+
# "\#{context.record['first_name']} \#{context.record['last_name']}"
|
109
|
+
# end
|
110
|
+
# end
|
111
|
+
|
112
|
+
# Build the agent (required)
|
113
|
+
@agent.build
|
93
114
|
end
|
94
115
|
end
|
95
116
|
end
|