Skip to content

Commit

Permalink
Merge pull request #97 from durandom/miq_environment
Browse files Browse the repository at this point in the history
applying changes from provider generator
  • Loading branch information
Fryguy authored Jan 6, 2017
2 parents 771d65a + be4f55a commit 9a9509e
Show file tree
Hide file tree
Showing 17 changed files with 34 additions and 78 deletions.
6 changes: 3 additions & 3 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ engines:
config: '.rubocop_cc.yml'
prepare:
fetch:
- url: "https://raw.githubusercontent.com/ManageIQ/manageiq/master/.rubocop_base.yml"
- url: "https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_base.yml"
path: ".rubocop_base.yml"
- url: "https://raw.githubusercontent.com/ManageIQ/manageiq/master/.rubocop_cc.yml"
path: ".rubocop_manageiq_cc.yml"
- url: "https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_cc_base.yml"
path: ".rubocop_cc_base.yml"
ratings:
paths:
- Gemfile.lock
Expand Down
2 changes: 1 addition & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
inherit_from:
- https://raw.githubusercontent.com/ManageIQ/manageiq/master/.rubocop_base.yml
- https://raw.githubusercontent.com/ManageIQ/guides/master/.rubocop_base.yml
# put all local rubocop config into .rubocop_local.yml as it will be loaded by .rubocop_cc.yml as well
- .rubocop_local.yml
3 changes: 2 additions & 1 deletion .rubocop_cc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
inherit_from:
# this is downloaded by .codeclimate.yml
- .rubocop_cc_mangeiq.yml
- .rubocop_base.yml
- .rubocop_cc_base.yml
- .rubocop_local.yml
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ env:
- RUBY_GC_HEAP_GROWTH_FACTOR=1.25
addons:
postgresql: '9.4'
before_install:
- source ${TRAVIS_BUILD_DIR}/tools/ci/before_install.sh
before_install: bin/setup
script:
- bundle exec bin/rails app:test:providers:amazon:setup app:test:providers:amazon
after_script: bundle exec codeclimate-test-reporter
Expand Down
5 changes: 0 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@
# development dependencies will be added by default to the :development group.
gemspec

group :test do
gem "simplecov", :require => false
gem "codeclimate-test-reporter", "~> 1.0.0", :require => false
end

# Declare any dependencies that are still in development here instead of in
# your gemspec. These might include edge Rails or gems from your path or
# Git. Remember to move these dependencies to your gemspec before releasing
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# manageiq-providers-amazon

[![Join the chat at https://gitter.im/ManageIQ/manageiq-providers-amazon](https://badges.gitter.im/ManageIQ/manageiq-providers-amazon.svg)](https://gitter.im/ManageIQ/manageiq-providers-amazon?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

[![Gem Version](https://badge.fury.io/rb/manageiq-providers-amazon.svg)](http://badge.fury.io/rb/manageiq-providers-amazon)
[![Build Status](https://travis-ci.org/ManageIQ/manageiq-providers-amazon.svg)](https://travis-ci.org/ManageIQ/manageiq-providers-amazon)
[![Code Climate](https://codeclimate.com/github/ManageIQ/manageiq-providers-amazon.svg)](https://codeclimate.com/github/ManageIQ/manageiq-providers-amazon)
[![Test Coverage](https://codeclimate.com/github/ManageIQ/manageiq-providers-amazon/badges/coverage.svg)](https://codeclimate.com/github/ManageIQ/manageiq-providers-amazon/coverage)
[![Dependency Status](https://gemnasium.com/ManageIQ/manageiq-providers-amazon.svg)](https://gemnasium.com/ManageIQ/manageiq-providers-amazon)
[![Security](https://hakiri.io/github/ManageIQ/manageiq-providers-amazon/master.svg)](https://hakiri.io/github/ManageIQ/manageiq-providers-amazon/master)

[![Chat](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ManageIQ/manageiq-providers-amazon?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![Translate](https://img.shields.io/badge/translate-zanata-blue.svg)](https://translate.zanata.org/zanata/project/view/manageiq-providers-amazon)
[![License](http://img.shields.io/badge/license-APACHE2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.html)

ManageIQ plugin for the Amazon provider.

Expand Down
31 changes: 7 additions & 24 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -1,29 +1,12 @@
#!/usr/bin/env ruby
require 'pathname'

# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
gem_root = Pathname.new(__dir__).join("..")

Dir.chdir APP_ROOT do
if File.exist?("spec/manageiq")
puts "== Updating manageiq sample app =="
system "cd spec/manageiq && git pull"
else
puts "== Cloning manageiq sample app =="
system "git clone [email protected]:ManageIQ/manageiq.git --depth 1 spec/manageiq"
end

puts "== Installing dependencies =="
system "gem install bundler --conservative"
system "bundle check || bundle install"

unless File.exist?("spec/manageiq/config/database.yml")
puts "\n== Copying sample config/database.yml =="
system "cp spec/manageiq/config/database.pg.yml spec/manageiq/config/database.yml"
end

unless File.exist?("spec/manageiq/certs/v2_key")
puts "\n== Copying sample certs/v2_key =="
system "cp spec/manageiq/certs/v2_key.dev spec/manageiq/certs/v2_key"
end
unless gem_root.join("spec/manageiq").exist?
puts "== Cloning manageiq sample app =="
system "git clone https://github.com/ManageIQ/manageiq.git --branch master --depth 1 spec/manageiq"
end

require gem_root.join("spec/manageiq/lib/manageiq/environment").to_s
ManageIQ::Environment.manageiq_plugin_setup
14 changes: 14 additions & 0 deletions bin/update
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env ruby
require 'pathname'

gem_root = Pathname.new(__dir__).join("..")

if gem_root.join("spec/manageiq").symlink?
puts "== SKIPPING update of spec/manageiq because its symlinked =="
else
puts "== Updating manageiq sample app =="
system("git pull", :chdir => gem_root.join("spec/manageiq"))
end

require gem_root.join("spec/manageiq/lib/manageiq/environment").to_s
ManageIQ::Environment.manageiq_plugin_setup
3 changes: 3 additions & 0 deletions manageiq-providers-amazon.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@ Gem::Specification.new do |s|

s.files = Dir["{app,config.lib}/**/*"]

s.add_development_dependency "codeclimate-test-reporter", "~> 1.0.0"
s.add_development_dependency "simplecov"

s.add_dependency("aws-sdk", ["~>2.6.14"])
end
5 changes: 0 additions & 5 deletions spec/controllers/cloud_network_controller_spec.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/controllers/cloud_subnet_controller_spec.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/controllers/ems_network_controller_spec.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/controllers/floating_ip_controller_spec.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/controllers/load_balancer_controller_spec.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/controllers/network_port_controller_spec.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/controllers/network_router_controller_spec.rb

This file was deleted.

5 changes: 0 additions & 5 deletions spec/controllers/security_group_controller_spec.rb

This file was deleted.

0 comments on commit 9a9509e

Please sign in to comment.