rumm 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +8 -0
- data/README.md +5 -0
- data/app/controllers/authentication_controller.rb +15 -20
- data/app/controllers/databases_controller.rb +0 -1
- data/app/controllers/servers_controller.rb +10 -7
- data/app/controllers/users_controller.rb +22 -0
- data/app/forms/loadbalancers/create_form.rb +2 -0
- data/app/forms/servers/create_form.rb +7 -0
- data/app/forms/users/create_form.rb +10 -0
- data/app/providers/user_provider.rb +1 -1
- data/app/routes.rb +4 -0
- data/app/views/users/create.txt.erb +1 -0
- data/app/views/users/index.txt.erb +7 -0
- data/lib/rumm/version.rb +1 -1
- data/spec/features/login_spec.rb +13 -14
- data/spec/features/servers_spec.rb +5 -10
- data/spec/fixtures/cassettes/create-server.yml +20 -78
- data/spec/fixtures/cassettes/destroy-server.yml +32 -64
- data/spec/fixtures/cassettes/show-server.yml +52 -87
- data/spec/fixtures/cassettes/show-servers.yml +29 -76
- data/spec/fixtures/cassettes/successful-login.yml +78 -0
- data/spec/spec_helper.rb +53 -13
- metadata +10 -2
data/spec/spec_helper.rb
CHANGED
@@ -3,11 +3,19 @@ require "vcr"
|
|
3
3
|
require "aruba/api"
|
4
4
|
require "rspec-given"
|
5
5
|
|
6
|
+
module Rumm::WillType
|
7
|
+
def will_type(string)
|
8
|
+
Aruba::InProcess.main_class.input << _ensure_newline(string)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
6
12
|
RSpec.configure do |config|
|
7
13
|
config.color_enabled = true
|
8
14
|
config.include Aruba::Api, :example_group => {
|
9
|
-
|
15
|
+
:file_path => /spec\/features/
|
10
16
|
}
|
17
|
+
config.include Rumm::WillType
|
18
|
+
|
11
19
|
config.before(:each) do
|
12
20
|
@__aruba_original_paths = (ENV['PATH'] || '').split(File::PATH_SEPARATOR)
|
13
21
|
ENV['PATH'] = ([File.expand_path('bin')] + @__aruba_original_paths).join(File::PATH_SEPARATOR)
|
@@ -19,16 +27,30 @@ RSpec.configure do |config|
|
|
19
27
|
end
|
20
28
|
|
21
29
|
VCR.configure do |c|
|
22
|
-
c.default_cassette_options = {
|
30
|
+
c.default_cassette_options = {:record => :new_episodes}
|
23
31
|
c.hook_into :excon
|
24
|
-
#
|
32
|
+
#c.debug_logger = $stderr
|
25
33
|
|
26
34
|
c.cassette_library_dir = 'spec/fixtures/cassettes'
|
27
|
-
c.filter_sensitive_data("<rackspace-
|
28
|
-
ENV['
|
35
|
+
c.filter_sensitive_data("<rackspace-username>") do
|
36
|
+
ENV['RACKSPACE_USERNAME']
|
29
37
|
end
|
30
|
-
c.filter_sensitive_data("<rackspace-
|
31
|
-
ENV['
|
38
|
+
c.filter_sensitive_data("<rackspace-password>") do
|
39
|
+
ENV['RACKSPACE_PASSWORD']
|
40
|
+
end
|
41
|
+
c.filter_sensitive_data("<rackspace-api-token>") do |interaction|
|
42
|
+
if interaction.response.body =~ /"token":{"id":"(\w+)"/
|
43
|
+
$1
|
44
|
+
elsif token = interaction.request.headers['X-Auth-Token']
|
45
|
+
token.first
|
46
|
+
end
|
47
|
+
end
|
48
|
+
c.filter_sensitive_data("<rackspace-api-key>") do |interaction|
|
49
|
+
if interaction.response.body =~ /"apiKey":"(\w+)"/
|
50
|
+
$1
|
51
|
+
else
|
52
|
+
ENV['RACKSPACE_API_KEY']
|
53
|
+
end
|
32
54
|
end
|
33
55
|
end
|
34
56
|
|
@@ -38,14 +60,32 @@ require_relative "../app"
|
|
38
60
|
Aruba.process = Aruba::InProcess
|
39
61
|
class Aruba::InProcess
|
40
62
|
attr_reader :stdin
|
41
|
-
self.main_class = Class.new do
|
42
63
|
|
43
|
-
def
|
44
|
-
|
64
|
+
def self.main_class;
|
65
|
+
@@main_class;
|
45
66
|
end
|
46
67
|
|
47
|
-
|
48
|
-
|
49
|
-
|
68
|
+
self.main_class = Class.new do
|
69
|
+
@@input = ""
|
70
|
+
class << self
|
71
|
+
def input
|
72
|
+
@@input
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
def initialize(argv, stdin=STDIN, stdout=STDOUT, stderr=STDERR, kernel=Kernel)
|
77
|
+
@argv, @stdin, @stdout, @stderr, @kernel = argv, stdin, stdout, stderr, kernel
|
78
|
+
|
79
|
+
def @stdin.noecho
|
80
|
+
yield self
|
81
|
+
end
|
82
|
+
|
83
|
+
@stdin << @@input
|
84
|
+
@stdin.rewind
|
85
|
+
end
|
86
|
+
|
87
|
+
def execute!
|
88
|
+
@kernel.exit Rumm::App.main @argv, @stdin, @stdout, @stderr
|
89
|
+
end
|
50
90
|
end
|
51
91
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rumm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Charles Lowell
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
UgImJlChAzCoDP9zi9tdm6jAr7ttF25R9PPYr11ILb7dYe3qUzlNlM6zJx/nb31b
|
30
30
|
IhdyRVup4qLcqYSTPsm6u7VA
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2013-06-
|
32
|
+
date: 2013-06-28 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: mvcli
|
@@ -82,6 +82,7 @@ extensions: []
|
|
82
82
|
extra_rdoc_files: []
|
83
83
|
files:
|
84
84
|
- .gitignore
|
85
|
+
- .travis.yml
|
85
86
|
- Gemfile
|
86
87
|
- LICENSE.txt
|
87
88
|
- README.md
|
@@ -97,8 +98,11 @@ files:
|
|
97
98
|
- app/controllers/loadbalancers_controller.rb
|
98
99
|
- app/controllers/nodes_controller.rb
|
99
100
|
- app/controllers/servers_controller.rb
|
101
|
+
- app/controllers/users_controller.rb
|
100
102
|
- app/controllers/volumes_controller.rb
|
101
103
|
- app/forms/loadbalancers/create_form.rb
|
104
|
+
- app/forms/servers/create_form.rb
|
105
|
+
- app/forms/users/create_form.rb
|
102
106
|
- app/models/loadbalancers/node.rb
|
103
107
|
- app/models/node.rb
|
104
108
|
- app/providers/compute_provider.rb
|
@@ -152,6 +156,8 @@ files:
|
|
152
156
|
- app/views/servers/destroy.txt.erb
|
153
157
|
- app/views/servers/index.txt.erb
|
154
158
|
- app/views/servers/show.txt.erb
|
159
|
+
- app/views/users/create.txt.erb
|
160
|
+
- app/views/users/index.txt.erb
|
155
161
|
- app/views/volumes/create.txt.erb
|
156
162
|
- app/views/volumes/destroy.txt.erb
|
157
163
|
- app/views/volumes/index.txt.erb
|
@@ -166,6 +172,7 @@ files:
|
|
166
172
|
- spec/fixtures/cassettes/destroy-server.yml
|
167
173
|
- spec/fixtures/cassettes/show-server.yml
|
168
174
|
- spec/fixtures/cassettes/show-servers.yml
|
175
|
+
- spec/fixtures/cassettes/successful-login.yml
|
169
176
|
- spec/spec_helper.rb
|
170
177
|
- tmp/aruba/.gitkeep
|
171
178
|
homepage: https://github.com/rackerlabs/rumm
|
@@ -199,5 +206,6 @@ test_files:
|
|
199
206
|
- spec/fixtures/cassettes/destroy-server.yml
|
200
207
|
- spec/fixtures/cassettes/show-server.yml
|
201
208
|
- spec/fixtures/cassettes/show-servers.yml
|
209
|
+
- spec/fixtures/cassettes/successful-login.yml
|
202
210
|
- spec/spec_helper.rb
|
203
211
|
has_rdoc:
|