factor 0.0.87 → 0.0.88
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cli/{channel_task.rb → channel.rb} +1 -1
- data/lib/cli/{credential_task.rb → credential.rb} +1 -1
- data/lib/cli/factor.rb +27 -0
- data/lib/cli/{server_task.rb → server.rb} +1 -1
- data/lib/cli/{workflow_task.rb → workflow.rb} +1 -1
- data/lib/client/client.rb +1 -1
- metadata +6 -6
- data/lib/cli/factor_task.rb +0 -27
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
|
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"
|
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.
|
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.
|
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/
|
153
|
+
- lib/cli/channel.rb
|
154
154
|
- lib/cli/command.rb
|
155
|
-
- lib/cli/
|
156
|
-
- lib/cli/
|
157
|
-
- lib/cli/
|
158
|
-
- lib/cli/
|
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
|
data/lib/cli/factor_task.rb
DELETED
@@ -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")
|