From 45fd5e2129c05bd2bf9d1b26a84f02cc7304fb59 Mon Sep 17 00:00:00 2001 From: Ben Greenberg Date: Tue, 11 May 2021 15:44:52 +0300 Subject: [PATCH 1/3] fix cli typo --- scripts/check_comments.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_comments.rb b/scripts/check_comments.rb index 200e089..2f171d2 100644 --- a/scripts/check_comments.rb +++ b/scripts/check_comments.rb @@ -1,7 +1,7 @@ #!/usr/bin/env ruby # frozen_string_literal: true -require "dev_orbit" +require "linkedin_orbit" require "thor" module LinkedinOrbit From 398368c9e39c0e84f36b7f5e88337b8c1922958a Mon Sep 17 00:00:00 2001 From: Ben Greenberg Date: Tue, 11 May 2021 15:45:13 +0300 Subject: [PATCH 2/3] increment version --- lib/linkedin_orbit/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/linkedin_orbit/version.rb b/lib/linkedin_orbit/version.rb index 4aaad52..01ec8e9 100644 --- a/lib/linkedin_orbit/version.rb +++ b/lib/linkedin_orbit/version.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true module LinkedinOrbit - VERSION = "0.1.0" + VERSION = "0.1.1" end \ No newline at end of file From ff57c59394d9e51e305dc683172a1a279541bcd9 Mon Sep 17 00:00:00 2001 From: Ben Greenberg Date: Tue, 11 May 2021 15:50:11 +0300 Subject: [PATCH 3/3] add tag --- Gemfile.lock | 2 +- lib/linkedin_orbit/interactions/comment.rb | 1 + spec/interactions/comment_spec.rb | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 907aff4..05a904c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,7 +1,7 @@ PATH remote: . specs: - linkedin_orbit (0.0.2) + linkedin_orbit (0.1.1) dotenv (~> 2.7) http (~> 4.4) json (~> 2.5) diff --git a/lib/linkedin_orbit/interactions/comment.rb b/lib/linkedin_orbit/interactions/comment.rb index 4fc8192..ab5163e 100644 --- a/lib/linkedin_orbit/interactions/comment.rb +++ b/lib/linkedin_orbit/interactions/comment.rb @@ -37,6 +37,7 @@ def construct_body { activity: { activity_type: "linkedin:comment", + tags: ["channel:linkedin"], title: "Commented on LinkedIn Post", description: construct_description, occurred_at: Time.at(@comment["created"]["time"] / 1000).utc, diff --git a/spec/interactions/comment_spec.rb b/spec/interactions/comment_spec.rb index 2a022e8..4b2e34f 100644 --- a/spec/interactions/comment_spec.rb +++ b/spec/interactions/comment_spec.rb @@ -32,7 +32,7 @@ stub_request(:post, "https://app.orbit.love/api/v1/1234/activities") .with( headers: { 'Authorization' => "Bearer 12345", 'Content-Type' => 'application/json' }, - body: "{\"activity\":{\"activity_type\":\"linkedin:comment\",\"title\":\"Commented on LinkedIn Post\",\"description\":\"LinkedIn post: \\\"Sample Title...\\\"\\n\\n\\nComment:\\n\\n\\n\\\"Sample Text\\\"\\n\",\"occurred_at\":\"2016-03-02 23:00:00 UTC\",\"key\":\"12345\",\"link\":\"https://www.linkedin.com/feed/update/urn:li:activity:6793941564394651648\",\"member\":{\"name\":\"John Smith\"}},\"identity\":{\"source\":\"linkedin\",\"name\":\"John Smith\",\"uid\":\"1234567\"}}" + body: "{\"activity\":{\"activity_type\":\"linkedin:comment\",\"tags\":[\"channel:linkedin\"],\"title\":\"Commented on LinkedIn Post\",\"description\":\"LinkedIn post: \\\"Sample Title...\\\"\\n\\n\\nComment:\\n\\n\\n\\\"Sample Text\\\"\\n\",\"occurred_at\":\"2016-03-02 23:00:00 UTC\",\"key\":\"12345\",\"link\":\"https://www.linkedin.com/feed/update/urn:li:activity:6793941564394651648\",\"member\":{\"name\":\"John Smith\"}},\"identity\":{\"source\":\"linkedin\",\"name\":\"John Smith\",\"uid\":\"1234567\"}}" ) .to_return( status: 200,