dployr 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,108 @@
1
+ require 'spec_helper'
2
+ require 'dployr/commands/utils'
3
+
4
+ describe Dployr::Commands::Utils do
5
+
6
+ describe :parse_matrix do
7
+ describe "replacement using hash" do
8
+ data = "name=dployr ; lang = ruby"
9
+
10
+ before do
11
+ @result = Dployr::Commands::Utils.parse_matrix data
12
+ end
13
+
14
+ it "should return a valid type" do
15
+ @result.should be_a Hash
16
+ end
17
+
18
+ it "should have a valid number of items" do
19
+ @result.should have(2).items
20
+ end
21
+
22
+ it "should exists the name key" do
23
+ @result.should have_key 'name'
24
+ end
25
+
26
+ it "should have a valid value" do
27
+ @result['name'].should eql 'dployr'
28
+ end
29
+
30
+ it "should exists the lang key" do
31
+ @result.should have_key 'lang'
32
+ end
33
+
34
+ it "should have a valid value" do
35
+ @result['lang'].should eql 'ruby'
36
+ end
37
+ end
38
+ end
39
+
40
+ describe :parse_flags do
41
+ describe "replacement using hash" do
42
+ data = "--name dployr --lang ruby "
43
+
44
+ before do
45
+ @result = Dployr::Commands::Utils.parse_flags data
46
+ end
47
+
48
+ it "should return a valid type" do
49
+ @result.should be_a Hash
50
+ end
51
+
52
+ it "should have a valid number of items" do
53
+ @result.should have(2).items
54
+ end
55
+
56
+ it "should exists the name key" do
57
+ @result.should have_key 'name'
58
+ end
59
+
60
+ it "should have a valid value" do
61
+ @result['name'].should eql 'dployr'
62
+ end
63
+
64
+ it "should exists the lang key" do
65
+ @result.should have_key 'lang'
66
+ end
67
+
68
+ it "should have a valid value" do
69
+ @result['lang'].should eql 'ruby'
70
+ end
71
+ end
72
+ end
73
+
74
+ describe :parse_attributes do
75
+ describe "parse matrix values attributes" do
76
+ data = "name=dployr ; lang = ruby"
77
+
78
+ before do
79
+ @result = Dployr::Commands::Utils.parse_attributes data
80
+ end
81
+
82
+ it "should return a valid type" do
83
+ @result.should be_a Hash
84
+ end
85
+
86
+ it "should have a valid number of items" do
87
+ @result.should have(2).items
88
+ end
89
+
90
+ it "should exists the name key" do
91
+ @result.should have_key 'name'
92
+ end
93
+
94
+ it "should have a valid value" do
95
+ @result['name'].should eql 'dployr'
96
+ end
97
+
98
+ it "should exists the lang key" do
99
+ @result.should have_key 'lang'
100
+ end
101
+
102
+ it "should have a valid value" do
103
+ @result['lang'].should eql 'ruby'
104
+ end
105
+ end
106
+ end
107
+
108
+ end
@@ -6,16 +6,19 @@ german-dployr:
6
6
  username: innotechdev
7
7
  scripts:
8
8
  pre-provision:
9
- -
10
- source: ./hello
9
+ - source: ./hello
11
10
  target: /tmp
12
11
  provision:
13
- -
14
- args: ""
15
- path: "/tmp/hello/hello.sh"
16
- -
17
- args: ""
18
- path: "ls -l /tmp"
12
+ # -
13
+ # args: ""
14
+ # remote_path: "/tmp/hello/hello.sh"
15
+ # -
16
+ # args: ""
17
+ # local_path: "ls -l /tmp/"
18
+ # - args: ""
19
+ # remote_path: "sudo service jetty restart"
20
+ - args: ""
21
+ remote_path: "/tmp/hello/jetty.sh"
19
22
  providers:
20
23
  aws:
21
24
  attributes:
@@ -28,3 +31,11 @@ german-dployr:
28
31
  security_groups:
29
32
  - sg-3cf3e45e # lib_aws_saopaulo
30
33
  subnet_id: subnet-1eebe07c
34
+ gce:
35
+ attributes:
36
+ instance_type: f1-micro
37
+ regions:
38
+ europe-west1-a:
39
+ attributes:
40
+ image_name: centos-base-v7 # centos-base-v7
41
+ network: liberty-gce
data/spec/utils_spec.rb CHANGED
@@ -104,74 +104,6 @@ describe Dployr::Utils do
104
104
  end
105
105
  end
106
106
 
107
- describe :parse_matrix do
108
- describe "replacement using hash" do
109
- data = "name=dployr ; lang = ruby"
110
-
111
- before do
112
- @result = Dployr::Utils.parse_matrix data
113
- end
114
-
115
- it "should return a valid type" do
116
- @result.should be_a Hash
117
- end
118
-
119
- it "should have a valid number of items" do
120
- @result.should have(2).items
121
- end
122
-
123
- it "should exists the name key" do
124
- @result.should have_key 'name'
125
- end
126
-
127
- it "should have a valid value" do
128
- @result['name'].should eql 'dployr'
129
- end
130
-
131
- it "should exists the lang key" do
132
- @result.should have_key 'lang'
133
- end
134
-
135
- it "should have a valid value" do
136
- @result['lang'].should eql 'ruby'
137
- end
138
- end
139
- end
140
-
141
- describe :parse_flags do
142
- describe "replacement using hash" do
143
- data = "--name dployr --lang ruby "
144
-
145
- before do
146
- @result = Dployr::Utils.parse_flags data
147
- end
148
-
149
- it "should return a valid type" do
150
- @result.should be_a Hash
151
- end
152
-
153
- it "should have a valid number of items" do
154
- @result.should have(2).items
155
- end
156
-
157
- it "should exists the name key" do
158
- @result.should have_key 'name'
159
- end
160
-
161
- it "should have a valid value" do
162
- @result['name'].should eql 'dployr'
163
- end
164
-
165
- it "should exists the lang key" do
166
- @result.should have_key 'lang'
167
- end
168
-
169
- it "should have a valid value" do
170
- @result['lang'].should eql 'ruby'
171
- end
172
- end
173
- end
174
-
175
107
  describe :replace_env_vars do
176
108
  describe "environment variable" do
177
109
  before :all do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dployr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomas Aparicio
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-24 00:00:00.000000000 Z
12
+ date: 2014-04-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: fog
@@ -127,17 +127,19 @@ files:
127
127
  - README.md
128
128
  - Rakefile
129
129
  - bin/dployr
130
- - config/Dployrfile.yml
131
- - config/hello/hello.sh
132
130
  - dployr.gemspec
133
131
  - lib/dployr.rb
134
132
  - lib/dployr/cli.rb
133
+ - lib/dployr/commands/base.rb
135
134
  - lib/dployr/commands/config.rb
136
135
  - lib/dployr/commands/execute.rb
137
136
  - lib/dployr/commands/provision_test.rb
137
+ - lib/dployr/commands/ssh.rb
138
138
  - lib/dployr/commands/start.rb
139
139
  - lib/dployr/commands/stop_destroy.rb
140
+ - lib/dployr/commands/utils.rb
140
141
  - lib/dployr/compute/aws.rb
142
+ - lib/dployr/compute/gce.rb
141
143
  - lib/dployr/config/constants.rb
142
144
  - lib/dployr/config/create.rb
143
145
  - lib/dployr/config/file_utils.rb
@@ -147,15 +149,20 @@ files:
147
149
  - lib/dployr/logger.rb
148
150
  - lib/dployr/scripts/default_hooks.rb
149
151
  - lib/dployr/scripts/hook.rb
152
+ - lib/dployr/scripts/local_shell.rb
150
153
  - lib/dployr/scripts/scp.rb
151
154
  - lib/dployr/scripts/shell.rb
155
+ - lib/dployr/scripts/ssh.rb
152
156
  - lib/dployr/utils.rb
153
157
  - lib/dployr/version.rb
158
+ - spec/commands_util_spec.rb
154
159
  - spec/config_file_utils_spec.rb
155
160
  - spec/config_instance_spec.rb
156
161
  - spec/configuration_spec.rb
157
162
  - spec/fixtures/Dployrfile
158
163
  - spec/fixtures/Dployrfile.yml
164
+ - spec/fixtures/config/Dployrfile.yml
165
+ - spec/fixtures/config/hello/hello.sh
159
166
  - spec/fog_spec_.rb
160
167
  - spec/init_spec.rb
161
168
  - spec/spec_helper.rb
@@ -181,16 +188,19 @@ required_rubygems_version: !ruby/object:Gem::Requirement
181
188
  version: '0'
182
189
  requirements: []
183
190
  rubyforge_project: dployr
184
- rubygems_version: 2.0.6
191
+ rubygems_version: 2.0.3
185
192
  signing_key:
186
193
  specification_version: 4
187
194
  summary: Multicloud management and deployment with asteroids made simple
188
195
  test_files:
196
+ - spec/commands_util_spec.rb
189
197
  - spec/config_file_utils_spec.rb
190
198
  - spec/config_instance_spec.rb
191
199
  - spec/configuration_spec.rb
192
200
  - spec/fixtures/Dployrfile
193
201
  - spec/fixtures/Dployrfile.yml
202
+ - spec/fixtures/config/Dployrfile.yml
203
+ - spec/fixtures/config/hello/hello.sh
194
204
  - spec/fog_spec_.rb
195
205
  - spec/init_spec.rb
196
206
  - spec/spec_helper.rb
File without changes