pi 0.1.13 → 0.1.14
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.
- data/lib/cli/commands/projects.rb +50 -4
- data/lib/cli/version.rb +1 -1
- metadata +10 -10
@@ -67,13 +67,57 @@ module PI::Cli::Command
|
|
67
67
|
display "Selected Framework: ",false
|
68
68
|
display "#{framework}".green
|
69
69
|
|
70
|
-
description = ask("Please enter in the description: ")
|
71
|
-
|
70
|
+
description = ask("Please enter in the description: ")
|
71
|
+
|
72
|
+
github_info = client.github_info
|
73
|
+
|
74
|
+
if github_info[:name].empty?
|
75
|
+
manifest = {
|
72
76
|
:name => "#{projectname}",
|
73
77
|
:runtime => "#{runtime}",
|
74
78
|
:framework => "#{framework}",
|
75
79
|
:description => "#{description}"
|
76
80
|
}
|
81
|
+
else
|
82
|
+
repositoryType = nil
|
83
|
+
repositoryTypes =["cloudpi","github"]
|
84
|
+
choose do |menu|
|
85
|
+
display "=============Repository Types============"
|
86
|
+
menu.prompt = "Select Repository Type: "
|
87
|
+
menu.select_by = :index_or_name
|
88
|
+
repositoryTypes.each do |rt|
|
89
|
+
menu.choice(rt) { repositoryType = rt }
|
90
|
+
end
|
91
|
+
end
|
92
|
+
display "Selected Repository Type: ",false
|
93
|
+
display "#{repositoryType}".green
|
94
|
+
|
95
|
+
if repositoryType == "github"
|
96
|
+
isNew =nil
|
97
|
+
isNew == "yes"
|
98
|
+
publishType = nil
|
99
|
+
publishTypes =["public","private"]
|
100
|
+
choose do |menu|
|
101
|
+
display "=============Publish Types============"
|
102
|
+
menu.prompt = "Select publish Type: "
|
103
|
+
menu.select_by = :index_or_name
|
104
|
+
publishTypes.each do |pt|
|
105
|
+
menu.choice(pt) { publishType = pt }
|
106
|
+
end
|
107
|
+
end
|
108
|
+
display "Selected publish Type: ",false
|
109
|
+
display "#{publishType}".green
|
110
|
+
end
|
111
|
+
manifest = {
|
112
|
+
:name => "#{projectname}",
|
113
|
+
:runtime => "#{runtime}",
|
114
|
+
:framework => "#{framework}",
|
115
|
+
:description => "#{description}",
|
116
|
+
:repositoryType => "#{repositoryType}",
|
117
|
+
:isNew => "#{isNew}",
|
118
|
+
:publishType => "#{publishType}"
|
119
|
+
}
|
120
|
+
end
|
77
121
|
|
78
122
|
display "Creating project #{projectname}: ",false
|
79
123
|
client.create_project(projectname, manifest)
|
@@ -103,10 +147,12 @@ module PI::Cli::Command
|
|
103
147
|
|
104
148
|
def upload(projectname=nil)
|
105
149
|
file = nil
|
150
|
+
java_projects = nil
|
106
151
|
unless projectname
|
107
152
|
projects = client.projects
|
153
|
+
java_projects = projects.delete_if{ |p| p[:runtime] == "Ruby"}
|
108
154
|
err "No Projects" if projects.nil? || projects.empty?
|
109
|
-
|
155
|
+
java_projects.sort! {|a, b| a[:name] <=> b[:name] }
|
110
156
|
choose do |menu|
|
111
157
|
display "=============Project Name======="
|
112
158
|
menu.prompt = "Select Project: "
|
@@ -118,8 +164,8 @@ module PI::Cli::Command
|
|
118
164
|
display "Selected Project: ",false
|
119
165
|
display "#{projectname}".green
|
120
166
|
end
|
121
|
-
description = ask("Please enter in the description: ")
|
122
167
|
version = ask("Please enter the version: ")
|
168
|
+
description = ask("Please enter in the description: ")
|
123
169
|
|
124
170
|
path = nil
|
125
171
|
loop{
|
data/lib/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 7
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 14
|
10
|
+
version: 0.1.14
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Samsung
|
@@ -146,20 +146,20 @@ extra_rdoc_files:
|
|
146
146
|
files:
|
147
147
|
- README
|
148
148
|
- Rakefile
|
149
|
-
- lib/cli
|
149
|
+
- lib/cli.rb
|
150
|
+
- lib/cli/runner.rb
|
151
|
+
- lib/cli/core_ext.rb
|
150
152
|
- lib/cli/version.rb
|
153
|
+
- lib/cli/config.rb
|
154
|
+
- lib/cli/usage.rb
|
151
155
|
- lib/cli/errors.rb
|
152
|
-
- lib/cli/core_ext.rb
|
153
|
-
- lib/cli/commands/misc.rb
|
154
156
|
- lib/cli/commands/base.rb
|
155
157
|
- lib/cli/commands/user.rb
|
156
158
|
- lib/cli/commands/projects.rb
|
157
|
-
- lib/cli/
|
158
|
-
- lib/cli/usage.rb
|
159
|
+
- lib/cli/commands/misc.rb
|
159
160
|
- lib/pi.rb
|
160
161
|
- lib/pi/const.rb
|
161
162
|
- lib/pi/client.rb
|
162
|
-
- lib/cli.rb
|
163
163
|
- bin/pi
|
164
164
|
homepage: http://www.samsungcloud.org/
|
165
165
|
licenses: []
|
@@ -190,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
190
|
requirements: []
|
191
191
|
|
192
192
|
rubyforge_project:
|
193
|
-
rubygems_version: 1.8.
|
193
|
+
rubygems_version: 1.8.24
|
194
194
|
signing_key:
|
195
195
|
specification_version: 3
|
196
196
|
summary: Commandline tool that provides access to Samsung Cloud Platform.
|