dumbwaiter 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dcaf684002c436fa32d8091bbc6bfc5058d244cd
4
- data.tar.gz: 6118f4b3bb27ca9f007c6421b518e3a9cac822ac
3
+ metadata.gz: 144e43406270d861ff03250b42717c1fca4cb17a
4
+ data.tar.gz: 90cf16676be9fdc75536391367a8f043aa4260a9
5
5
  SHA512:
6
- metadata.gz: 6f73d6c80660e706b578b01648595fc33af488f9891a877f66d210c4d75bbfec7f84f9361e88ef02f2a125b2053c8327df5e63b74f0da84f6bb4e33fbda1a4a8
7
- data.tar.gz: 0226c5b905d5bb1b872691123bb514c4cab48ca57a3888adb4ba4e283588d4914c8efad029ecab0106930fd21b0e019c532c0672ba6842c9f2057e1740af110c
6
+ metadata.gz: 326d414c33245ea31395736b969ed59b59cf7640c8e727b742805405cedfa91a5efc5d05d1b83381ddb3b156d96fdb4590f2fb8bcdd86802271665ffdad806a1
7
+ data.tar.gz: a877c62dd926ec4b2befa11eda73a5b013acff804ba817243bd67d583fc3e81bf1c36688ca8825a5a5f2b9d28da5695264c577117eeee781f19f4e6d201985f8
@@ -86,14 +86,6 @@ class Dumbwaiter::Mock
86
86
  instance
87
87
  end
88
88
 
89
- def create_instance(params = {})
90
- params[:stack_id] ||= create_stack.stack_id
91
- params[:layer_id] ||= create_layer.layer_id
92
- instance = OpenStruct.new(params.merge(instance_id: make_id))
93
- instances << instance
94
- instance
95
- end
96
-
97
89
  def create_user_profile(params = {})
98
90
  params[:iam_user_arn] ||= Faker::Name.first_name.downcase
99
91
  params[:ssh_username] ||= Faker::Name.first_name.downcase
@@ -6,6 +6,7 @@ class Dumbwaiter::UserProfile
6
6
  end
7
7
 
8
8
  def self.find(iam_user_arn, opsworks = Aws::OpsWorks.new(region: "us-east-1"))
9
+ return nil if iam_user_arn.nil?
9
10
  unless cache.has_key?(iam_user_arn)
10
11
  cache[iam_user_arn] = opsworks.describe_user_profiles(iam_user_arns: [iam_user_arn]).user_profiles.detect { |p| p.iam_user_arn == iam_user_arn }
11
12
  end
@@ -1,3 +1,3 @@
1
1
  module Dumbwaiter
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
@@ -22,5 +22,16 @@ describe Dumbwaiter::UserProfile do
22
22
  Dumbwaiter::UserProfile.find("schwarz", fake_opsworks)
23
23
  Dumbwaiter::UserProfile.find("schwarz", fake_opsworks)
24
24
  end
25
+
26
+ context "when the incoming user arn is nil" do
27
+ it "returns nil" do
28
+ Dumbwaiter::UserProfile.find(nil, fake_opsworks).should be_nil
29
+ end
30
+
31
+ it "does not ask opsworks for the user profile" do
32
+ fake_opsworks.should_not_receive(:describe_user_profiles)
33
+ Dumbwaiter::UserProfile.find(nil, fake_opsworks)
34
+ end
35
+ end
25
36
  end
26
37
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dumbwaiter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Doc Ritezel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-08 00:00:00.000000000 Z
11
+ date: 2014-01-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core