codegears 0.0.3.pre → 0.0.4.pre
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/codegears.gemspec +1 -0
- data/lib/cg/command/app.rb +21 -2
- data/lib/cg/version.rb +1 -1
- metadata +17 -1
data/codegears.gemspec
CHANGED
data/lib/cg/command/app.rb
CHANGED
@@ -1,7 +1,26 @@
|
|
1
|
+
require "httparty"
|
2
|
+
require "colorize"
|
3
|
+
|
1
4
|
module Command
|
2
5
|
class App
|
3
|
-
|
4
|
-
|
6
|
+
include HTTParty
|
7
|
+
|
8
|
+
URL = "http://localhost:3000/apps"
|
9
|
+
|
10
|
+
def self.create!(email = "")
|
11
|
+
response = self.post(URL, :body => { :application => { :email => email } })
|
12
|
+
if response["success"] == false
|
13
|
+
response["errors"].each do |k,v|
|
14
|
+
puts "#{k.capitalize} #{v.first}\n".red
|
15
|
+
end
|
16
|
+
else
|
17
|
+
puts "Application successfully created.\n".green
|
18
|
+
puts "Add the following lines to the file config/initializers/codegears.rb:\n".green
|
19
|
+
puts " CG::App.id(\"#{response['id']}\")".green
|
20
|
+
puts " CG::App.secret_id(\"#{response['secret_id']}\")".green
|
21
|
+
puts " CG::App.secret_token(\"#{response['secret_token']}\")\n".green
|
22
|
+
puts "And restart application to start using the CodeGears platform.\n".green
|
23
|
+
end
|
5
24
|
end
|
6
25
|
end
|
7
26
|
end
|
data/lib/cg/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: codegears
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4.pre
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -59,6 +59,22 @@ dependencies:
|
|
59
59
|
- - ! '>='
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: colorize
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :runtime
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
62
78
|
description: Client library and CLI to manage apps on CodeGears
|
63
79
|
email:
|
64
80
|
- js@codegears.co
|