stuka 0.0.5 → 0.0.6
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e3570d76e0a143a23f1f1c5f8a71e1f939ea0584
|
4
|
+
data.tar.gz: 0f857b0e54cdc7ce0177cdfc1e26995cc5cee7e2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 034b1cdca078f1264cd59b9cff0882b9824886cc4a9711a977fd9717090196fb952235a4a0dddef7888d68c72b7b8ee7fddbd7d861abfad5bbe10422fbaf4ec2
|
7
|
+
data.tar.gz: 13c51f8ccb9e06a1d3b389ce572b8bc3b612476a12129e2ac3e69efffd97a76701141d692e0b627b9dd3d3fd20dffcc9fcc7576ee16bc11a4fa2e8721ad69ad6
|
@@ -6,12 +6,14 @@ module Stuka
|
|
6
6
|
Dir["#{Dir.pwd}/process_definition/processes/*.rb"]
|
7
7
|
end
|
8
8
|
|
9
|
-
def
|
9
|
+
def build_processes
|
10
10
|
processes = []
|
11
11
|
gather_process_files.each do |file|
|
12
|
-
|
12
|
+
process_name = File.basename(file, ".rb")
|
13
|
+
out_file = File.new("processes/processes/#{process_name}.rb", "w")
|
14
|
+
out_file.puts("Class #{process_name}; end")
|
15
|
+
out_file.close
|
13
16
|
end
|
14
|
-
puts processes
|
15
17
|
end
|
16
18
|
|
17
19
|
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Stuka
|
2
|
+
|
3
|
+
class ProcessCleaner
|
4
|
+
|
5
|
+
def gather_process_files
|
6
|
+
Dir["#{Dir.pwd}/processes/processes/*_process.rb"]
|
7
|
+
end
|
8
|
+
|
9
|
+
def gather_action_files
|
10
|
+
Dir["#{Dir.pwd}/processes/actions/*_action.rb"]
|
11
|
+
end
|
12
|
+
|
13
|
+
def clear
|
14
|
+
files = []
|
15
|
+
files << gather_process_files
|
16
|
+
files << gather_action_files
|
17
|
+
files.each do |path|
|
18
|
+
begin
|
19
|
+
File.delete(path)
|
20
|
+
rescue SystemCallError => e
|
21
|
+
$stderr.puts e.message
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
end
|
@@ -1,7 +1,15 @@
|
|
1
|
-
task :
|
1
|
+
task :clean do
|
2
|
+
|
3
|
+
require 'stuka/internal/process_cleaner'
|
4
|
+
cl = Stuka::ProcessCleaner.new
|
5
|
+
cl.clean
|
2
6
|
|
3
|
-
|
4
|
-
|
5
|
-
|
7
|
+
end
|
8
|
+
|
9
|
+
task :build do
|
10
|
+
|
11
|
+
require 'stuka/internal/process_builder'
|
12
|
+
pb = Stuka::ProcessBuilder.new
|
13
|
+
pb.build_processes
|
6
14
|
|
7
15
|
end
|
data/lib/stuka/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stuka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Sljukic
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-09-
|
11
|
+
date: 2014-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- lib/stuka/commands/subcommands/setup/setup_tasks.rb
|
97
97
|
- lib/stuka/internal/process.rb
|
98
98
|
- lib/stuka/internal/process_builder.rb
|
99
|
+
- lib/stuka/internal/process_cleaner.rb
|
99
100
|
- lib/stuka/stuka_cli.rb
|
100
101
|
- lib/stuka/templates/configs/gemfile.tt
|
101
102
|
- lib/stuka/templates/definitions/process.tt
|
@@ -104,7 +105,6 @@ files:
|
|
104
105
|
- lib/stuka/templates/samples/my_process.tt
|
105
106
|
- lib/stuka/templates/samples/my_second_step.tt
|
106
107
|
- lib/stuka/templates/tasks/rakefile.tt
|
107
|
-
- lib/stuka/templates/tasks/stuka_tasks.tt
|
108
108
|
- lib/stuka/version.rb
|
109
109
|
- spec/new_command_spec.rb
|
110
110
|
- spec/process_command_spec.rb
|