factor 0.0.87 → 0.0.88

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.
@@ -5,7 +5,7 @@ require 'zip/zipfilesystem'
5
5
 
6
6
  module Factor
7
7
  module CLI
8
- class ChannelTask < Command
8
+ class Channel < Command
9
9
 
10
10
  desc "call CHANNEL METHOD TARGET","start a workflow"
11
11
  method_option :parameters, :type=>:hash, :default=>{}, :required=>false
@@ -3,7 +3,7 @@ require 'cli/command'
3
3
 
4
4
  module Factor
5
5
  module CLI
6
- class CredentialTask < Command
6
+ class Credential < Command
7
7
 
8
8
  desc "list [KEY]", "list all the credentials"
9
9
  #method_option :key, :alias=>"-k", :type=>:string, :desc=>"key reference"
data/lib/cli/factor.rb ADDED
@@ -0,0 +1,27 @@
1
+ require 'rubygems'
2
+ require 'cli/command'
3
+ require 'cli/server'
4
+ require 'cli/workflow'
5
+ require 'cli/credential'
6
+
7
+ module Factor
8
+ module CLI
9
+ class Factor < Command
10
+
11
+ desc "login EMAIL TOKEN", "login with token"
12
+ # method_option :email, :alias=>"-e", :type=>:string, :desc=>"Email address for Factor account", :required=>true
13
+ # method_option :token, :alias=>"-t", :type=>:string, :desc=>"Token value to set", :required=>true
14
+ def login(email,token)
15
+ config = get_config
16
+ config[:email]=email
17
+ config[:token]=token
18
+ save_config(config)
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+ Factor::CLI::FactorTask.register(Factor::CLI::Server, "server","server","start and list servers")
25
+ Factor::CLI::FactorTask.register(Factor::CLI::Workflow,"workflow","workflow","start and list workflows")
26
+ Factor::CLI::FactorTask.register(Factor::CLI::Channel,"channel","channel","install,uninstall, list channels")
27
+ Factor::CLI::FactorTask.register(Factor::CLI::Credential,"credential","credential","manage remote credential store")
@@ -3,7 +3,7 @@ require 'cli/command'
3
3
 
4
4
  module Factor
5
5
  module CLI
6
- class ServerTask < Command
6
+ class Server < Command
7
7
  desc "start", "start the server"
8
8
  method_option :tags, :alias=>"-t", :type=>:hash, :desc=>"Optional tags to identify from workflow"
9
9
  method_option :channels, :type=>:array, :desc=>"Optional channel ruby file list for development"
@@ -3,7 +3,7 @@ require 'cli/command'
3
3
 
4
4
  module Factor
5
5
  module CLI
6
- class WorkflowTask < Command
6
+ class Workflow < Command
7
7
 
8
8
  desc "call WORKFLOW","start a workflow"
9
9
  method_option :parameters, :type=>:hash, :default=>{}, :required=>false
data/lib/client/client.rb CHANGED
@@ -61,7 +61,7 @@ module Factor
61
61
  uri = URI.parse(channel['zip_url'])
62
62
 
63
63
  # temp file to store the zip for download
64
- temp_file = Tempfile.new(uri.path, :encoding => 'ascii-8bit')
64
+ temp_file = Tempfile.new([uri.to_s.gsub(/\W+/,'-'), '.zip'], :encoding => 'ascii-8bit')
65
65
 
66
66
  # temp directory where zip will be decompressed
67
67
  unzip_dir=temp_file.path[0..-5]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.87
4
+ version: 0.0.88
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -150,12 +150,12 @@ files:
150
150
  - lib/channel/channel.rb
151
151
  - lib/channel/event.rb
152
152
  - lib/channel/trigger.rb
153
- - lib/cli/channel_task.rb
153
+ - lib/cli/channel.rb
154
154
  - lib/cli/command.rb
155
- - lib/cli/credential_task.rb
156
- - lib/cli/factor_task.rb
157
- - lib/cli/server_task.rb
158
- - lib/cli/workflow_task.rb
155
+ - lib/cli/credential.rb
156
+ - lib/cli/factor.rb
157
+ - lib/cli/server.rb
158
+ - lib/cli/workflow.rb
159
159
  - lib/client/client.rb
160
160
  - lib/factor.rb
161
161
  - lib/runtime/attributes.rb
@@ -1,27 +0,0 @@
1
- require 'rubygems'
2
- require 'cli/command'
3
- require 'cli/server_task'
4
- require 'cli/workflow_task'
5
- require 'cli/credential_task'
6
-
7
- module Factor
8
- module CLI
9
- class FactorTask < Command
10
-
11
- desc "login EMAIL TOKEN", "login with token"
12
- # method_option :email, :alias=>"-e", :type=>:string, :desc=>"Email address for Factor account", :required=>true
13
- # method_option :token, :alias=>"-t", :type=>:string, :desc=>"Token value to set", :required=>true
14
- def login(email,token)
15
- config = get_config
16
- config[:email]=email
17
- config[:token]=token
18
- save_config(config)
19
- end
20
- end
21
- end
22
- end
23
-
24
- Factor::CLI::FactorTask.register(Factor::CLI::ServerTask, "server","server","start and list servers")
25
- Factor::CLI::FactorTask.register(Factor::CLI::WorkflowTask,"workflow","workflow","start and list workflows")
26
- Factor::CLI::FactorTask.register(Factor::CLI::ChannelTask,"channel","channel","install,uninstall, list channels")
27
- Factor::CLI::FactorTask.register(Factor::CLI::CredentialTask,"credential","credential","manage remote credential store")