tane 0.0.3 → 0.0.4
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/README.md +5 -5
- data/lib/tane/commands/create.rb +3 -3
- data/lib/tane/commands/logout.rb +2 -2
- data/lib/tane/commands/refresh.rb +2 -2
- data/lib/tane/commands/signup.rb +2 -2
- data/lib/tane/parser.rb +3 -3
- data/lib/tane/version.rb +1 -1
- data/spec/commands/login_spec.rb +3 -3
- data/spec/helpers/cloudfuji_helper_spec.rb +1 -1
- data/tane.gemspec +1 -1
- metadata +83 -78
data/README.md
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
# Tane
|
2
2
|
|
3
|
-
Copy-paste the following to create a new
|
3
|
+
Copy-paste the following to create a new Cloudfuji rails application.
|
4
4
|
|
5
5
|
gem install tane
|
6
6
|
tane create
|
7
7
|
|
8
8
|
## What is tane?
|
9
9
|
|
10
|
-
Tane is a
|
11
|
-
helps you generate new
|
12
|
-
Ruby on Rails Apps to be
|
10
|
+
Tane is a Cloudfuji Developers best friend and a development tool. It
|
11
|
+
helps you generate new Cloudfuji capable apps. It also enables existing
|
12
|
+
Ruby on Rails Apps to be Cloudfuji friendly.
|
13
13
|
|
14
14
|
## How To Create A New App
|
15
15
|
|
@@ -19,4 +19,4 @@ app.
|
|
19
19
|
The create command will then make a new directory using that passed
|
20
20
|
name. If you don't pass a name, it will ask you for one. The create
|
21
21
|
command will use the directory specified to generate a new rails 3 app
|
22
|
-
based on a
|
22
|
+
based on a Cloudfuji app template.
|
data/lib/tane/commands/create.rb
CHANGED
@@ -49,10 +49,10 @@ class Tane::Commands::Create < Tane::Commands::Base
|
|
49
49
|
"Lemonodor-fame is but a hack away!",
|
50
50
|
"Go forth to #{ app_name }, and hack for all you're worth - for all humankind!"]
|
51
51
|
|
52
|
-
|
52
|
+
fujis = ["Sean", "Kevin", "Akash"]
|
53
53
|
|
54
54
|
success_message = success_messages[ rand(success_messages.length) ]
|
55
|
-
|
55
|
+
fujis = fujis[ rand(fujis.length) ]
|
56
56
|
|
57
57
|
FileUtils.mv("./tane.log", "#{ target_path }/log/tane.log")
|
58
58
|
term.say " Finished successfully!"
|
@@ -78,7 +78,7 @@ class Tane::Commands::Create < Tane::Commands::Base
|
|
78
78
|
|
79
79
|
term.say "Launching your new app!"
|
80
80
|
term.say "Check out once rails has finished booting http://localhost:3000"
|
81
|
-
term.say "#{
|
81
|
+
term.say "#{fujis} says, \"#{ success_message }\""
|
82
82
|
|
83
83
|
# Do this in the background, it'll wait up to 120 seconds
|
84
84
|
# for the rails server to start up and launch a browser as
|
data/lib/tane/commands/logout.rb
CHANGED
@@ -6,7 +6,7 @@ class Tane::Commands::Logout < Tane::Commands::Base
|
|
6
6
|
destroy_credentials
|
7
7
|
term.say "Finished! All gone! Buh bye!"
|
8
8
|
else
|
9
|
-
term.say "Couldn't find any
|
9
|
+
term.say "Couldn't find any Cloudfuji account on this computer... kind of lonesome in that way, what with just you and me and all..."
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
@@ -17,7 +17,7 @@ Usage:
|
|
17
17
|
|
18
18
|
tane logout
|
19
19
|
|
20
|
-
Deletes the
|
20
|
+
Deletes the Cloudfuji credentials from the user's `$HOME` directory.
|
21
21
|
EOL
|
22
22
|
end
|
23
23
|
end
|
@@ -17,8 +17,8 @@ Usage:
|
|
17
17
|
|
18
18
|
tane refresh
|
19
19
|
|
20
|
-
Updates the
|
21
|
-
latest settings from the
|
20
|
+
Updates the Cloudfuji environment for the local application from the
|
21
|
+
latest settings from the Cloudfuji server.
|
22
22
|
EOL
|
23
23
|
end
|
24
24
|
end
|
data/lib/tane/commands/signup.rb
CHANGED
@@ -7,7 +7,7 @@ class Tane::Commands::Signup < Tane::Commands::Base
|
|
7
7
|
|
8
8
|
email, password = prompt_for_credentials
|
9
9
|
|
10
|
-
auth_token, errors = Tane::Helpers::
|
10
|
+
auth_token, errors = Tane::Helpers::Cloudfuji.signup(email, password)
|
11
11
|
|
12
12
|
if auth_token.nil?
|
13
13
|
term.say "Couldn't signup - "
|
@@ -35,7 +35,7 @@ Usage:
|
|
35
35
|
|
36
36
|
tane signup
|
37
37
|
|
38
|
-
Prompts you to signup for a
|
38
|
+
Prompts you to signup for a Cloudfuji account.
|
39
39
|
EOL
|
40
40
|
end
|
41
41
|
end
|
data/lib/tane/parser.rb
CHANGED
@@ -22,9 +22,9 @@ module Tane
|
|
22
22
|
options.transfer_type = :auto
|
23
23
|
options.verbose = false
|
24
24
|
|
25
|
-
global_option :port, '-p', '--port PORT', Integer, "The port your local
|
26
|
-
global_option :host, '-n', '--host HOST', String, "The hostname where your local
|
27
|
-
global_option :scheme, '-s', '--scheme SCHEME', String, "Either http or https, whichever protocol your local
|
25
|
+
global_option :port, '-p', '--port PORT', Integer, "The port your local Cloudfuji app is running on"
|
26
|
+
global_option :host, '-n', '--host HOST', String, "The hostname where your local Cloudfuji app is running"
|
27
|
+
global_option :scheme, '-s', '--scheme SCHEME', String, "Either http or https, whichever protocol your local Cloudfuji app is using"
|
28
28
|
global_option :verbose, '-V', '--verbose', "Output a lot of noise"
|
29
29
|
|
30
30
|
opts = OptionParser.new do |opts|
|
data/lib/tane/version.rb
CHANGED
data/spec/commands/login_spec.rb
CHANGED
@@ -27,13 +27,13 @@ describe Tane::Commands::Login do
|
|
27
27
|
|
28
28
|
describe ".verify_or_signup" do
|
29
29
|
it "should return the auth_token if the credentials are valid" do
|
30
|
-
Tane::Helpers::
|
30
|
+
Tane::Helpers::Cloudfuji.should_receive(:verify_credentials).
|
31
31
|
and_return([@valid_auth_token, nil])
|
32
32
|
Tane::Commands::Login.verify_or_signup(@valid_email, @valid_password).should == @valid_auth_token
|
33
33
|
end
|
34
34
|
|
35
35
|
it "should prompt for signup if the credentials are not valid" do
|
36
|
-
Tane::Helpers::
|
36
|
+
Tane::Helpers::Cloudfuji.should_receive(:verify_credentials).
|
37
37
|
and_return([nil, "foobar errors"])
|
38
38
|
Tane::Commands::Login.should_receive(:signup_and_notify)
|
39
39
|
Tane::Commands::Login.term.should_receive(:agree).and_return(true)
|
@@ -42,7 +42,7 @@ describe Tane::Commands::Login do
|
|
42
42
|
end
|
43
43
|
|
44
44
|
it "should display error messages and exit if user says no to signup" do
|
45
|
-
Tane::Helpers::
|
45
|
+
Tane::Helpers::Cloudfuji.should_receive(:verify_credentials).
|
46
46
|
and_return([nil, "foobar errors"])
|
47
47
|
Tane::Commands::Login.term.should_receive(:agree).and_return(false)
|
48
48
|
|
@@ -3,7 +3,7 @@ require "spec_helper"
|
|
3
3
|
describe Tane::Helpers::Cloudfuji do
|
4
4
|
|
5
5
|
describe "cloudfuji_url" do
|
6
|
-
it "should return the http://
|
6
|
+
it "should return the http://cloudfuji.com by default" do
|
7
7
|
# To make sure it's overridden if set in tachi
|
8
8
|
ENV['CLOUDFUJI_URL'] = nil
|
9
9
|
Tane::Helpers::Cloudfuji.cloudfuji_url.should == "http://cloudfuji.com"
|
data/tane.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |s|
|
|
7
7
|
s.version = Tane::VERSION
|
8
8
|
s.authors = ["Cloudfuji Team"]
|
9
9
|
s.email = ["support@gocloudfuji.com"]
|
10
|
-
s.homepage = ""
|
10
|
+
s.homepage = "http://cloudfuji.com"
|
11
11
|
s.summary = %q{Enables local development of Cloudfuji apps}
|
12
12
|
s.description = %q{This gem provides all the tools necessary to develop a rails app meant for deployment on Cloudfuji locally}
|
13
13
|
|
metadata
CHANGED
@@ -1,102 +1,104 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: tane
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.3
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 0.0.4
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- Cloudfuji Team
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
|
13
|
+
date: 2012-05-09 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
15
16
|
name: rspec
|
16
|
-
requirement: &
|
17
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
18
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version:
|
19
|
+
requirements:
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: "0"
|
22
23
|
type: :development
|
23
24
|
prerelease: false
|
24
|
-
version_requirements: *
|
25
|
-
- !ruby/object:Gem::Dependency
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
26
27
|
name: awesome_print
|
27
|
-
requirement: &
|
28
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
29
|
none: false
|
29
|
-
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version:
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0"
|
33
34
|
type: :runtime
|
34
35
|
prerelease: false
|
35
|
-
version_requirements: *
|
36
|
-
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
37
38
|
name: rake
|
38
|
-
requirement: &
|
39
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
40
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version:
|
41
|
+
requirements:
|
42
|
+
- - ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: "0"
|
44
45
|
type: :runtime
|
45
46
|
prerelease: false
|
46
|
-
version_requirements: *
|
47
|
-
- !ruby/object:Gem::Dependency
|
47
|
+
version_requirements: *id003
|
48
|
+
- !ruby/object:Gem::Dependency
|
48
49
|
name: launchy
|
49
|
-
requirement: &
|
50
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
51
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version:
|
52
|
+
requirements:
|
53
|
+
- - ">="
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
version: "0"
|
55
56
|
type: :runtime
|
56
57
|
prerelease: false
|
57
|
-
version_requirements: *
|
58
|
-
- !ruby/object:Gem::Dependency
|
58
|
+
version_requirements: *id004
|
59
|
+
- !ruby/object:Gem::Dependency
|
59
60
|
name: erubis
|
60
|
-
requirement: &
|
61
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
62
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
version:
|
63
|
+
requirements:
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: "0"
|
66
67
|
type: :runtime
|
67
68
|
prerelease: false
|
68
|
-
version_requirements: *
|
69
|
-
- !ruby/object:Gem::Dependency
|
69
|
+
version_requirements: *id005
|
70
|
+
- !ruby/object:Gem::Dependency
|
70
71
|
name: rest-client
|
71
|
-
requirement: &
|
72
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
72
73
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version:
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: "0"
|
77
78
|
type: :runtime
|
78
79
|
prerelease: false
|
79
|
-
version_requirements: *
|
80
|
-
- !ruby/object:Gem::Dependency
|
80
|
+
version_requirements: *id006
|
81
|
+
- !ruby/object:Gem::Dependency
|
81
82
|
name: highline
|
82
|
-
requirement: &
|
83
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
83
84
|
none: false
|
84
|
-
requirements:
|
85
|
-
- -
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version:
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: "0"
|
88
89
|
type: :runtime
|
89
90
|
prerelease: false
|
90
|
-
version_requirements: *
|
91
|
-
description: This gem provides all the tools necessary to develop a rails app meant
|
92
|
-
|
93
|
-
email:
|
91
|
+
version_requirements: *id007
|
92
|
+
description: This gem provides all the tools necessary to develop a rails app meant for deployment on Cloudfuji locally
|
93
|
+
email:
|
94
94
|
- support@gocloudfuji.com
|
95
|
-
executables:
|
95
|
+
executables:
|
96
96
|
- tane
|
97
97
|
extensions: []
|
98
|
+
|
98
99
|
extra_rdoc_files: []
|
99
|
-
|
100
|
+
|
101
|
+
files:
|
100
102
|
- .gitignore
|
101
103
|
- .rspec
|
102
104
|
- Gemfile
|
@@ -142,37 +144,40 @@ files:
|
|
142
144
|
- tane.gemspec
|
143
145
|
- tasks/spec.rake
|
144
146
|
- tasks/tane.rake
|
145
|
-
homepage:
|
147
|
+
homepage: http://cloudfuji.com
|
146
148
|
licenses: []
|
149
|
+
|
147
150
|
post_install_message:
|
148
151
|
rdoc_options: []
|
149
|
-
|
152
|
+
|
153
|
+
require_paths:
|
150
154
|
- lib
|
151
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
155
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
152
156
|
none: false
|
153
|
-
requirements:
|
154
|
-
- -
|
155
|
-
- !ruby/object:Gem::Version
|
156
|
-
|
157
|
-
segments:
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
hash: -2437166570535718601
|
161
|
+
segments:
|
158
162
|
- 0
|
159
|
-
|
160
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
|
+
version: "0"
|
164
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
165
|
none: false
|
162
|
-
requirements:
|
163
|
-
- -
|
164
|
-
- !ruby/object:Gem::Version
|
165
|
-
|
166
|
-
segments:
|
166
|
+
requirements:
|
167
|
+
- - ">="
|
168
|
+
- !ruby/object:Gem::Version
|
169
|
+
hash: -2437166570535718601
|
170
|
+
segments:
|
167
171
|
- 0
|
168
|
-
|
172
|
+
version: "0"
|
169
173
|
requirements: []
|
174
|
+
|
170
175
|
rubyforge_project: tane
|
171
|
-
rubygems_version: 1.8.
|
176
|
+
rubygems_version: 1.8.17
|
172
177
|
signing_key:
|
173
178
|
specification_version: 3
|
174
179
|
summary: Enables local development of Cloudfuji apps
|
175
|
-
test_files:
|
180
|
+
test_files:
|
176
181
|
- spec/commands/base_spec.rb
|
177
182
|
- spec/commands/claim_spec.rb
|
178
183
|
- spec/commands/email_spec.rb
|