ey_enzyme 0.9.45.ruby19 → 0.9.45.ruby19.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module EY
2
2
  module Enzyme
3
- VERSION = "0.9.45.ruby19"
3
+ VERSION = "0.9.45.ruby19.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ey_enzyme
3
3
  version: !ruby/object:Gem::Version
4
- hash: -483342322
4
+ hash: -966684450
5
5
  prerelease: 7
6
6
  segments:
7
7
  - 0
@@ -9,7 +9,8 @@ version: !ruby/object:Gem::Version
9
9
  - 45
10
10
  - ruby
11
11
  - 19
12
- version: 0.9.45.ruby19
12
+ - 1
13
+ version: 0.9.45.ruby19.1
13
14
  platform: ruby
14
15
  authors:
15
16
  - Engine Yard Inc.
@@ -83,26 +84,10 @@ dependencies:
83
84
  version: 0.2.5
84
85
  type: :runtime
85
86
  version_requirements: *id004
86
- - !ruby/object:Gem::Dependency
87
- name: logglier
88
- prerelease: false
89
- requirement: &id005 !ruby/object:Gem::Requirement
90
- none: false
91
- requirements:
92
- - - ~>
93
- - !ruby/object:Gem::Version
94
- hash: 29
95
- segments:
96
- - 0
97
- - 2
98
- - 5
99
- version: 0.2.5
100
- type: :runtime
101
- version_requirements: *id005
102
87
  - !ruby/object:Gem::Dependency
103
88
  name: rake
104
89
  prerelease: false
105
- requirement: &id006 !ruby/object:Gem::Requirement
90
+ requirement: &id005 !ruby/object:Gem::Requirement
106
91
  none: false
107
92
  requirements:
108
93
  - - ">="
@@ -112,11 +97,11 @@ dependencies:
112
97
  - 0
113
98
  version: "0"
114
99
  type: :development
115
- version_requirements: *id006
100
+ version_requirements: *id005
116
101
  - !ruby/object:Gem::Dependency
117
102
  name: rspec
118
103
  prerelease: false
119
- requirement: &id007 !ruby/object:Gem::Requirement
104
+ requirement: &id006 !ruby/object:Gem::Requirement
120
105
  none: false
121
106
  requirements:
122
107
  - - ~>
@@ -127,11 +112,11 @@ dependencies:
127
112
  - 2
128
113
  version: "1.2"
129
114
  type: :development
130
- version_requirements: *id007
115
+ version_requirements: *id006
131
116
  - !ruby/object:Gem::Dependency
132
117
  name: fakeweb
133
118
  prerelease: false
134
- requirement: &id008 !ruby/object:Gem::Requirement
119
+ requirement: &id007 !ruby/object:Gem::Requirement
135
120
  none: false
136
121
  requirements:
137
122
  - - ">="
@@ -141,11 +126,11 @@ dependencies:
141
126
  - 0
142
127
  version: "0"
143
128
  type: :development
144
- version_requirements: *id008
129
+ version_requirements: *id007
145
130
  - !ruby/object:Gem::Dependency
146
131
  name: fakeweb-matcher
147
132
  prerelease: false
148
- requirement: &id009 !ruby/object:Gem::Requirement
133
+ requirement: &id008 !ruby/object:Gem::Requirement
149
134
  none: false
150
135
  requirements:
151
136
  - - ">="
@@ -155,7 +140,7 @@ dependencies:
155
140
  - 0
156
141
  version: "0"
157
142
  type: :development
158
- version_requirements: *id009
143
+ version_requirements: *id008
159
144
  description: Gem for kicking off chef recipes
160
145
  email: ninja@engineyard.com
161
146
  executables:
@@ -175,11 +160,6 @@ files:
175
160
  - lib/ey_enzyme.rb
176
161
  - bin/ey-enzyme
177
162
  - bin/ey-recipes
178
- - spec/api_spec.rb
179
- - spec/log_upload_error_notify_spec.rb
180
- - spec/logging_spec.rb
181
- - spec/retry_report_and_notify_success_spec.rb
182
- - spec/spec_helper.rb
183
163
  homepage: http://github.com/engineyard/ey_enzyme
184
164
  licenses: []
185
165
 
@@ -215,9 +195,6 @@ rubygems_version: 1.8.6
215
195
  signing_key:
216
196
  specification_version: 3
217
197
  summary: Gem for kicking off chef recipes
218
- test_files:
219
- - spec/api_spec.rb
220
- - spec/log_upload_error_notify_spec.rb
221
- - spec/logging_spec.rb
222
- - spec/retry_report_and_notify_success_spec.rb
223
- - spec/spec_helper.rb
198
+ test_files: []
199
+
200
+ has_rdoc:
@@ -1,44 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
- require 'stringio'
3
-
4
- describe "enzyme API" do
5
-
6
- before { FakeWeb.allow_net_connect = false }
7
- after { FakeWeb.allow_net_connect = true }
8
-
9
- def new_api(*args)
10
- old_stderr = $stderr
11
- $stderr = StringIO.new
12
- api = EY::Enzyme::API.new(*args)
13
- $stderr = old_stderr
14
- api
15
- end
16
-
17
- context "with an EY::Enzyme::API" do
18
- before do
19
- @enzyme_api = new_api("https://cloud.engineyard.com/dracul",
20
- "i-d8babcb5",
21
- "8c40f5769f8987489ec66a3abc944123fc0f043c",
22
- File.dirname(__FILE__) + '/../tmp/test.log')
23
- end
24
-
25
- it "should be able to post errors" do
26
- FakeWeb.register_uri(
27
- :post,
28
- "https://cloud.engineyard.com/dracul/error",
29
- :body => {}.to_json
30
- )
31
-
32
- begin
33
- raise "we fail"
34
- rescue => e
35
- #WE need to do this because the exception is expected to have a backtrace
36
- @enzyme_api.notify_error("user", e)
37
- end
38
-
39
- FakeWeb.should have_requested(:post, "https://cloud.engineyard.com/dracul/error")
40
- end
41
-
42
- end
43
-
44
- end
@@ -1,45 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe "EY::Enzyme::CookbookSet#upload" do
4
- before do
5
- FakeWeb.clean_registry
6
- @api_url = "https://cloud.engineyard.example.com/dracul"
7
-
8
- fake_cheflog_location = File.expand_path(File.dirname(__FILE__) + '/../tmp/clitestlog')
9
- logfile_location = File.expand_path(File.dirname(__FILE__) + '/../tmp/clitestlog')
10
- @cookbooks = EY::Enzyme::CLI.new(:logfile => logfile_location, :api => @api_url).main_cookbooks
11
-
12
- #HAX: (might as well be a mock)
13
- @cookbooks.instance_eval {
14
- @chef_log = fake_cheflog_location
15
- }
16
- end
17
-
18
- it "posts the log file to /store" do
19
- FakeWeb.register_uri(
20
- :post,
21
- @api_url + "/store",
22
- :body => {}.to_json
23
- )
24
- @cookbooks.upload
25
- end
26
-
27
- it "posts an error when attempt to upload logs returns 500" do
28
- FakeWeb.register_uri(
29
- :post,
30
- @api_url + "/store",
31
- :body => {}.to_json,
32
- :status => ["500", "Internal Server Error"]
33
- )
34
- FakeWeb.register_uri(
35
- :post,
36
- @api_url + "/error",
37
- :body => {}.to_json
38
- )
39
- @cookbooks.upload
40
- posted = JSON.parse(FakeWeb.last_request.body.to_s)
41
- posted["where_failed"].should == "logupload"
42
- posted["message"].should == "failed to upload main log"
43
- end
44
-
45
- end
@@ -1,9 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe EY::Enzyme::MultiLogger do
4
-
5
- before do
6
- FakeWeb.clean_registry
7
- FakeWeb.allow_net_connect = false
8
- end
9
- end
@@ -1,62 +0,0 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
-
3
- describe "EY::Enzyme::API" do
4
- before do
5
- FakeWeb.clean_registry
6
- @api_url = "https://cloud.engineyard.example.com/dracul"
7
-
8
- logfile_location = File.expand_path(File.dirname(__FILE__) + '/../tmp/clitestlog')
9
- @cli = EY::Enzyme::CLI.new(:logfile => logfile_location, :api => @api_url)
10
- @api = @cli.instance_eval{ @api }
11
- end
12
-
13
- describe "notify_success" do
14
- it "can notify success" do
15
- FakeWeb.register_uri(
16
- :post,
17
- @api_url + "/completed",
18
- :body => {}.to_json
19
- )
20
- @api.notify_success
21
- end
22
-
23
- it "retries on 502" do
24
- FakeWeb.register_uri(
25
- :post,
26
- @api_url + "/completed",
27
- [
28
- {:body => {}.to_json, :status => ["502", "Bad Gateway"]},
29
- {:body => {}.to_json, :status => ["200", "Success"]},
30
- ]
31
- )
32
- lambda{ @api.notify_success }.should_not raise_error
33
- end
34
- end
35
-
36
- describe "report" do
37
- it "can report chef statuses" do
38
- FakeWeb.register_uri(
39
- :post,
40
- @api_url + "/report",
41
- :body => {}.to_json
42
- )
43
- @api.report 'report some status'
44
-
45
- posted = JSON.parse(FakeWeb.last_request.body.to_s)
46
- posted["message"].should == "report some status"
47
- end
48
-
49
- it "doesn't raise or retry on 502" do
50
- FakeWeb.register_uri(
51
- :post,
52
- @api_url + "/report",
53
- [
54
- {:body => {}.to_json, :status => ["502", "Bad Gateway"]},
55
- {:body => lambda{ raise "no!" }}, #bad bad hax, doesn't work the way you would hope
56
- ]
57
- )
58
- lambda{ @api.report 'some status update' }.should_not raise_error
59
- end
60
- end
61
-
62
- end
@@ -1,9 +0,0 @@
1
- $:.unshift File.expand_path(File.dirname(__FILE__) + '/../lib')
2
-
3
- require 'ey_enzyme'
4
- require 'fakeweb'
5
- require 'fakeweb_matcher'
6
-
7
- tmpdir = File.expand_path(File.dirname(__FILE__) + '/../tmp')
8
- FileUtils.mkdir_p tmpdir
9
- FileUtils.rm Dir.glob("#{tmpdir}/*")