pipedream 0.4.7 → 0.4.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f0a2c188404c51d550c70927ebaea42cf50c1ce88e7c227c0b77e9b47a2d4627
4
- data.tar.gz: 649e237922e45576283dc4fd0bfd21095a22f547db8efb1f79a1a68c43ca6c6e
3
+ metadata.gz: 9512b3e0690a2fdd0ef58cee7be1b6229851969b1a338bb85f0a6d882c491095
4
+ data.tar.gz: be61616a96fd760be544d1a6b45df2f6a0cb3fe8b1d9a7bafe37e551d5e226a3
5
5
  SHA512:
6
- metadata.gz: c6ea79d68551285fd993784daaa300b895fae41f78de44c6ed91c6f35ef6201410d603fbcdb5e6ab22514d5863d7927ce19f49275fa0870be40a7824a2905c09
7
- data.tar.gz: 20104cc2c78c9063747f5181fe1bdf6872b56b462c043698581099802f0cf130fc389db4c5268be9a86054eb18805702a1ca5f0e5fe409f8b7687153de7e1543
6
+ metadata.gz: f7627fec4faca9f46c264f6446686c074a6ec41b1f5034fb309570033663d90652ef34f7792cd0d5196e58ad123ccb56630eb130ef30246f341cf1b79f2025fe
7
+ data.tar.gz: 0fdc73a1ad168ce76c793bd3e23e277a27450f843704680faa9bab3a2f31a320e86948197dab252a257fb4f41d36bed64625142ed824c8a0ed55d3ea8372d4e3
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  This project *loosely* adheres to [Semantic Versioning](http://semver.org/), even before v1.0.
5
5
 
6
+ ## [0.4.8] - 2022-01-07
7
+ - [#5](https://github.com/boltops-tools/pipedream/pull/5) improvements for multiple sources and in_parallel method
8
+
6
9
  ## [0.4.7] - 2021-12-29
7
10
  - add rexml dependency
8
11
 
@@ -5,7 +5,6 @@ module Pipedream
5
5
  end
6
6
 
7
7
  def run
8
- puts "build"
9
8
  options = @options
10
9
  Pipeline.new(options).run
11
10
  end
@@ -12,7 +12,7 @@ module Pipedream::Dsl::Pipeline
12
12
  run_order: @run_order,
13
13
  # configuration: { project_name: '' }, # will be set
14
14
  # output_artifacts: [name: "BuildArtifact#{name}"], # TODO: maybe make this configurable with a setting
15
- input_artifacts: [name: "SourceArtifact"],
15
+ input_artifacts: [name: "MainArtifact"],
16
16
  }
17
17
 
18
18
  actions = projects.map do |item|
@@ -32,6 +32,7 @@ module Pipedream::Dsl::Pipeline
32
32
  item[:configuration] = { project_name: project_name }
33
33
  end
34
34
 
35
+ item[:name] ||= project_name
35
36
  item.reverse_merge(default)
36
37
  end
37
38
  end
@@ -13,8 +13,10 @@ module Pipedream::Dsl::Pipeline
13
13
  o_auth_token = props.delete(:auth_token)
14
14
  poll_for_source_changes = props.delete(:poll_for_source_changes) || "false"
15
15
 
16
+ source_name = props.delete(:source_name) || "Main"
17
+
16
18
  default = {
17
- name: "Source",
19
+ name: source_name,
18
20
  action_type_id: {
19
21
  category: "Source",
20
22
  owner: "ThirdParty",
@@ -29,7 +31,7 @@ module Pipedream::Dsl::Pipeline
29
31
  poll_for_source_changes: poll_for_source_changes,
30
32
  repo: repo,
31
33
  },
32
- output_artifacts: [name: "SourceArtifact"]
34
+ output_artifacts: [name: "#{source_name}Artifact"]
33
35
  }
34
36
  action(props.reverse_merge(default))
35
37
  end
@@ -9,6 +9,7 @@ module Pipedream::Dsl
9
9
  artifact_store
10
10
  artifact_stores
11
11
  disable_inboundstage_transitions
12
+ input_artifacts
12
13
  name
13
14
  restart_execution_on_update
14
15
  role_arn
@@ -20,6 +21,10 @@ module Pipedream::Dsl
20
21
  end
21
22
  end
22
23
 
24
+ def pipeline_name
25
+ @options[:pipeline_name]
26
+ end
27
+
23
28
  def stage(name, &block)
24
29
  # Reset values for each stage declaraion
25
30
  @run_order = 1
@@ -29,9 +34,15 @@ module Pipedream::Dsl
29
34
  block.call
30
35
  end
31
36
 
37
+ def in_parallel
38
+ @in_parallel = true
39
+ yield
40
+ @in_parallel = false
41
+ end
42
+
32
43
  def action(*props)
33
44
  @current_stage[:actions] += props
34
- @run_order += 1
45
+ @run_order += 1 unless @in_parallel
35
46
  end
36
47
  end
37
48
  end
@@ -1,3 +1,3 @@
1
1
  module Pipedream
2
- VERSION = "0.4.7"
2
+ VERSION = "0.4.8"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pipedream
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.7
4
+ version: 0.4.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-12-29 00:00:00.000000000 Z
11
+ date: 2022-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport