stacker_bee 2.1.1.pre252 → 2.1.1.pre263
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.rubocop.yml +0 -3
- data/Rakefile +1 -1
- data/bin/stacker_bee +10 -10
- data/lib/stacker_bee/api.rb +4 -4
- data/lib/stacker_bee/client.rb +24 -24
- data/lib/stacker_bee/configuration.rb +13 -7
- data/lib/stacker_bee/connection.rb +5 -5
- data/lib/stacker_bee/http_middleware/detokenizer.rb +2 -2
- data/lib/stacker_bee/http_middleware/signed_query.rb +3 -3
- data/lib/stacker_bee/middleware/adapter.rb +1 -1
- data/lib/stacker_bee/middleware/base.rb +1 -1
- data/lib/stacker_bee/middleware/clean_response.rb +2 -2
- data/lib/stacker_bee/middleware/cloud_stack_api.rb +2 -2
- data/lib/stacker_bee/middleware/dictionary_flattener.rb +3 -3
- data/lib/stacker_bee/middleware/endpoint_normalizer.rb +2 -2
- data/lib/stacker_bee/middleware/error_message.rb +3 -3
- data/lib/stacker_bee/middleware/log_response.rb +1 -1
- data/lib/stacker_bee/middleware/raise_on_http_error.rb +1 -1
- data/lib/stacker_bee/middleware/remove_nils.rb +1 -1
- data/lib/stacker_bee/rash.rb +3 -3
- data/lib/stacker_bee/version.rb +1 -1
- data/lib/stacker_bee.rb +2 -2
- data/spec/integration/configure_middleware_spec.rb +12 -12
- data/spec/integration/console_spec.rb +4 -4
- data/spec/integration/request_spec.rb +46 -46
- data/spec/spec_helper.rb +4 -4
- data/spec/support/vcr.rb +4 -4
- data/spec/units/stacker_bee/api_spec.rb +11 -11
- data/spec/units/stacker_bee/client_spec.rb +19 -19
- data/spec/units/stacker_bee/configuration_spec.rb +28 -28
- data/spec/units/stacker_bee/connection_spec.rb +18 -18
- data/spec/units/stacker_bee/middleware/adapter_spec.rb +7 -7
- data/spec/units/stacker_bee/middleware/base_spec.rb +17 -17
- data/spec/units/stacker_bee/middleware/cloudstack_api_spec.rb +9 -9
- data/spec/units/stacker_bee/middleware/console_access_spec.rb +10 -10
- data/spec/units/stacker_bee/middleware/dictionary_flattener_spec.rb +22 -22
- data/spec/units/stacker_bee/middleware/endpoint_normalizer_spec.rb +4 -4
- data/spec/units/stacker_bee/middleware/error_message_spec.rb +6 -6
- data/spec/units/stacker_bee/middleware/format_keys_spec.rb +2 -2
- data/spec/units/stacker_bee/middleware/format_values_spec.rb +2 -2
- data/spec/units/stacker_bee/middleware/http_status_spec.rb +2 -2
- data/spec/units/stacker_bee/middleware/log_response_spec.rb +15 -15
- data/spec/units/stacker_bee/middleware/remove_empty_strings_spec.rb +4 -4
- data/spec/units/stacker_bee/middleware/remove_nils_spec.rb +1 -1
- data/spec/units/stacker_bee/rash_spec.rb +41 -41
- data/spec/units/stacker_bee/request_error_spec.rb +7 -7
- data/spec/units/stacker_bee/utilities_spec.rb +30 -30
- data/spec/units/stacker_bee_spec.rb +2 -2
- data/stacker_bee.gemspec +24 -22
- metadata +4 -4
@@ -1,32 +1,32 @@
|
|
1
|
-
require
|
1
|
+
require 'spec_helper'
|
2
2
|
|
3
|
-
describe StackerBee::Utilities,
|
3
|
+
describe StackerBee::Utilities, '#uncase' do
|
4
4
|
include StackerBee::Utilities
|
5
5
|
|
6
|
-
it { uncase(
|
7
|
-
it { uncase(
|
8
|
-
it { uncase(
|
9
|
-
it { uncase(
|
10
|
-
it { uncase(
|
11
|
-
|
12
|
-
it { snake_case(
|
13
|
-
it { snake_case(
|
14
|
-
it { snake_case(
|
15
|
-
it { snake_case(
|
16
|
-
|
17
|
-
it { camel_case(
|
18
|
-
it { camel_case(
|
19
|
-
it { camel_case(
|
20
|
-
it { camel_case(
|
21
|
-
|
22
|
-
it { camel_case(
|
23
|
-
it { camel_case(
|
24
|
-
it { camel_case(
|
25
|
-
it { camel_case(
|
26
|
-
it { camel_case(
|
27
|
-
it { camel_case(
|
28
|
-
|
29
|
-
describe
|
6
|
+
it { uncase('Foo Bar').should eq 'foobar' }
|
7
|
+
it { uncase('foo_bar').should eq 'foobar' }
|
8
|
+
it { uncase('foo-bar').should eq 'foobar' }
|
9
|
+
it { uncase('fooBar').should eq 'foobar' }
|
10
|
+
it { uncase('foo[0].Bar').should eq 'foo[0].bar' }
|
11
|
+
|
12
|
+
it { snake_case('Foo Bar').should eq 'foo_bar' }
|
13
|
+
it { snake_case('foo_bar').should eq 'foo_bar' }
|
14
|
+
it { snake_case('foo-bar').should eq 'foo_bar' }
|
15
|
+
it { snake_case('fooBar').should eq 'foo_bar' }
|
16
|
+
|
17
|
+
it { camel_case('Foo Bar').should eq 'FooBar' }
|
18
|
+
it { camel_case('foo_bar').should eq 'FooBar' }
|
19
|
+
it { camel_case('foo-bar').should eq 'FooBar' }
|
20
|
+
it { camel_case('fooBar').should eq 'FooBar' }
|
21
|
+
|
22
|
+
it { camel_case('Foo Bar', true).should eq 'fooBar' }
|
23
|
+
it { camel_case('foo_bar', true).should eq 'fooBar' }
|
24
|
+
it { camel_case('foo-bar', true).should eq 'fooBar' }
|
25
|
+
it { camel_case('fooBar', true).should eq 'fooBar' }
|
26
|
+
it { camel_case('fooBar', false).should eq 'FooBar' }
|
27
|
+
it { camel_case('foo[0].Bar', false).should eq 'Foo[0].Bar' }
|
28
|
+
|
29
|
+
describe '#map_a_hash' do
|
30
30
|
let(:original) { { 1 => 1, 2 => 2 } }
|
31
31
|
let(:expected) { { 2 => -1, 4 => -2 } }
|
32
32
|
|
@@ -34,21 +34,21 @@ describe StackerBee::Utilities, "#uncase" do
|
|
34
34
|
map_a_hash(original) { |key, value| [key * 2, value * -1] }
|
35
35
|
end
|
36
36
|
|
37
|
-
it
|
37
|
+
it 'maps over a hash' do
|
38
38
|
transformed.should eq expected
|
39
39
|
end
|
40
40
|
|
41
|
-
it
|
41
|
+
it 'does not modify the original' do
|
42
42
|
original.freeze
|
43
43
|
transformed
|
44
44
|
end
|
45
45
|
end
|
46
46
|
|
47
|
-
describe
|
47
|
+
describe '.transform_hash_keys' do
|
48
48
|
it { transform_hash_keys({ 1 => 2 }, &:odd?).should eq true => 2 }
|
49
49
|
end
|
50
50
|
|
51
|
-
describe
|
51
|
+
describe '.transform_hash_values' do
|
52
52
|
it { transform_hash_values({ 1 => 2 }, &:odd?).should eq 1 => false }
|
53
53
|
end
|
54
54
|
end
|
data/stacker_bee.gemspec
CHANGED
@@ -4,38 +4,40 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'stacker_bee/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'stacker_bee'
|
8
8
|
spec.version = StackerBee::VERSION
|
9
9
|
spec.platform = Gem::Platform::RUBY
|
10
|
-
spec.authors = [
|
11
|
-
spec.email = [
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
14
|
-
spec.homepage =
|
15
|
-
spec.license =
|
10
|
+
spec.authors = ['Greg Sterndale', 'Mike Nicholaides']
|
11
|
+
spec.email = ['team@promptworks.com']
|
12
|
+
spec.summary = 'Ruby CloudStack client'
|
13
|
+
spec.description = 'Ruby CloudStack client and CLI'
|
14
|
+
spec.homepage = 'http://github.com/promptworks/stacker_bee'
|
15
|
+
spec.license = 'MIT'
|
16
16
|
|
17
|
-
spec.files = `git ls-files`.split(
|
18
|
-
spec.executables = spec.files.grep(
|
19
|
-
spec.test_files = spec.files.grep(
|
20
|
-
spec.require_paths = [
|
17
|
+
spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
18
|
+
spec.executables = spec.files.grep(/^bin\//) { |f| File.basename(f) }
|
19
|
+
spec.test_files = spec.files.grep(/^(test|spec|features)\//)
|
20
|
+
spec.require_paths = ['lib']
|
21
21
|
|
22
|
-
spec.add_runtime_dependency
|
23
|
-
spec.add_runtime_dependency 'multi_json',
|
22
|
+
spec.add_runtime_dependency 'faraday', '~> 0.8', '< 0.9'
|
23
|
+
spec.add_runtime_dependency 'multi_json', '~> 1.8'
|
24
24
|
|
25
25
|
# this is a dependency for FaradayMiddleware::Graylog
|
26
|
-
spec.add_runtime_dependency
|
26
|
+
spec.add_runtime_dependency 'faraday_middleware', '~> 0.9'
|
27
27
|
|
28
|
-
spec.add_development_dependency
|
29
|
-
spec.add_development_dependency
|
30
|
-
spec.add_development_dependency
|
31
|
-
spec.add_development_dependency
|
32
|
-
spec.add_development_dependency
|
33
|
-
spec.add_development_dependency
|
28
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
29
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
30
|
+
spec.add_development_dependency 'rspec', '~> 2.1'
|
31
|
+
spec.add_development_dependency 'webmock', '~> 1.15'
|
32
|
+
spec.add_development_dependency 'vcr', '~> 2.6'
|
33
|
+
spec.add_development_dependency 'pry'
|
34
34
|
|
35
35
|
# It should be consistent for Travis and all developers, since we don't check
|
36
36
|
# in the Gemfile.lock
|
37
|
-
spec.add_development_dependency
|
37
|
+
spec.add_development_dependency 'rubocop', '0.24.1'
|
38
38
|
|
39
39
|
# Release every merge to master as a prerelease
|
40
|
-
|
40
|
+
if ENV['TRAVIS']
|
41
|
+
spec.version = "#{spec.version}.pre#{ENV['TRAVIS_BUILD_NUMBER']}"
|
42
|
+
end
|
41
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stacker_bee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.1.
|
4
|
+
version: 2.1.1.pre263
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Sterndale
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: faraday
|
@@ -149,14 +149,14 @@ dependencies:
|
|
149
149
|
requirements:
|
150
150
|
- - '='
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
152
|
+
version: 0.24.1
|
153
153
|
type: :development
|
154
154
|
prerelease: false
|
155
155
|
version_requirements: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
157
|
- - '='
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.
|
159
|
+
version: 0.24.1
|
160
160
|
description: Ruby CloudStack client and CLI
|
161
161
|
email:
|
162
162
|
- team@promptworks.com
|