Skip to content

Commit

Permalink
Fix workflows custom fields endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
gmordecki committed Apr 29, 2020
1 parent ff0a62e commit e1628e9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions lib/monkeylearn/workflows.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def data
return WorkflowData
end

def metadata
return WorkflowMetadata
def custom_fields
return WorkflowCustomFields
end

def build_endpoint(*args)
Expand All @@ -35,7 +35,7 @@ def create(name, options = {})
db_name: options[:db_name],
webhook_url: options[:webhook_url],
steps: options[:steps],
metadata: options[:metadata],
custom_fields: options[:custom_fields],
sources: options[:sources],
actions: options[:actions],
}.delete_if { |k,v| v.nil? }
Expand Down Expand Up @@ -72,12 +72,12 @@ def create(module_id, options = {})
end
end

module WorkflowMetadata
module WorkflowCustomFields
class << self
include Monkeylearn::Requests

def build_endpoint(module_id, *args)
File.join('workflows', module_id, 'metadata', *args.collect { |x| x.to_s }) + '/'
File.join('workflows', module_id, 'custom-fields', *args.collect { |x| x.to_s }) + '/'
end

def create(module_id, options = {})
Expand Down
2 changes: 1 addition & 1 deletion monkeylearn.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
spec.email = ['hello@monkeylearn.com']
spec.homepage = 'https://github.com/monkeylearn/monkeylearn-ruby'

spec.version = '3.3.3'
spec.version = '3.3.4'

spec.add_dependency 'faraday', '>= 0.9.2', '< 1.0.0'

Expand Down

0 comments on commit e1628e9

Please sign in to comment.