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

Commit fe1121d

Browse files
committed
pipedream gem -> pdsdk in prep for rubygems
1 parent a3b887a commit fe1121d

File tree

9 files changed

+22
-22
lines changed

9 files changed

+22
-22
lines changed

ruby/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
# sdk:ruby
22

33
```ruby
4-
require "pipedream"
4+
require "pdsdk"
55

6-
Pipedream.send_event(API_KEY, hello: "world")
6+
Pdsdk.send_event(API_KEY, hello: "world")
77

88
# with exports
9-
Pipedream.send_event(API_KEY, {
9+
Pdsdk.send_event(API_KEY, {
1010
hello: "world"
1111
}, exports: {
1212
event: { hello: "world!" },
@@ -23,7 +23,7 @@ Setup: https://help.github.com/en/articles/configuring-rubygems-for-use-with-git
2323
To cut new version (TODO automate this):
2424

2525
```
26-
# update lib/pipedream/version.rb to $VERSION
27-
gem build pipedream.gemspec
28-
gem push --key github --host https://rubygems.pkg.github.com/PipedreamHQ pipedream-$VERSION.gem
26+
# update lib/pdsdk/version.rb to $VERSION
27+
gem build pdsdk.gemspec
28+
gem push pdsdk-$VERSION.gem
2929
```

ruby/lib/pdsdk.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require "pdsdk/base"

ruby/lib/pipedream/base.rb renamed to ruby/lib/pdsdk/base.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
require "pipedream/version"
2-
require "pipedream/logger"
1+
require "pdsdk/version"
2+
require "pdsdk/logger"
33
require "json"
44

5-
module Pipedream
5+
module Pdsdk
66
class Error < StandardError
77
end
88

@@ -49,7 +49,7 @@ def send_event(api_key, raw_event, opts={})
4949
headers = {
5050
"user-agent" => "pipedream-sdk:ruby/1",
5151
"content-type" => "application/json",
52-
"x-pd-sdk-version" => Pipedream::VERSION,
52+
"x-pd-sdk-version" => Pdsdk::VERSION,
5353
}
5454
headers["x-pd-sig"] = "sha256=#{OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), @secret_key, payload)}" if @secret_key
5555
req = Net::HTTP::Post.new(uri.request_uri, headers)
@@ -71,7 +71,7 @@ def load_metadata(metadata_path, merge_data)
7171
git_ref = `git rev-parse HEAD`.strip rescue nil
7272
metadata[:git_ref] = git_ref if !git_ref.blank?
7373
end
74-
metadata[:pdsdk_version] = Pipedream::VERSION
74+
metadata[:pdsdk_version] = Pdsdk::VERSION
7575
metadata[:started_at] = Time.now.to_f
7676
metadata[:name] = ENV["PD_METADATA_NAME"] || `hostname`.strip
7777
metadata.merge!(merge_data) # XXX deep?
@@ -80,4 +80,4 @@ def load_metadata(metadata_path, merge_data)
8080
end
8181
end
8282

83-
Pipedream.bootstrap!
83+
Pdsdk.bootstrap!
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module Pipedream
1+
module Pdsdk
22
class Base
33
end
44
end

ruby/lib/pipedream/logger.rb renamed to ruby/lib/pdsdk/logger.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
require "logger"
22

3-
module Pipedream
3+
module Pdsdk
44
class Logger < ::Logger
5-
LOG_PREFIX = "** [Pipedream] ".freeze
6-
PROGNAME = "pipedream"
5+
LOG_PREFIX = "** [pdsdk] ".freeze
6+
PROGNAME = "pdsdk"
77

88
def initialize(*)
99
super

ruby/lib/pdsdk/version.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module Pdsdk
2+
VERSION = "0.3.0"
3+
end

ruby/lib/pipedream.rb

Lines changed: 0 additions & 1 deletion
This file was deleted.

ruby/lib/pipedream/version.rb

Lines changed: 0 additions & 3 deletions
This file was deleted.

ruby/pipedream.gemspec renamed to ruby/pdsdk.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__)
2-
require "pipedream/version"
2+
require "pdsdk/version"
33

44
Gem::Specification.new do |g|
55
g.name = "pipedream"
6-
g.version = Pipedream::VERSION
6+
g.version = Pdsdk::VERSION
77
g.date = "2019-10-14"
88
g.summary = g.description = "Pipedream SDK"
99
g.authors = ["Pipedream Team"]

0 commit comments

Comments
 (0)