tane 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/tane/commands/create.rb +36 -13
- data/lib/tane/commands/email.rb +4 -2
- data/lib/tane/commands/exec.rb +3 -3
- data/lib/tane/commands/init.rb +1 -1
- data/lib/tane/commands/login.rb +5 -5
- data/lib/tane/commands/support.rb +5 -5
- data/lib/tane/helpers.rb +26 -26
- data/lib/tane/helpers/{bushido_helper.rb → cloudfuji_helper.rb} +7 -7
- data/lib/tane/helpers/init_helper.rb +17 -17
- data/lib/tane/version.rb +2 -1
- data/spec/commands/email_spec.rb +2 -2
- data/spec/commands/event_spec.rb +1 -1
- data/spec/commands/exec_spec.rb +1 -1
- data/spec/commands/support_spec.rb +6 -6
- data/spec/fixtures/credentials.yml +1 -1
- data/spec/helpers/{bushido_helper_spec.rb → cloudfuji_helper_spec.rb} +18 -18
- data/spec/helpers/init_helper_spec.rb +11 -11
- data/spec/helpers_spec.rb +35 -35
- data/tane.gemspec +5 -5
- metadata +92 -102
data/lib/tane/commands/create.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'fileutils'
|
2
|
+
|
1
3
|
class Tane::Commands::Create < Tane::Commands::Base
|
2
4
|
class << self
|
3
5
|
def process(args)
|
@@ -6,20 +8,25 @@ class Tane::Commands::Create < Tane::Commands::Base
|
|
6
8
|
verbose_say("done!")
|
7
9
|
|
8
10
|
app_name = args[0] ||= term.ask("Please enter a name for your new app: ") { |app_name| app_name }
|
9
|
-
|
11
|
+
target_path = term.ask("Create app in path (defaults to [#{Dir.pwd}/#{app_name}]: ")
|
12
|
+
target_path = "#{Dir.pwd}/#{app_name}" if target_path.to_s == ""
|
13
|
+
|
14
|
+
template_url = ENV['KIMONO_URL'] || "https://raw.github.com/Cloudfuji/kimono/master/kimono.rb"
|
15
|
+
|
16
|
+
print "Creating a new Cloudfuji rails app in #{ target_path } (please wait, it'll take a few minutes) ... "
|
10
17
|
|
11
|
-
|
18
|
+
FileUtils.mkdir_p target_path
|
12
19
|
|
13
20
|
start_throbber!
|
14
21
|
|
15
22
|
File.open("tane.log", "w") do |file|
|
16
|
-
IO.popen("rails new #{
|
23
|
+
IO.popen("rails _#{Tane::RAILS_VERSION}_ new #{ target_path } --quiet --template=#{ template_url } 2>&1 /dev/null", :error => [:child, :out]) do |io|
|
17
24
|
file.puts(io.read)
|
18
25
|
end
|
19
26
|
end
|
20
|
-
verbose_say("Finished creating rails app, initializing
|
27
|
+
verbose_say("Finished creating rails app, initializing Cloudfuji resources...")
|
21
28
|
|
22
|
-
Dir.chdir("
|
29
|
+
Dir.chdir("#{ target_path }")do
|
23
30
|
File.open("tane.log", "w") do |file|
|
24
31
|
verbose = "--verbose" if opts.verbose
|
25
32
|
verbose ||= ""
|
@@ -47,16 +54,32 @@ class Tane::Commands::Create < Tane::Commands::Base
|
|
47
54
|
success_message = success_messages[ rand(success_messages.length) ]
|
48
55
|
bushiren = bushirens [ rand(bushirens.length) ]
|
49
56
|
|
50
|
-
FileUtils.mv("./tane.log", "
|
57
|
+
FileUtils.mv("./tane.log", "#{ target_path }/log/tane.log")
|
51
58
|
term.say " Finished successfully!"
|
52
|
-
term.say "Your app is now in
|
59
|
+
term.say "Your app is now in #{ target_path }"
|
53
60
|
|
54
61
|
|
55
|
-
Dir.chdir("
|
56
|
-
term.say "Launching your new app!"
|
57
|
-
term.say "Check out once rails has finished booting http://localhost:3000"
|
58
|
-
term.say "#{bushiren} says, \"#{ success_message }\""
|
62
|
+
Dir.chdir("#{ target_path }") do
|
59
63
|
begin
|
64
|
+
term.say "Migrating your new app to setup the basic models..."
|
65
|
+
suppress_env_vars("BUNDLE_BIN_PATH", "BUNDLE_GEMFILE", "RUBYOPT") do
|
66
|
+
verbose_say("migrating database!")
|
67
|
+
system("bundle exec tane exec rake db:migrate")
|
68
|
+
end
|
69
|
+
|
70
|
+
File.open(".gitignore", "a") { |gitignore| gitignore.puts(".cloudfuji/tane.yml" ) }
|
71
|
+
|
72
|
+
term.say "Initializing git repo..."
|
73
|
+
suppress_env_vars("BUNDLE_BIN_PATH", "BUNDLE_GEMFILE", "RUBYOPT") do
|
74
|
+
verbose_say("initializing git repo")
|
75
|
+
system("git init")
|
76
|
+
system("git add .")
|
77
|
+
end
|
78
|
+
|
79
|
+
term.say "Launching your new app!"
|
80
|
+
term.say "Check out once rails has finished booting http://localhost:3000"
|
81
|
+
term.say "#{bushiren} says, \"#{ success_message }\""
|
82
|
+
|
60
83
|
# Do this in the background, it'll wait up to 120 seconds
|
61
84
|
# for the rails server to start up and launch a browser as
|
62
85
|
# soon as it's ready
|
@@ -69,7 +92,7 @@ class Tane::Commands::Create < Tane::Commands::Base
|
|
69
92
|
exec("bundle exec tane exec rails s")
|
70
93
|
end
|
71
94
|
rescue Exception => ex
|
72
|
-
term.say "Oh no we tried to launch the app but failed. Please try launching it yourself with \n bundle exec tane exec rails s \n if you have problems let us know at support@
|
95
|
+
term.say "Oh no we tried to launch the app but failed. Please try launching it yourself with \n bundle exec tane exec rails s \n if you have problems let us know at support@cloudfuji.com"
|
73
96
|
end
|
74
97
|
end
|
75
98
|
|
@@ -81,7 +104,7 @@ Usage:
|
|
81
104
|
|
82
105
|
tane create 'app_name'
|
83
106
|
|
84
|
-
Creates a new
|
107
|
+
Creates a new Cloudfuji-enabled rails app from scratch and launches it. Use this to get started with Cloudfuji quickly and easily
|
85
108
|
|
86
109
|
tane create my_example_app
|
87
110
|
EOL
|
data/lib/tane/commands/email.rb
CHANGED
@@ -10,7 +10,7 @@ class Tane::Commands::Email < Tane::Commands::Base
|
|
10
10
|
|
11
11
|
def list_email_templates
|
12
12
|
email_templates = Dir["#{email_templates_path}/*.yml"]
|
13
|
-
"#{email_templates.count} email templates found for this app:"
|
13
|
+
term.say "#{email_templates.count} email templates found for this app:"
|
14
14
|
email_templates.each { |template| term.say template }
|
15
15
|
end
|
16
16
|
|
@@ -18,13 +18,15 @@ class Tane::Commands::Email < Tane::Commands::Base
|
|
18
18
|
email = render_email(email_name)
|
19
19
|
|
20
20
|
if email.nil?
|
21
|
-
term.say "Couldn't find any email with the title '#{email_name}', are you sure there is a .
|
21
|
+
term.say "Couldn't find any email with the title '#{email_name}', are you sure there is a .cloudfuji/emails/#{email_name}.yml? "
|
22
22
|
term.say "Here are the email templates for this app..."
|
23
23
|
list_email_templates
|
24
24
|
|
25
25
|
exit 1
|
26
26
|
end
|
27
27
|
|
28
|
+
email = email[email_name]
|
29
|
+
|
28
30
|
post(mail_url, email)
|
29
31
|
end
|
30
32
|
|
data/lib/tane/commands/exec.rb
CHANGED
@@ -3,7 +3,7 @@ class Tane::Commands::Exec < Tane::Commands::Base
|
|
3
3
|
class << self
|
4
4
|
def process(args)
|
5
5
|
authenticate_user
|
6
|
-
|
6
|
+
cloudfuji_envs.each_pair do |key, value|
|
7
7
|
ENV[key] = value
|
8
8
|
end
|
9
9
|
|
@@ -25,11 +25,11 @@ Usage:
|
|
25
25
|
|
26
26
|
tane exec any_command
|
27
27
|
|
28
|
-
Executes any command specified in a simulated
|
28
|
+
Executes any command specified in a simulated Cloudfuji environment. The following example shows you how to run rails applications.
|
29
29
|
|
30
30
|
tane exec rails s
|
31
31
|
|
32
|
-
This is how you should be running
|
32
|
+
This is how you should be running Cloudfuji rails applications locally. All the configuration required for `tane exec` is obtained from `.cloudfuji` directory in the current directory. This can only be used if `tane init` has been run in the current directory.
|
33
33
|
EOL
|
34
34
|
end
|
35
35
|
end
|
data/lib/tane/commands/init.rb
CHANGED
@@ -21,7 +21,7 @@ Usage:
|
|
21
21
|
|
22
22
|
tane init
|
23
23
|
|
24
|
-
Creates a `.
|
24
|
+
Creates a `.cloudfuji` directory within the directory of the rails application. That holds all the config that enables you to run applications and commands in a Cloudfuji environment. It also deploys a development application on Cloudfuji that allows your local application to use resources on the Cloudfuji platform.
|
25
25
|
EOL
|
26
26
|
end
|
27
27
|
end
|
data/lib/tane/commands/login.rb
CHANGED
@@ -22,8 +22,8 @@ class Tane::Commands::Login < Tane::Commands::Base
|
|
22
22
|
|
23
23
|
|
24
24
|
def verify_or_signup(email, password)
|
25
|
-
term.say "contacting
|
26
|
-
auth_token, errors = Tane::Helpers::
|
25
|
+
term.say "contacting cloudfuji, please wait..."
|
26
|
+
auth_token, errors = Tane::Helpers::Cloudfuji.verify_credentials(email, password)
|
27
27
|
|
28
28
|
return auth_token if not auth_token.nil?
|
29
29
|
|
@@ -40,7 +40,7 @@ class Tane::Commands::Login < Tane::Commands::Base
|
|
40
40
|
|
41
41
|
def signup_and_notify(email, password)
|
42
42
|
term.say "Trying to sign up with those credentials..."
|
43
|
-
auth_token, errors = Tane::Helpers::
|
43
|
+
auth_token, errors = Tane::Helpers::Cloudfuji.signup(email, password)
|
44
44
|
|
45
45
|
display_errors_and_exit(errors) if auth_token.nil?
|
46
46
|
|
@@ -67,7 +67,7 @@ class Tane::Commands::Login < Tane::Commands::Base
|
|
67
67
|
"Please try one of the following:",
|
68
68
|
"\t1. Log in again with different credentials",
|
69
69
|
"\t2. Send us a help message from the command line via `tane support 'Hey guys, having trouble logging in with tane...'`",
|
70
|
-
"\t3. Contact us by email at support@
|
70
|
+
"\t3. Contact us by email at support@gocloudfuji.com if you're having trouble!",
|
71
71
|
"Seriously, isn't it cool to be able to send a support message straight from the cli? It's like you're the fonz"]
|
72
72
|
|
73
73
|
messages.each do |message|
|
@@ -83,7 +83,7 @@ Usage:
|
|
83
83
|
|
84
84
|
tane login
|
85
85
|
|
86
|
-
Logs you into the
|
86
|
+
Logs you into the Cloudfuji and stores the credentials in `~/.cloudfuji/credentials.yml` file. It only stores your email and an authentication token. Your password is not stored. This is required if you want to run local applications in a Cloudfuji environment. It prompts you to signup if you do not have a Cloudfuji account.
|
87
87
|
EOL
|
88
88
|
end
|
89
89
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
class Tane::Commands::Support < Tane::Commands::Base
|
2
2
|
class << self
|
3
3
|
def process(args)
|
4
|
-
message = term.ask("Your message to the
|
5
|
-
|
4
|
+
message = term.ask("Your message to the Cloudfuji clan: ")
|
5
|
+
send_message_to_cloudfuji(message)
|
6
6
|
end
|
7
7
|
|
8
|
-
def
|
8
|
+
def send_message_to_cloudfuji(message)
|
9
9
|
support_data = {}
|
10
10
|
support_data[:source] = "tane"
|
11
11
|
support_data[:email] = email_from_credentials_or_prompt
|
@@ -13,7 +13,7 @@ class Tane::Commands::Support < Tane::Commands::Base
|
|
13
13
|
|
14
14
|
RestClient.post support_url, support_data
|
15
15
|
|
16
|
-
term.say("Send the
|
16
|
+
term.say("Send the cloudfuji team your message:")
|
17
17
|
term.say("\t#{message}")
|
18
18
|
term.say("Boy are they gonna be excited to hear from you, #{support_data[:email]}")
|
19
19
|
end
|
@@ -29,7 +29,7 @@ Usage:
|
|
29
29
|
|
30
30
|
tane support
|
31
31
|
|
32
|
-
Prompts you for a message to send to the
|
32
|
+
Prompts you for a message to send to the Cloudfuji team.
|
33
33
|
EOL
|
34
34
|
end
|
35
35
|
end
|
data/lib/tane/helpers.rb
CHANGED
@@ -25,12 +25,12 @@ module Tane
|
|
25
25
|
@opts ||= OpenStruct.new
|
26
26
|
end
|
27
27
|
|
28
|
-
def
|
29
|
-
ENV['
|
28
|
+
def cloudfuji_url
|
29
|
+
ENV['CLOUDFUJI_URL'] || "http://cloudfuji.com"
|
30
30
|
end
|
31
31
|
|
32
|
-
def
|
33
|
-
"#{ENV['HOME']}/.
|
32
|
+
def cloudfuji_dir
|
33
|
+
"#{ENV['HOME']}/.cloudfuji"
|
34
34
|
end
|
35
35
|
|
36
36
|
def email_template_file_path(template_name)
|
@@ -38,15 +38,15 @@ module Tane
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def email_templates_path
|
41
|
-
".
|
41
|
+
".cloudfuji/emails"
|
42
42
|
end
|
43
43
|
|
44
44
|
def tane_file_path
|
45
|
-
".
|
45
|
+
".cloudfuji/tane.yml"
|
46
46
|
end
|
47
47
|
|
48
48
|
def credentials_file_path
|
49
|
-
"#{
|
49
|
+
"#{cloudfuji_dir}/credentials.yml"
|
50
50
|
end
|
51
51
|
|
52
52
|
def credentials
|
@@ -65,15 +65,15 @@ module Tane
|
|
65
65
|
Dir.exists?('./rails') || Dir.exists?('./script')
|
66
66
|
end
|
67
67
|
|
68
|
-
def
|
69
|
-
File.exists?('.
|
68
|
+
def cloudfuji_app_exists?
|
69
|
+
File.exists?('.cloudfuji/tane.yml') and File.directory?('.cloudfuji/emails')
|
70
70
|
end
|
71
71
|
|
72
72
|
def username
|
73
73
|
begin
|
74
74
|
return credentials[:username]
|
75
75
|
rescue
|
76
|
-
term.say "Looks like your
|
76
|
+
term.say "Looks like your Cloudfuji credentials file is corrupted - try deleting ~/.cloudfuji/credentials.yml and then logging in again"
|
77
77
|
exit 1
|
78
78
|
end
|
79
79
|
end
|
@@ -82,22 +82,22 @@ module Tane
|
|
82
82
|
begin
|
83
83
|
return credentials[:password]
|
84
84
|
rescue
|
85
|
-
term.say "Looks like your
|
85
|
+
term.say "Looks like your Cloudfuji credentials file is corrupted - try deleting ~/.cloudfuji/credentials.yml and then logging in again"
|
86
86
|
exit 1
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
90
|
-
def
|
91
|
-
FileUtils.mkdir_p
|
90
|
+
def make_global_cloudfuji_dir
|
91
|
+
FileUtils.mkdir_p cloudfuji_dir
|
92
92
|
end
|
93
93
|
|
94
|
-
def
|
95
|
-
if
|
96
|
-
term.say("There's already a
|
94
|
+
def make_app_cloudfuji_dir
|
95
|
+
if cloudfuji_app_exists?
|
96
|
+
term.say("There's already a Cloudfuji app created for this local rails app. If you'd like to create a new one, please remove the .cloudfuji file in this directory")
|
97
97
|
|
98
98
|
exit 1
|
99
99
|
else
|
100
|
-
FileUtils.mkdir_p '.
|
100
|
+
FileUtils.mkdir_p '.cloudfuji/emails'
|
101
101
|
end
|
102
102
|
end
|
103
103
|
|
@@ -111,7 +111,7 @@ module Tane
|
|
111
111
|
new_credentials = credentials rescue {}
|
112
112
|
new_credentials[:username] = username
|
113
113
|
new_credentials[:password] = password
|
114
|
-
Dir.mkdir(
|
114
|
+
Dir.mkdir(cloudfuji_dir) unless File.exists?(cloudfuji_dir)
|
115
115
|
File.open(credentials_file_path, 'w+') { |file| file.puts YAML.dump(new_credentials) }
|
116
116
|
end
|
117
117
|
|
@@ -123,7 +123,7 @@ module Tane
|
|
123
123
|
|
124
124
|
def warn_if_credentials
|
125
125
|
if logged_in?
|
126
|
-
if term.agree("This computer already has the
|
126
|
+
if term.agree("This computer already has the Cloudfuji user '#{username}' logged in, are you sure you would like to proceed? Y/N")
|
127
127
|
term.say("Ok, continuing along like nothing happened")
|
128
128
|
else
|
129
129
|
term.say("Phew, I think we might have dodged a bullet there!")
|
@@ -132,8 +132,8 @@ module Tane
|
|
132
132
|
end
|
133
133
|
end
|
134
134
|
|
135
|
-
def
|
136
|
-
YAML.load(ERB.new(File.read( '.
|
135
|
+
def cloudfuji_envs
|
136
|
+
YAML.load(ERB.new(File.read( '.cloudfuji/tane.yml' )).result)
|
137
137
|
end
|
138
138
|
|
139
139
|
def base_url
|
@@ -141,23 +141,23 @@ module Tane
|
|
141
141
|
end
|
142
142
|
|
143
143
|
def data_url
|
144
|
-
"#{base_url}/
|
144
|
+
"#{base_url}/cloudfuji/data"
|
145
145
|
end
|
146
146
|
|
147
147
|
def support_url
|
148
|
-
"#{
|
148
|
+
"#{cloudfuji_url}/support/v1/message"
|
149
149
|
end
|
150
150
|
|
151
151
|
def envs_url
|
152
|
-
"#{base_url}/
|
152
|
+
"#{base_url}/cloudfuji/envs"
|
153
153
|
end
|
154
154
|
|
155
155
|
def mail_url
|
156
|
-
"#{base_url}/
|
156
|
+
"#{base_url}/cloudfuji/mail"
|
157
157
|
end
|
158
158
|
|
159
159
|
def post(url, data)
|
160
|
-
data['key'] =
|
160
|
+
data['key'] = cloudfuji_envs["CLOUDFUJI_APP_KEY"]
|
161
161
|
|
162
162
|
verbose_say("RestClient.put #{url}, #{data.inspect}, :content_type => :json, :accept => :json)")
|
163
163
|
result = JSON(RestClient.put url, data, :content_type => :json, :accept => :json)
|
@@ -1,16 +1,16 @@
|
|
1
|
-
class Tane::Helpers::
|
1
|
+
class Tane::Helpers::Cloudfuji
|
2
2
|
include Tane::Helpers
|
3
3
|
|
4
4
|
class << self
|
5
|
-
def
|
6
|
-
ENV['
|
5
|
+
def cloudfuji_url
|
6
|
+
ENV['CLOUDFUJI_URL'] || "http://cloudfuji.com"
|
7
7
|
end
|
8
8
|
|
9
9
|
# Returns nil if credentials are invalid
|
10
10
|
# Returns the authentication_token if credentials are valid
|
11
11
|
def verify_credentials(email, password)
|
12
12
|
begin
|
13
|
-
result = JSON(RestClient.get("#{
|
13
|
+
result = JSON(RestClient.get("#{cloudfuji_url}/users/verify.json", { :params => {:email => email, :password => password }}))
|
14
14
|
if result['errors'].nil?
|
15
15
|
return result['authentication_token'], nil
|
16
16
|
else
|
@@ -22,11 +22,11 @@ class Tane::Helpers::Bushido
|
|
22
22
|
end
|
23
23
|
|
24
24
|
def signup(email, password)
|
25
|
-
term.say "Contacting
|
26
|
-
term.say "(using #{
|
25
|
+
term.say "Contacting cloudfuji..."
|
26
|
+
term.say "(using #{cloudfuji_url}/users/create.json)"
|
27
27
|
|
28
28
|
begin
|
29
|
-
result = JSON(RestClient.get("#{
|
29
|
+
result = JSON(RestClient.get("#{cloudfuji_url}/users/create.json", { :params => {:email => email, :password => password }}))
|
30
30
|
|
31
31
|
if result['errors'].nil?
|
32
32
|
return result['authentication_token'], nil
|
@@ -3,30 +3,30 @@ class Tane::Helpers::Init
|
|
3
3
|
|
4
4
|
class << self
|
5
5
|
def initialize_app
|
6
|
-
term.say "Initializing a local
|
7
|
-
if
|
6
|
+
term.say "Initializing a local Cloudfuji app for this rails app..."
|
7
|
+
if cloudfuji_app_exists?
|
8
8
|
update_app
|
9
9
|
else
|
10
10
|
app = create_app
|
11
|
-
|
11
|
+
make_app_cloudfuji_dir
|
12
12
|
save_envs(get_app_envs(app['app']['name']))
|
13
13
|
save_emails
|
14
14
|
end
|
15
15
|
|
16
|
-
term.say "Finished successfully! Check out .
|
16
|
+
term.say "Finished successfully! Check out .cloudfuji/tane.yml for the env vars if you care, or .cloudfuji/emails/#{example_email_template.keys.first}.yml to create email templates to test with"
|
17
17
|
end
|
18
18
|
|
19
19
|
def update_app
|
20
|
-
save_envs(get_app_envs(
|
20
|
+
save_envs(get_app_envs(cloudfuji_envs['CLOUDFUJI_NAME']))
|
21
21
|
end
|
22
22
|
|
23
|
-
# TODO: Replace envs_template with values retrieved from
|
23
|
+
# TODO: Replace envs_template with values retrieved from Cloudfuji side
|
24
24
|
def save_envs(env_vars)
|
25
|
-
if File.exists?('.
|
26
|
-
return if not term.agree('.
|
25
|
+
if File.exists?('.cloudfuji/tane.yml')
|
26
|
+
return if not term.agree('.cloudfuji/tane.yml already exists! Are you sure you want to overwrite it? Y/N')
|
27
27
|
end
|
28
28
|
|
29
|
-
File.open('.
|
29
|
+
File.open('.cloudfuji/tane.yml', 'w+') { |file| file.puts YAML.dump(envs_template(env_vars)) }
|
30
30
|
end
|
31
31
|
|
32
32
|
def save_emails
|
@@ -34,7 +34,7 @@ class Tane::Helpers::Init
|
|
34
34
|
return if not term.agree("#{example_email_template.keys.first} already exists! Are you sure you want to overwrite it? Y/N")
|
35
35
|
end
|
36
36
|
|
37
|
-
File.open("#{email_templates_path}/#{example_email_template.keys.first}", "w") do |file|
|
37
|
+
File.open("#{email_templates_path}/#{example_email_template.keys.first}.yml", "w") do |file|
|
38
38
|
file.puts email_template_explanation
|
39
39
|
file.puts YAML.dump(example_email_template)
|
40
40
|
end
|
@@ -43,9 +43,9 @@ class Tane::Helpers::Init
|
|
43
43
|
def envs_template(app_envs)
|
44
44
|
envs = {}
|
45
45
|
env_var_keys = [
|
46
|
-
'APP_TLD', 'BUNDLE_WITHOUT', '
|
47
|
-
'
|
48
|
-
'
|
46
|
+
'APP_TLD', 'BUNDLE_WITHOUT', 'CLOUDFUJI_APP', 'CLOUDFUJI_APP_KEY',
|
47
|
+
'CLOUDFUJI_DOMAIN', 'CLOUDFUJI_EVENTS', 'CLOUDFUJI_HOST', 'CLOUDFUJI_NAME',
|
48
|
+
'CLOUDFUJI_PROJECT_NAME', 'CLOUDFUJI_SALT', 'CLOUDFUJI_SUBDOMAIN',
|
49
49
|
'B_SQL_DB', 'B_SQL_PASS', 'B_SQL_USER', 'DATABASE_URL',
|
50
50
|
'HOSTING_PLATFORM', 'LANG', 'PUBLIC_URL', 'RACK_ENV',
|
51
51
|
'RAILS_ENV', 'S3_ACCESS_KEY_ID', 'S3_ARN', 'S3_BUCKET',
|
@@ -62,10 +62,10 @@ class Tane::Helpers::Init
|
|
62
62
|
email = {}
|
63
63
|
email['example_email_1'] = {}
|
64
64
|
|
65
|
-
email['example_email_1']['recipient'] = "postmaster@your-app-name.
|
65
|
+
email['example_email_1']['recipient'] = "postmaster@your-app-name.gocloudfuji.com"
|
66
66
|
email['example_email_1']['sender'] = "sender@example.org"
|
67
67
|
email['example_email_1']['from'] = "Example Sender <example.sender@example.org>"
|
68
|
-
email['example_email_1']['subject'] = "
|
68
|
+
email['example_email_1']['subject'] = "hello"
|
69
69
|
email['example_email_1']['body-plain'] = "Example plain body with no HTML, but with all the quoted conversations"
|
70
70
|
email['example_email_1']['stripped-text'] = "Example stripped text, with no HTML, quotes, or signature"
|
71
71
|
email['example_email_1']['stripped-signature'] = "Example stripped signature with no HTML"
|
@@ -101,11 +101,11 @@ EOL
|
|
101
101
|
end
|
102
102
|
|
103
103
|
def create_app
|
104
|
-
JSON(RestClient.post("#{
|
104
|
+
JSON(RestClient.post("#{cloudfuji_url}/apps.json", {:app => {:url => "https://github.com/Cloudfuji/tane.git", :platform => "developer"}, :authentication_token => password}))
|
105
105
|
end
|
106
106
|
|
107
107
|
def get_app_envs(app_name)
|
108
|
-
result = JSON(RestClient.get("#{
|
108
|
+
result = JSON(RestClient.get("#{cloudfuji_url}/apps/#{app_name}.json", {:params => {:authentication_token => password}}))
|
109
109
|
result["app"]["full_app_env_vars"]
|
110
110
|
end
|
111
111
|
end
|
data/lib/tane/version.rb
CHANGED
data/spec/commands/email_spec.rb
CHANGED
@@ -44,14 +44,14 @@ describe Tane::Commands::Email do
|
|
44
44
|
it "should post to mail url of the local app if email template is available" do
|
45
45
|
email_template_name = "valid_email_template_name"
|
46
46
|
email_template = "valid_email_template"
|
47
|
-
|
47
|
+
cloudfuji_mail_url = Tane::Commands::Email.mail_url
|
48
48
|
|
49
49
|
Tane::Commands::Email.should_receive(:render_email)
|
50
50
|
.with(email_template_name)
|
51
51
|
.and_return(email_template)
|
52
52
|
|
53
53
|
Tane::Commands::Email.should_receive(:post)
|
54
|
-
.with(
|
54
|
+
.with(cloudfuji_mail_url, email_template)
|
55
55
|
|
56
56
|
Tane::Commands::Email.send_email(email_template_name)
|
57
57
|
end
|
data/spec/commands/event_spec.rb
CHANGED
@@ -3,7 +3,7 @@ require "spec_helper"
|
|
3
3
|
describe Tane::Commands::Event do
|
4
4
|
|
5
5
|
describe ".process" do
|
6
|
-
it "should post data to the local apps /
|
6
|
+
it "should post data to the local apps /cloudfuji/data with the event" do
|
7
7
|
args = ["Test", "received", "{'foo' => 'bar'}"]
|
8
8
|
event = {
|
9
9
|
'category' => args.first,
|
data/spec/commands/exec_spec.rb
CHANGED
@@ -7,7 +7,7 @@ describe Tane::Commands::Exec do
|
|
7
7
|
args = ['foo', 'bar']
|
8
8
|
|
9
9
|
Tane::Commands::Exec.should_receive(:authenticate_user).and_return(true)
|
10
|
-
Tane::Commands::Exec.should_receive(:
|
10
|
+
Tane::Commands::Exec.should_receive(:cloudfuji_envs).
|
11
11
|
and_return({})
|
12
12
|
|
13
13
|
Tane::Commands::Exec.should_receive(:exec).with(args.join(' '))
|
@@ -7,16 +7,16 @@ describe Tane::Commands::Support do
|
|
7
7
|
end
|
8
8
|
|
9
9
|
describe ".process" do
|
10
|
-
it "should prompt the user for the message and send it to
|
10
|
+
it "should prompt the user for the message and send it to Cloudfuji" do
|
11
11
|
Tane::Commands::Support.term.should_receive(:ask).and_return(@message)
|
12
|
-
Tane::Commands::Support.should_receive(:
|
12
|
+
Tane::Commands::Support.should_receive(:send_message_to_cloudfuji).with(@message)
|
13
13
|
|
14
14
|
Tane::Commands::Support.process([])
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
|
19
|
-
describe ".
|
19
|
+
describe ".send_message_to_cloudfuji" do
|
20
20
|
|
21
21
|
before :each do
|
22
22
|
Tane::Commands::Support.should_receive(:email_from_credentials_or_prompt).and_return("valid_username")
|
@@ -31,11 +31,11 @@ describe Tane::Commands::Support do
|
|
31
31
|
|
32
32
|
it "should display the message being sent" do
|
33
33
|
Tane::Commands::Support.term.should_receive(:say).at_least(3)
|
34
|
-
Tane::Commands::Support.
|
34
|
+
Tane::Commands::Support.send_message_to_cloudfuji(@message)
|
35
35
|
end
|
36
36
|
|
37
|
-
it "should send a message to
|
38
|
-
Tane::Commands::Support.
|
37
|
+
it "should send a message to Cloudfuji team" do
|
38
|
+
Tane::Commands::Support.send_message_to_cloudfuji(@message)
|
39
39
|
end
|
40
40
|
|
41
41
|
end
|
@@ -1,2 +1,2 @@
|
|
1
|
-
:username: s@
|
1
|
+
:username: s@gocloudfuji.com
|
2
2
|
:password: abc123
|
@@ -1,24 +1,24 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
|
-
describe Tane::Helpers::
|
3
|
+
describe Tane::Helpers::Cloudfuji do
|
4
4
|
|
5
|
-
describe "
|
5
|
+
describe "cloudfuji_url" do
|
6
6
|
it "should return the http://bushid.do by default" do
|
7
7
|
# To make sure it's overridden if set in tachi
|
8
|
-
ENV['
|
9
|
-
Tane::Helpers::
|
8
|
+
ENV['CLOUDFUJI_URL'] = nil
|
9
|
+
Tane::Helpers::Cloudfuji.cloudfuji_url.should == "http://cloudfuji.com"
|
10
10
|
end
|
11
11
|
|
12
12
|
it "should return the env variable's value if it is set" do
|
13
|
-
ENV['
|
14
|
-
Tane::Helpers::
|
13
|
+
ENV['CLOUDFUJI_URL'] = "http://noshido.com"
|
14
|
+
Tane::Helpers::Cloudfuji.cloudfuji_url.should == "http://noshido.com"
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
18
|
describe ".verify_credentials" do
|
19
19
|
before :each do
|
20
20
|
@params = {:params => {:email => "email", :password => "password" }}
|
21
|
-
@
|
21
|
+
@cloudfuji_verify_url = "#{Tane::Helpers::Cloudfuji.cloudfuji_url}/users/verify.json"
|
22
22
|
end
|
23
23
|
|
24
24
|
it "should return an authentication_token if the verification was a success" do
|
@@ -28,9 +28,9 @@ describe Tane::Helpers::Bushido do
|
|
28
28
|
}
|
29
29
|
|
30
30
|
RestClient.should_receive(:get).
|
31
|
-
with(@
|
31
|
+
with(@cloudfuji_verify_url, @params).and_return(result_with_auth_token.to_json)
|
32
32
|
|
33
|
-
Tane::Helpers::
|
33
|
+
Tane::Helpers::Cloudfuji.verify_credentials("email", "password").should == [result_with_auth_token[:authentication_token] ,nil]
|
34
34
|
end
|
35
35
|
|
36
36
|
it "should return false if the verification returned false" do
|
@@ -40,16 +40,16 @@ describe Tane::Helpers::Bushido do
|
|
40
40
|
}
|
41
41
|
|
42
42
|
RestClient.should_receive(:get).
|
43
|
-
with(@
|
43
|
+
with(@cloudfuji_verify_url, @params).and_return(result_with_error.to_json)
|
44
44
|
|
45
|
-
Tane::Helpers::
|
45
|
+
Tane::Helpers::Cloudfuji.verify_credentials("email", "password").should == [nil, result_with_error[:errors]]
|
46
46
|
end
|
47
47
|
end
|
48
48
|
|
49
49
|
describe ".signup" do
|
50
50
|
before :each do
|
51
51
|
@params = {:params => {:email => "email", :password => "password" }}
|
52
|
-
@
|
52
|
+
@cloudfuji_create_url = "#{Tane::Helpers::Cloudfuji.cloudfuji_url}/users/create.json"
|
53
53
|
end
|
54
54
|
|
55
55
|
it "should signup a user when provided with email and password" do
|
@@ -59,10 +59,10 @@ describe Tane::Helpers::Bushido do
|
|
59
59
|
}
|
60
60
|
|
61
61
|
RestClient.should_receive(:get).
|
62
|
-
with(@
|
62
|
+
with(@cloudfuji_create_url, @params).
|
63
63
|
and_return(result_with_auth_token.to_json)
|
64
64
|
|
65
|
-
Tane::Helpers::
|
65
|
+
Tane::Helpers::Cloudfuji.signup("email", "password").should == [result_with_auth_token[:authentication_token], nil]
|
66
66
|
end
|
67
67
|
|
68
68
|
it "should not signup a user and return errors if any" do
|
@@ -72,16 +72,16 @@ describe Tane::Helpers::Bushido do
|
|
72
72
|
}
|
73
73
|
|
74
74
|
RestClient.should_receive(:get).
|
75
|
-
with(@
|
75
|
+
with(@cloudfuji_create_url, @params).and_return(result_with_error.to_json)
|
76
76
|
|
77
|
-
Tane::Helpers::
|
77
|
+
Tane::Helpers::Cloudfuji.signup("email", "password").should == [nil, result_with_error[:errors]]
|
78
78
|
end
|
79
79
|
end
|
80
80
|
|
81
81
|
describe "authenticate_user" do
|
82
82
|
it "should warn the user if credentials already exist" do
|
83
|
-
Tane::Helpers::
|
84
|
-
Tane::Helpers::
|
83
|
+
Tane::Helpers::Cloudfuji.should_receive(:warn_if_credentials)
|
84
|
+
Tane::Helpers::Cloudfuji.authenticate_user("email", "password")
|
85
85
|
end
|
86
86
|
end
|
87
87
|
end
|
@@ -6,7 +6,7 @@ describe Tane::Helpers::Init do
|
|
6
6
|
# TODO: Each test should use mktmp dir instead of running in its own
|
7
7
|
# dir, it's dangerous
|
8
8
|
before(:each) do
|
9
|
-
FileUtils.rm_rf(".
|
9
|
+
FileUtils.rm_rf(".cloudfuji")
|
10
10
|
end
|
11
11
|
|
12
12
|
it "should include Tane::Helpers" do
|
@@ -16,7 +16,7 @@ describe Tane::Helpers::Init do
|
|
16
16
|
describe ".initialize_app" do
|
17
17
|
it "should display initialization message and success message" do
|
18
18
|
Tane::Helpers::Init.should_receive(:create_app).and_return({'name'=>'sample'})
|
19
|
-
Tane::Helpers::Init.should_receive(:
|
19
|
+
Tane::Helpers::Init.should_receive(:make_app_cloudfuji_dir)
|
20
20
|
Tane::Helpers::Init.should_receive(:get_app_envs)
|
21
21
|
Tane::Helpers::Init.should_receive(:save_envs)
|
22
22
|
Tane::Helpers::Init.should_receive(:save_emails)
|
@@ -28,8 +28,8 @@ describe Tane::Helpers::Init do
|
|
28
28
|
|
29
29
|
describe "update_app" do
|
30
30
|
it "should save the environment variables for the app" do
|
31
|
-
Tane::Helpers::Init.should_receive(:
|
32
|
-
and_return({'
|
31
|
+
Tane::Helpers::Init.should_receive(:cloudfuji_envs).
|
32
|
+
and_return({'CLOUDFUJI_NAME' => 'sample_app'})
|
33
33
|
|
34
34
|
Tane::Helpers::Init.should_receive(:get_app_envs)
|
35
35
|
Tane::Helpers::Init.should_receive(:save_envs)
|
@@ -39,14 +39,14 @@ describe Tane::Helpers::Init do
|
|
39
39
|
end
|
40
40
|
|
41
41
|
describe ".save_envs" do
|
42
|
-
it "should write a .
|
42
|
+
it "should write a .cloudfuji/tane.yml file if it does not exist" do
|
43
43
|
File.should_receive(:exists?).and_return(false)
|
44
44
|
File.should_receive(:open)
|
45
45
|
|
46
46
|
Tane::Helpers::Init.save_envs({})
|
47
47
|
end
|
48
48
|
|
49
|
-
it "should write a .
|
49
|
+
it "should write a .cloudfuji/tane.yml file if it already exists and if the user agrees to an overwrite" do
|
50
50
|
File.should_receive(:exists?).and_return(true)
|
51
51
|
Tane::Helpers::Init.term.should_receive(:agree).and_return(true)
|
52
52
|
File.should_receive(:open)
|
@@ -54,7 +54,7 @@ describe Tane::Helpers::Init do
|
|
54
54
|
Tane::Helpers::Init.save_envs({})
|
55
55
|
end
|
56
56
|
|
57
|
-
it "should *not* write a .
|
57
|
+
it "should *not* write a .cloudfuji/tane.yml file if the user says no to an overwrite" do
|
58
58
|
File.should_receive(:exists?).and_return(true)
|
59
59
|
Tane::Helpers::Init.term.should_receive(:agree).and_return(false)
|
60
60
|
File.should_not_receive(:open)
|
@@ -64,7 +64,7 @@ describe Tane::Helpers::Init do
|
|
64
64
|
end
|
65
65
|
|
66
66
|
describe "save_emails" do
|
67
|
-
it "should create a sample email template file to .
|
67
|
+
it "should create a sample email template file to .cloudfuji/emails dir if it does not exist" do
|
68
68
|
File.should_receive(:exists?).and_return(false)
|
69
69
|
File.should_receive(:open)
|
70
70
|
|
@@ -108,18 +108,18 @@ describe Tane::Helpers::Init do
|
|
108
108
|
before :each do
|
109
109
|
@params = {
|
110
110
|
:app => {
|
111
|
-
:url => "https://github.com/
|
111
|
+
:url => "https://github.com/Cloudfuji/tane.git",
|
112
112
|
:platform => "developer"
|
113
113
|
},
|
114
114
|
:authentication_token => "valid_auth_token"
|
115
115
|
}
|
116
|
-
@
|
116
|
+
@cloudfuji_apps_url = "#{Tane::Helpers::Init.cloudfuji_url}/apps.json"
|
117
117
|
end
|
118
118
|
|
119
119
|
it "should create an app" do
|
120
120
|
Tane::Helpers::Init.should_receive(:password).at_least(1).and_return("valid_auth_token")
|
121
121
|
RestClient.should_receive(:post).
|
122
|
-
with(@
|
122
|
+
with(@cloudfuji_apps_url, @params).
|
123
123
|
and_return('{}')
|
124
124
|
Tane::Helpers::Init.create_app
|
125
125
|
end
|
data/spec/helpers_spec.rb
CHANGED
@@ -26,33 +26,33 @@ describe "Tane::Helpers" do
|
|
26
26
|
end
|
27
27
|
end
|
28
28
|
|
29
|
-
describe "
|
30
|
-
it "should return the path of the user's .
|
31
|
-
Tane::Helpers::Example.
|
29
|
+
describe "cloudfuji_dir" do
|
30
|
+
it "should return the path of the user's .cloudfuji directory" do
|
31
|
+
Tane::Helpers::Example.cloudfuji_dir.should == "#{ENV['HOME']}/.cloudfuji"
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
35
|
describe "email_templates_path" do
|
36
|
-
it "should return path to the template file in the project's .
|
37
|
-
Tane::Helpers::Example.email_templates_path.should == ".
|
36
|
+
it "should return path to the template file in the project's .cloudfuji dir" do
|
37
|
+
Tane::Helpers::Example.email_templates_path.should == ".cloudfuji/emails"
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
41
|
describe "email_template_file_path" do
|
42
|
-
it "should return path to the template file in the project's .
|
43
|
-
Tane::Helpers::Example.email_template_file_path("valid_template").should == ".
|
42
|
+
it "should return path to the template file in the project's .cloudfuji dir" do
|
43
|
+
Tane::Helpers::Example.email_template_file_path("valid_template").should == ".cloudfuji/emails/valid_template.yml"
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
47
|
describe "tane_file_path" do
|
48
|
-
it "should return path to xsycurrent project's .
|
49
|
-
Tane::Helpers::Example.tane_file_path == ".
|
48
|
+
it "should return path to xsycurrent project's .cloudfuji/tane.yml" do
|
49
|
+
Tane::Helpers::Example.tane_file_path == ".cloudfuji/tane.yml"
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
53
|
describe "credentials_file_path" do
|
54
|
-
it "should return path to user's
|
55
|
-
Tane::Helpers::Example.credentials_file_path == "#{ENV['HOME']}/.
|
54
|
+
it "should return path to user's Cloudfuji credentials file" do
|
55
|
+
Tane::Helpers::Example.credentials_file_path == "#{ENV['HOME']}/.cloudfuji/credentials.yml"
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
@@ -80,11 +80,11 @@ describe "Tane::Helpers" do
|
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
|
-
describe "
|
84
|
-
it "it should return true if the .
|
83
|
+
describe "cloudfuji_app_exists?" do
|
84
|
+
it "it should return true if the .cloudfuji/tane.yml file and .cloudfuji/emails dir exists in the current directory" do
|
85
85
|
File.should_receive(:exists?).and_return(true)
|
86
86
|
File.should_receive(:directory?).and_return(true)
|
87
|
-
Tane::Helpers::Example.
|
87
|
+
Tane::Helpers::Example.cloudfuji_app_exists?.should be_true
|
88
88
|
end
|
89
89
|
end
|
90
90
|
|
@@ -102,30 +102,30 @@ describe "Tane::Helpers" do
|
|
102
102
|
end
|
103
103
|
end
|
104
104
|
|
105
|
-
describe "
|
106
|
-
it "should create a .
|
107
|
-
FileUtils.should_receive(:mkdir_p).with("#{ENV['HOME']}/.
|
108
|
-
Tane::Helpers::Example.
|
105
|
+
describe "make_global_cloudfuji_dir" do
|
106
|
+
it "should create a .cloudfuji dir in the user's $HOME directory" do
|
107
|
+
FileUtils.should_receive(:mkdir_p).with("#{ENV['HOME']}/.cloudfuji")
|
108
|
+
Tane::Helpers::Example.make_global_cloudfuji_dir
|
109
109
|
end
|
110
110
|
end
|
111
111
|
|
112
|
-
describe "
|
113
|
-
it "should create a .
|
114
|
-
Tane::Helpers::Example.should_receive(:
|
115
|
-
FileUtils.should_receive(:mkdir_p).with(".
|
116
|
-
Tane::Helpers::Example.
|
112
|
+
describe "make_app_cloudfuji_dir" do
|
113
|
+
it "should create a .cloudfuji dir in the current dir if it does not have one" do
|
114
|
+
Tane::Helpers::Example.should_receive(:cloudfuji_app_exists?).and_return(false)
|
115
|
+
FileUtils.should_receive(:mkdir_p).with(".cloudfuji/emails")
|
116
|
+
Tane::Helpers::Example.make_app_cloudfuji_dir
|
117
117
|
end
|
118
118
|
|
119
|
-
it "should *not* create a .
|
120
|
-
Tane::Helpers::Example.should_receive(:
|
119
|
+
it "should *not* create a .cloudfuji in the current dir if it already has not" do
|
120
|
+
Tane::Helpers::Example.should_receive(:cloudfuji_app_exists?).and_return(true)
|
121
121
|
expect {
|
122
|
-
Tane::Helpers::Example.
|
122
|
+
Tane::Helpers::Example.make_app_cloudfuji_dir
|
123
123
|
}.to raise_error(SystemExit)
|
124
124
|
end
|
125
125
|
end
|
126
126
|
|
127
127
|
describe "save_credentials" do
|
128
|
-
it "should save the username and the password in the user's
|
128
|
+
it "should save the username and the password in the user's cloudfuji_dir" do
|
129
129
|
File.should_receive(:open)
|
130
130
|
Tane::Helpers::Example.save_credentials("email", "auth_token")
|
131
131
|
end
|
@@ -169,10 +169,10 @@ describe "Tane::Helpers" do
|
|
169
169
|
end
|
170
170
|
end
|
171
171
|
|
172
|
-
describe "
|
173
|
-
it "should return the read the data in .
|
172
|
+
describe "cloudfuji_envs" do
|
173
|
+
it "should return the read the data in .cloudfuji/tane.yml and return a hash" do
|
174
174
|
File.should_receive(:read).and_return('HOSTING_PLATFORM: developer')
|
175
|
-
Tane::Helpers::Example.
|
175
|
+
Tane::Helpers::Example.cloudfuji_envs.should == {"HOSTING_PLATFORM"=> "developer"}
|
176
176
|
end
|
177
177
|
end
|
178
178
|
|
@@ -183,23 +183,23 @@ describe "Tane::Helpers" do
|
|
183
183
|
end
|
184
184
|
|
185
185
|
describe "mail_url" do
|
186
|
-
it "should return url to local app's
|
187
|
-
mail_url = "#{::Tane::Helpers::Example.base_url}/
|
186
|
+
it "should return url to local app's Cloudfuji::Mail#index action at/cloudfuji/mail" do
|
187
|
+
mail_url = "#{::Tane::Helpers::Example.base_url}/cloudfuji/mail"
|
188
188
|
Tane::Helpers::Example.mail_url.should == mail_url
|
189
189
|
end
|
190
190
|
end
|
191
191
|
|
192
192
|
|
193
193
|
describe "support_url" do
|
194
|
-
it "should return http://
|
195
|
-
support_url = "#{Tane::Helpers::Example.
|
194
|
+
it "should return http://gocloudfuji.com/api/support/message" do
|
195
|
+
support_url = "#{Tane::Helpers::Example.cloudfuji_url}/support/v1/message"
|
196
196
|
Tane::Helpers::Example.support_url.should == support_url
|
197
197
|
end
|
198
198
|
end
|
199
199
|
|
200
200
|
describe "post" do
|
201
201
|
before :each do
|
202
|
-
Tane::Helpers::Example.should_receive(:
|
202
|
+
Tane::Helpers::Example.should_receive(:cloudfuji_envs).and_return({"CLOUDFUJI_APP_KEY"=>"abc123"})
|
203
203
|
@data = {}
|
204
204
|
@url = "http://example.com"
|
205
205
|
RestClient.should_receive(:put).with(@url, @data, :content_type => :json, :accept => :json).and_return(@data.to_json)
|
data/tane.gemspec
CHANGED
@@ -5,11 +5,11 @@ require "tane/version"
|
|
5
5
|
Gem::Specification.new do |s|
|
6
6
|
s.name = "tane"
|
7
7
|
s.version = Tane::VERSION
|
8
|
-
s.authors = ["
|
9
|
-
s.email = ["support@
|
8
|
+
s.authors = ["Cloudfuji Team"]
|
9
|
+
s.email = ["support@gocloudfuji.com"]
|
10
10
|
s.homepage = ""
|
11
|
-
s.summary = %q{Enables local development of
|
12
|
-
s.description = %q{This gem provides all the tools necessary to develop a rails app meant for deployment on
|
11
|
+
s.summary = %q{Enables local development of Cloudfuji apps}
|
12
|
+
s.description = %q{This gem provides all the tools necessary to develop a rails app meant for deployment on Cloudfuji locally}
|
13
13
|
|
14
14
|
s.rubyforge_project = "tane"
|
15
15
|
|
@@ -23,7 +23,7 @@ Gem::Specification.new do |s|
|
|
23
23
|
s.add_dependency "awesome_print"
|
24
24
|
s.add_dependency "rake"
|
25
25
|
s.add_dependency "launchy"
|
26
|
-
s.add_dependency "rails",
|
26
|
+
#s.add_dependency "rails", Tane::RAILS_VERSION
|
27
27
|
s.add_runtime_dependency "erubis"
|
28
28
|
s.add_runtime_dependency "rest-client"
|
29
29
|
s.add_runtime_dependency "highline"
|
metadata
CHANGED
@@ -1,115 +1,102 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: tane
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.3
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.2
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
8
|
-
-
|
7
|
+
authors:
|
8
|
+
- Cloudfuji Team
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-05-09 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
16
15
|
name: rspec
|
17
|
-
|
18
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &70299983186380 !ruby/object:Gem::Requirement
|
19
17
|
none: false
|
20
|
-
requirements:
|
21
|
-
- -
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version:
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
24
22
|
type: :development
|
25
|
-
version_requirements: *id001
|
26
|
-
- !ruby/object:Gem::Dependency
|
27
|
-
name: awesome_print
|
28
23
|
prerelease: false
|
29
|
-
|
24
|
+
version_requirements: *70299983186380
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: awesome_print
|
27
|
+
requirement: &70299983185940 !ruby/object:Gem::Requirement
|
30
28
|
none: false
|
31
|
-
requirements:
|
32
|
-
- -
|
33
|
-
- !ruby/object:Gem::Version
|
34
|
-
version:
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
35
33
|
type: :runtime
|
36
|
-
version_requirements: *id002
|
37
|
-
- !ruby/object:Gem::Dependency
|
38
|
-
name: rake
|
39
34
|
prerelease: false
|
40
|
-
|
35
|
+
version_requirements: *70299983185940
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: rake
|
38
|
+
requirement: &70299983185460 !ruby/object:Gem::Requirement
|
41
39
|
none: false
|
42
|
-
requirements:
|
43
|
-
- -
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version:
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
46
44
|
type: :runtime
|
47
|
-
version_requirements: *id003
|
48
|
-
- !ruby/object:Gem::Dependency
|
49
|
-
name: launchy
|
50
45
|
prerelease: false
|
51
|
-
|
46
|
+
version_requirements: *70299983185460
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: launchy
|
49
|
+
requirement: &70299983185020 !ruby/object:Gem::Requirement
|
52
50
|
none: false
|
53
|
-
requirements:
|
54
|
-
- -
|
55
|
-
- !ruby/object:Gem::Version
|
56
|
-
version:
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
57
55
|
type: :runtime
|
58
|
-
version_requirements: *id004
|
59
|
-
- !ruby/object:Gem::Dependency
|
60
|
-
name: rails
|
61
56
|
prerelease: false
|
62
|
-
|
63
|
-
|
64
|
-
requirements:
|
65
|
-
- - ~>
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: 3.1.0
|
68
|
-
type: :runtime
|
69
|
-
version_requirements: *id005
|
70
|
-
- !ruby/object:Gem::Dependency
|
57
|
+
version_requirements: *70299983185020
|
58
|
+
- !ruby/object:Gem::Dependency
|
71
59
|
name: erubis
|
72
|
-
|
73
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
60
|
+
requirement: &70299983184600 !ruby/object:Gem::Requirement
|
74
61
|
none: false
|
75
|
-
requirements:
|
76
|
-
- -
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
version:
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
79
66
|
type: :runtime
|
80
|
-
version_requirements: *id006
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: rest-client
|
83
67
|
prerelease: false
|
84
|
-
|
68
|
+
version_requirements: *70299983184600
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rest-client
|
71
|
+
requirement: &70299983184140 !ruby/object:Gem::Requirement
|
85
72
|
none: false
|
86
|
-
requirements:
|
87
|
-
- -
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version:
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
90
77
|
type: :runtime
|
91
|
-
version_requirements: *id007
|
92
|
-
- !ruby/object:Gem::Dependency
|
93
|
-
name: highline
|
94
78
|
prerelease: false
|
95
|
-
|
79
|
+
version_requirements: *70299983184140
|
80
|
+
- !ruby/object:Gem::Dependency
|
81
|
+
name: highline
|
82
|
+
requirement: &70299983183480 !ruby/object:Gem::Requirement
|
96
83
|
none: false
|
97
|
-
requirements:
|
98
|
-
- -
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version:
|
84
|
+
requirements:
|
85
|
+
- - ! '>='
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
version: '0'
|
101
88
|
type: :runtime
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
89
|
+
prerelease: false
|
90
|
+
version_requirements: *70299983183480
|
91
|
+
description: This gem provides all the tools necessary to develop a rails app meant
|
92
|
+
for deployment on Cloudfuji locally
|
93
|
+
email:
|
94
|
+
- support@gocloudfuji.com
|
95
|
+
executables:
|
107
96
|
- tane
|
108
97
|
extensions: []
|
109
|
-
|
110
98
|
extra_rdoc_files: []
|
111
|
-
|
112
|
-
files:
|
99
|
+
files:
|
113
100
|
- .gitignore
|
114
101
|
- .rspec
|
115
102
|
- Gemfile
|
@@ -133,7 +120,7 @@ files:
|
|
133
120
|
- lib/tane/commands/signup.rb
|
134
121
|
- lib/tane/commands/support.rb
|
135
122
|
- lib/tane/helpers.rb
|
136
|
-
- lib/tane/helpers/
|
123
|
+
- lib/tane/helpers/cloudfuji_helper.rb
|
137
124
|
- lib/tane/helpers/init_helper.rb
|
138
125
|
- lib/tane/parser.rb
|
139
126
|
- lib/tane/version.rb
|
@@ -148,41 +135,44 @@ files:
|
|
148
135
|
- spec/commands/support_spec.rb
|
149
136
|
- spec/executable_spec.rb
|
150
137
|
- spec/fixtures/credentials.yml
|
151
|
-
- spec/helpers/
|
138
|
+
- spec/helpers/cloudfuji_helper_spec.rb
|
152
139
|
- spec/helpers/init_helper_spec.rb
|
153
140
|
- spec/helpers_spec.rb
|
154
141
|
- spec/spec_helper.rb
|
155
142
|
- tane.gemspec
|
156
143
|
- tasks/spec.rake
|
157
144
|
- tasks/tane.rake
|
158
|
-
homepage:
|
145
|
+
homepage: ''
|
159
146
|
licenses: []
|
160
|
-
|
161
147
|
post_install_message:
|
162
148
|
rdoc_options: []
|
163
|
-
|
164
|
-
require_paths:
|
149
|
+
require_paths:
|
165
150
|
- lib
|
166
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
151
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
167
152
|
none: false
|
168
|
-
requirements:
|
169
|
-
- -
|
170
|
-
- !ruby/object:Gem::Version
|
171
|
-
version:
|
172
|
-
|
153
|
+
requirements:
|
154
|
+
- - ! '>='
|
155
|
+
- !ruby/object:Gem::Version
|
156
|
+
version: '0'
|
157
|
+
segments:
|
158
|
+
- 0
|
159
|
+
hash: 3077772312706404448
|
160
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
173
161
|
none: false
|
174
|
-
requirements:
|
175
|
-
- -
|
176
|
-
- !ruby/object:Gem::Version
|
177
|
-
version:
|
162
|
+
requirements:
|
163
|
+
- - ! '>='
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: '0'
|
166
|
+
segments:
|
167
|
+
- 0
|
168
|
+
hash: 3077772312706404448
|
178
169
|
requirements: []
|
179
|
-
|
180
170
|
rubyforge_project: tane
|
181
|
-
rubygems_version: 1.8.
|
171
|
+
rubygems_version: 1.8.10
|
182
172
|
signing_key:
|
183
173
|
specification_version: 3
|
184
|
-
summary: Enables local development of
|
185
|
-
test_files:
|
174
|
+
summary: Enables local development of Cloudfuji apps
|
175
|
+
test_files:
|
186
176
|
- spec/commands/base_spec.rb
|
187
177
|
- spec/commands/claim_spec.rb
|
188
178
|
- spec/commands/email_spec.rb
|
@@ -194,7 +184,7 @@ test_files:
|
|
194
184
|
- spec/commands/support_spec.rb
|
195
185
|
- spec/executable_spec.rb
|
196
186
|
- spec/fixtures/credentials.yml
|
197
|
-
- spec/helpers/
|
187
|
+
- spec/helpers/cloudfuji_helper_spec.rb
|
198
188
|
- spec/helpers/init_helper_spec.rb
|
199
189
|
- spec/helpers_spec.rb
|
200
190
|
- spec/spec_helper.rb
|