hobo-inviqa 0.0.10.pre.rc10 → 0.0.10.pre.rc11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDY4ZDE1ZjE3NGQ0NGY1M2Q5MDRiZjJmMTIwZjA3YTYwOTlmYjIwMQ==
4
+ ODFmN2E4OWI3NzI5Mzg5ODk2MzY0YmM1MzZlNzQ4YmUyMjEyNDM2MA==
5
5
  data.tar.gz: !binary |-
6
- YzVlNGM2YTI2OTRlNzNlODYyNjVkZTVjYWI4ZjJjODE4ZGI0MmJjMw==
6
+ OTIzOGRlNjAzZmVmMjBhYTVhN2VjZDBlMzBlYmI2YmI3OWUxODA0Nw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- MjM3NTUzMmQ3NjBmZThjNWI2MDZkZmIzNTFhMDYwZGRmOWE1ZDAxNjFhMjE5
10
- ZDA0MjQxNjJiNmNkZmIzYmYyYjE4ZGViNzMyMjMyNTZiYzA1NTc1ODBmMDFj
11
- YjlmMmRkZWFhNTdjMDMzN2JlZGE0OTEwMjUyY2YyMTAxNjI5OTk=
9
+ MjE1ZWJhODFmNWI5NDA2ZTE0ZGQwN2IwMjNiZmE4NmQ3MTczMDlhYmQwZTA1
10
+ ZmEyNGFmOWExZDc3MTg0NDBiMTRmZDJiNjM5NmQ1NWI1MmMyNTZiNzE4NzVl
11
+ MGIwMDAxMDU2NTFiODVlNjQ5MTc5OGM1MzRjOTVkNDA5NmY0Zjk=
12
12
  data.tar.gz: !binary |-
13
- MzkzYWM3ODlkYjYzZDVkN2IwN2M3MTk5MGM5YzM1NzI4OTczNDlmMTE5OTlm
14
- OGYxNDQ2YWVhZTViMjI2NzYxZDVjZjRjY2EyNTcyNTNlY2EwODk3M2M3M2Yx
15
- NGYwMDA4MDQ5Yjk4ZmIxN2ZkNmZiODIxYjI3MTQ3M2Q4NTRiOTk=
13
+ ZjEwZjcyNDU2MGI3MjE5OTk2Y2RjYWQ2ZjM0MzYwOGFjZGUxZWFkYzAxNTIy
14
+ YzdkNjk4MDYzOGIwMzIyZmRiN2RlNmNjZDFmOGFiNDdkNmU0ZjUzYTYwYTE3
15
+ OGJjYjZiZjFlMGRhYzQ2N2RmOWU1ZTI0MGNkMzU1NjQyNzFmZjU=
data/Gemfile.lock CHANGED
@@ -1,13 +1,12 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hobo-inviqa (0.0.10.pre.rc10)
4
+ hobo-inviqa (0.0.10.pre.rc11)
5
5
  aws-sdk (~> 1.34.0)
6
- bundler (~> 1.5.2)
6
+ bundler (>= 1.5.2)
7
7
  deepstruct (~> 0.0.5)
8
8
  highline (~> 1.6.20)
9
9
  net-ssh-simple (~> 1.6.3)
10
- nokogiri (= 1.6.1)
11
10
  pry (~> 0.9.12)
12
11
  rake (~> 10.1.1)
13
12
  rake-hooks (~> 1.2.3)
@@ -26,7 +25,7 @@ GEM
26
25
  blockenspiel (0.4.5)
27
26
  coderay (1.1.0)
28
27
  deepstruct (0.0.5)
29
- hashie (2.1.0)
28
+ hashie (2.1.1)
30
29
  highline (1.6.21)
31
30
  json (1.8.1)
32
31
  method_source (0.8.2)
data/Rakefile CHANGED
@@ -1,5 +1,7 @@
1
1
  require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
3
 
4
+ ENV['HOBO_BUILD'] = '1'
5
+
4
6
  desc "Build and install"
5
7
  task :build_install => [:build, :install]
data/bin/hobo CHANGED
@@ -3,58 +3,73 @@
3
3
  # Hack to allow testing with Aruba (for now)
4
4
  $:.push File.expand_path(File.join("..", "..", "lib"), __FILE__)
5
5
 
6
- # Suppress Net/SSH/Simple warning on windows
7
- # Note that $HOBO_ARGV is used as an indicator in the gemspec as to whether it needs to build a filelist
8
- # Removing it or moving it after the bundler setup will cause "fatal: Not a git repository" errors
9
- $SUPPRESS_32BIT_WARNING=1
10
- $HOBO_ARGV = ARGV
6
+ # TODO bundler context detection
7
+ def init_hobo
8
+ require 'hobo/init/bundler_context' unless $HOBO_BUNDLE_MODE
9
+ require 'hobo'
11
10
 
12
- require 'hobo/init/bundler_context'
13
- require 'hobo'
14
-
15
- # Default main classes
16
- error_handler = Hobo::ErrorHandlers::Friendly.new
17
- Hobo.ui = Hobo::Ui.new
18
- Hobo.logger = Logger.new(STDOUT)
19
- Hobo.logger.level = Logger::WARN
20
-
21
- # Low level / early arg parsing
22
- # Anything that can alter ui / logger / cli should be here
23
- # Early termination args should also go here
24
- slop = Slop.parse! do
25
- on '--debug', 'Enable debugging' do
26
- require 'teerb'
27
- require 'tmpdir'
28
- error_handler = Hobo::ErrorHandlers::Debug.new
29
- debug_log = File.open(File.join(Dir.tmpdir, 'hobo_debug.log'), 'w+')
30
- Hobo.logger = Logger.new(TeeRb::IODelegate.new(STDOUT, debug_log))
31
- Hobo.logger.level = Logger::DEBUG
32
- end
11
+ # Default main classes
12
+ error_handler = Hobo::ErrorHandlers::Friendly.new
13
+ Hobo.ui = Hobo::Ui.new
14
+ Hobo.logger = Logger.new(STDOUT)
15
+ Hobo.logger.level = Logger::WARN
16
+
17
+ # Low level / early arg parsing
18
+ # Anything that can alter ui / logger / cli should be here
19
+ # Early termination args should also go here
20
+ slop = Slop.parse! do
21
+ on '--debug', 'Enable debugging' do
22
+ require 'teerb'
23
+ require 'tmpdir'
24
+ error_handler = Hobo::ErrorHandlers::Debug.new
25
+ debug_log = File.open(File.join(Dir.tmpdir, 'hobo_debug.log'), 'w+')
26
+ Hobo.logger = Logger.new(TeeRb::IODelegate.new(STDOUT, debug_log))
27
+ Hobo.logger.level = Logger::DEBUG
28
+ end
29
+
30
+ on '--ansi', 'Enable / disable ansi output', :invertable => true do
31
+ Hobo.ui.use_color self.to_hash[:ansi]
32
+ end
33
+
34
+ on '--log-level=', 'Set log level' do
35
+ level = self.to_hash[:'log-level'].upcase
36
+ Hobo.logger.level = Logger.const_get(level) if [ 'DEBUG', 'INFO' ].include? level
37
+ end
33
38
 
34
- on '--ansi', 'Enable / disable ansi output', :invertable => true do
35
- Hobo.ui.use_color self.to_hash[:ansi]
39
+ on '--non-interactive', 'Run non-interactively. Defaults will be automatically used where possible.'
40
+ on '--skip-host-checks', 'Skip host checks'
36
41
  end
37
42
 
38
- on '--log-level=', 'Set log level' do
39
- level = self.to_hash[:'log-level'].upcase
40
- Hobo.logger.level = Logger.const_get(level) if [ 'DEBUG', 'INFO' ].include? level
43
+ Hobo.logger.formatter = proc do |severity, datetime, progname, msg|
44
+ "#{datetime.strftime("%Y-%m-%d %H:%M:%S")}: #{severity}: #{msg}\n"
41
45
  end
42
46
 
43
- on '--non-interactive', 'Run non-interactively. Defaults will be automatically used where possible.'
44
- on '--skip-host-checks', 'Skip host checks'
45
- end
47
+ opts = slop.to_hash
48
+ Hobo.ui.interactive = !(opts[:'non-interactive'] == true)
46
49
 
47
- Hobo.logger.formatter = proc do |severity, datetime, progname, msg|
48
- "#{datetime.strftime("%Y-%m-%d %H:%M:%S")}: #{severity}: #{msg}\n"
50
+ begin
51
+ Hobo::Lib::HostCheck.check(:filter => /not_using_system_ruby/, :raise => true) unless opts[:'skip-host-checks']
52
+ Hobo.cli = Hobo::Cli.new(slop: slop)
53
+ Hobo.cli.start
54
+ rescue Exception => error
55
+ exit error_handler.handle(error)
56
+ end
49
57
  end
50
58
 
51
- opts = slop.to_hash
52
- Hobo.ui.interactive = !(opts[:'non-interactive'] == true)
59
+ require 'hobo/patches/rubygems'
60
+ require 'bundler'
53
61
 
54
- begin
55
- Hobo::Lib::HostCheck.check(:filter => /not_using_system_ruby/, :raise => true) unless opts[:'skip-host-checks']
56
- Hobo.cli = Hobo::Cli.new(slop: slop)
57
- Hobo.cli.start
58
- rescue Exception => error
59
- exit error_handler.handle(error)
62
+ # Suppress Net/SSH/Simple warning on windows
63
+ # Note that $HOBO_ARGV is used as an indicator in the gemspec as to whether it needs to build a filelist
64
+ # Removing it or moving it after the bundler setup will cause "fatal: Not a git repository" errors
65
+ $SUPPRESS_32BIT_WARNING=1
66
+ $HOBO_ARGV = ARGV
67
+ $HOBO_BUNDLE_MODE = (!!ENV['BUNDLE_GEMFILE'] && Bundler.environment.specs.to_hash['hobo-inviqa'])
68
+
69
+ if $HOBO_BUNDLE_MODE
70
+ init_hobo
71
+ else
72
+ Bundler.with_clean_env do
73
+ init_hobo
74
+ end
60
75
  end
data/hobo.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |spec|
15
15
 
16
16
  # This file will get interpretted at runtime due to Bundler.setup
17
17
  # Without the $HOBO_ARGV check (set in bin/hobo) fatal: not a git repository errors show up
18
- spec.files = `git ls-files`.split($/) unless $HOBO_ARGV
18
+ spec.files = `git ls-files`.split($/) if ENV['HOBO_BUILD'] == '1'
19
19
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
20
20
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
21
21
  spec.require_paths = ["lib"]
@@ -24,7 +24,7 @@ Gem::Specification.new do |spec|
24
24
  spec.add_dependency "highline", "~> 1.6.20"
25
25
  spec.add_dependency "rake", "~> 10.1.1"
26
26
  spec.add_dependency "rake-hooks", "~> 1.2.3"
27
- spec.add_dependency "bundler", "~> 1.5.2"
27
+ spec.add_dependency "bundler", ">= 1.5.2"
28
28
  spec.add_dependency "deepstruct", "~> 0.0.5"
29
29
  spec.add_dependency "semantic", "~> 1.3.0"
30
30
  spec.add_dependency "aws-sdk", "~> 1.34.0"
@@ -34,7 +34,7 @@ Gem::Specification.new do |spec|
34
34
  spec.add_dependency "pry", "~> 0.9.12"
35
35
 
36
36
  # Not actually a dep! gem insists on installing 1.6.2.rc2 however!
37
- spec.add_dependency "nokogiri", "= 1.6.1"
37
+ #spec.add_dependency "nokogiri", "= 1.6.1"
38
38
 
39
39
  # This prevents Bundler.setup from complaining that rubygems did not install dev deps
40
40
  # If you want to run dev deps you need to ensure HOBO_ENV=dev is set for bundle install & bundle exec
data/lib/hobo/cli.rb CHANGED
@@ -116,8 +116,14 @@ module Hobo
116
116
  end
117
117
 
118
118
  def perform_host_checks
119
+ checks = [
120
+ 'vagrant.*',
121
+ '.*present'
122
+ ]
123
+ checks.push 'latest_hobo_version' unless $HOBO_BUNDLE_MODE
124
+
119
125
  @host_check.check(
120
- :filter => /vagrant.*|.*present|latest_hobo_version/,
126
+ :filter => /#{checks.join('|')}/,
121
127
  :raise => true
122
128
  )
123
129
  end
@@ -127,7 +133,7 @@ module Hobo
127
133
  slop.on '-h', '--help', 'Display help'
128
134
 
129
135
  slop.on '-v', '--version', 'Print version information' do
130
- Hobo.ui.info "Hobo version #{Hobo::VERSION}"
136
+ Hobo.ui.info "Hobo version #{Hobo::VERSION}#{" (Bundle mode)" if $HOBO_BUNDLE_MODE}"
131
137
  halt
132
138
  end
133
139
  end
@@ -2,22 +2,25 @@
2
2
  ENV['BUNDLE_GEMFILE'] = File.expand_path('../../../../Gemfile', __FILE__)
3
3
 
4
4
  require 'shellwords'
5
- require 'hobo/version'
6
5
 
7
- # gem install != bundle install
8
- # Gem may well skip some deps that bundler wants
9
- bundler_check = File.join(ENV['HOME'], '.hobo', 'bundler_check')
10
- unless File.exists?(bundler_check) && File.read(bundler_check).strip == Hobo::VERSION
11
- `bundle check --gemfile=#{ENV['BUNDLE_GEMFILE'].shellescape}`
12
- unless $?.success?
13
- puts "Hobo has detected missing dependencies. Please wait while they're installed"
14
- `bundle install --gemfile=#{ENV['BUNDLE_GEMFILE'].shellescape}`
6
+ begin
7
+ Bundler.setup(:default)
8
+ rescue Bundler::GemNotFound => e
9
+ puts 'Missing dependencies detected!'
10
+ print 'These will automatically be installed now, please wait'
11
+ rval = nil
12
+ IO::popen("bundle install --gemfile=#{ENV['BUNDLE_GEMFILE'].shellescape}") do |io|
13
+ while line = io.gets
14
+ print '.'
15
+ end
16
+ puts ' done'
17
+ io.close
18
+ rval = $?.to_i
19
+ end
20
+
21
+ if rval == 0
15
22
  Kernel.exec('hobo', *$HOBO_ARGV)
23
+ else
24
+ throw e
16
25
  end
17
- File.write(bundler_check, Hobo::VERSION)
18
26
  end
19
-
20
- require 'hobo/patches/rubygems'
21
- require 'bundler'
22
-
23
- Bundler.setup(:default)
@@ -5,7 +5,7 @@ module Hobo
5
5
  require 'semantic'
6
6
  begin
7
7
  version = shell "vagrant --version", :capture => true
8
- version.gsub!(/^Vagrant /, '')
8
+ version.gsub!(/^Vagrant[^0-9]+/, '')
9
9
  version = ::Semantic::Version.new version.strip
10
10
  minimum_version = ::Semantic::Version.new "1.3.5"
11
11
 
@@ -86,6 +86,9 @@ module Hobo
86
86
  Hobo.ui.error " This can sometimes be caused by missing AWS credentials"
87
87
  rescue AWS::S3::Errors::NoSuchBucket
88
88
  Hobo.ui.error " Asset bucket #{Hobo.project_config.asset_bucket} does not exist!"
89
+ rescue AWS::S3::Errors::AccessDenied
90
+ Hobo.ui.error " Your AWS key does not have access to the #{Hobo.project_config.asset_bucket} S3 bucket!"
91
+ Hobo.ui.error " Please request access to this bucket from your TTL or via an internal support request"
89
92
  rescue AWS::Errors::MissingCredentialsError
90
93
  Hobo.ui.warning " AWS credentials not set!"
91
94
  Hobo.ui.warning " Either set the AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY env vars or run `hobo config` to set them jsut for hobo."
@@ -5,9 +5,12 @@ namespace :deps do
5
5
  desc "Install Gem dependencies"
6
6
  task :gems do
7
7
  locate "*Gemfile" do
8
- Hobo.ui.title "Installing Gem dependencies"
9
- shell "bundle", "install", realtime: true, indent: 2
10
- Hobo.ui.separator
8
+ required = shell("bundle", "check", :exit_status => true) != 0
9
+ if required
10
+ Hobo.ui.title "Installing Gem dependencies"
11
+ shell "bundle", "install", realtime: true, indent: 2
12
+ Hobo.ui.separator
13
+ end
11
14
  end
12
15
  end
13
16
 
@@ -62,7 +65,6 @@ namespace :deps do
62
65
 
63
66
  desc "Install chef dependencies"
64
67
  task :chef => [ "deps:gems" ] do
65
- require 'bundler'
66
68
  locate "*Cheffile" do
67
69
  Hobo.ui.title "Installing chef dependencies via librarian"
68
70
  bundle_shell "librarian-chef", "install", "--verbose", :realtime => true, :indent => 2 do |line|
data/lib/hobo/tasks/vm.rb CHANGED
@@ -63,9 +63,12 @@ namespace :vm do
63
63
  desc "Start VM without provision"
64
64
  task :start => [ "deps:gems", "deps:chef", "deps:vagrant_plugins" ] do
65
65
  vagrantfile do
66
- Hobo.ui.title "Starting vagrant VM"
67
- vagrant_exec 'up', '--no-provision'
68
- Hobo.ui.separator
66
+ state = shell("vagrant --machine-readable status | grep ,state, | cut -d, -f4", :capture => true).strip
67
+ unless state == 'running'
68
+ Hobo.ui.title "Starting vagrant VM"
69
+ vagrant_exec 'up', '--no-provision'
70
+ Hobo.ui.separator
71
+ end
69
72
  end
70
73
  end
71
74
 
data/lib/hobo/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hobo
2
- VERSION = '0.0.10-rc10'
2
+ VERSION = '0.0.10-rc11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobo-inviqa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10.pre.rc10
4
+ version: 0.0.10.pre.rc11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mike Simons
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-09 00:00:00.000000000 Z
11
+ date: 2014-05-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: slop
@@ -70,14 +70,14 @@ dependencies:
70
70
  name: bundler
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - ! '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: 1.5.2
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - ! '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: 1.5.2
83
83
  - !ruby/object:Gem::Dependency
@@ -178,20 +178,6 @@ dependencies:
178
178
  - - ~>
179
179
  - !ruby/object:Gem::Version
180
180
  version: 0.9.12
181
- - !ruby/object:Gem::Dependency
182
- name: nokogiri
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - '='
186
- - !ruby/object:Gem::Version
187
- version: 1.6.1
188
- type: :runtime
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - '='
193
- - !ruby/object:Gem::Version
194
- version: 1.6.1
195
181
  description: Inviqan toolbelt
196
182
  email:
197
183
  - msimons@inviqa.com