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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 693891dd50ee02ed95d6805db7a4e91563af6d9df35eeac5ba1f8ce6809089b2
4
- data.tar.gz: c988844777a178c5400c5dae6574a411ec1ed8cd30f5dd4a85770f57a9d7f495
3
+ metadata.gz: f61e7d863a99d03a218ed3e613aee82570b88354573153438d205ff2ad5d398e
4
+ data.tar.gz: 7a9d9eb6adcda01322130340aeb06aa946ad5a9cceb383d2fbb03775c5b3ae97
5
5
  SHA512:
6
- metadata.gz: '0824bbf63af6ae1ffb5d5f5319b404c9f4d34c87822152e53f7f0c4548f5089542d5c8b39cbcbcb3bb7199e9a91f6864273d84fd5708a03879ec0f862be8e414'
7
- data.tar.gz: 46019ce803d3456bcee25fa16e21501d397f7c4fa0ec55940abf089823f85c15e558ddd4a66b46b105438b1ba5920c1d7fe5b1ee0e6ca95cc6708303a9bb9200
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
- # Initialize your agent here
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
@@ -1,3 +1,3 @@
1
1
  module ForestAdminRpcAgent
2
- VERSION = "1.1.0"
2
+ VERSION = "1.2.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_rpc_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu