boucher 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/boucher.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "boucher"
5
- s.version = "0.1.3"
5
+ s.version = "0.1.4"
6
6
  s.authors = ["'Micah Micah'"]
7
7
  s.email = ["'micah@8thlight.com'"]
8
8
  s.homepage = "http://github.com/8thlight/boucher"
@@ -45,7 +45,7 @@ module Boucher
45
45
 
46
46
  def self.cook_meal(server, meal_name)
47
47
  update_recipes(server)
48
- ssh server, "cd infrastructure && sudo BUTCHER_ENV=#{Boucher::Config[:env]} BRANCH=#{Boucher::Config[:branch]} chef-solo -c config/solo.rb -j config/#{meal_name}.json"
48
+ ssh server, "cd infrastructure && sudo BENV=#{Boucher::Config[:env]} BRANCH=#{Boucher::Config[:branch]} chef-solo -c config/solo.rb -j config/#{meal_name}.json"
49
49
  end
50
50
 
51
51
  def self.ssh_open?(server)
data/lib/boucher/env.rb CHANGED
@@ -5,7 +5,7 @@ module Boucher
5
5
  } unless defined?(Boucher::Config)
6
6
 
7
7
  def self.env_name
8
- ENV["BUTCHER_ENV"] ? ENV["BUTCHER_ENV"] : :dev
8
+ ENV["BENV"] ? ENV["BENV"] : :dev
9
9
  end
10
10
 
11
11
  env_dir = File.expand_path("config/env")
@@ -14,7 +14,7 @@ module Boucher
14
14
 
15
15
  unless defined?(Boucher::NO_LOAD_CONFIG)
16
16
  unless File.exists?(env_path)
17
- raise "Config file #{env_path} doesn't exist.\nYou need to change your BUTCHER_ENV environment variable to a valid environment name.\nValid environments: #{valid_envs.join(", ")}"
17
+ raise "Config file #{env_path} doesn't exist.\nYou need to change your BENV environment variable to a valid environment name.\nValid environments: #{valid_envs.join(", ")}"
18
18
  end
19
19
 
20
20
  load env_path
@@ -35,8 +35,8 @@ module Boucher
35
35
  end
36
36
 
37
37
  def self.assert_env!
38
- unless ENV['BUTCHER_ENV']
39
- raise 'BUTCHER_ENV must be set before running this command'
38
+ unless ENV['BENV']
39
+ raise 'BENV must be set before running this command'
40
40
  end
41
41
  end
42
42
  end
@@ -104,7 +104,7 @@ web console and click Instance Actions -> Change Termination Protection -> Yes."
104
104
 
105
105
  desc "Provision new, or chef existing server of the specified meal"
106
106
  task :establish, [:meal] do |t, args|
107
- server = Boucher.find_server(args.meal, ENV['BUTCHER_ENV'])
107
+ server = Boucher.find_server(args.meal, ENV['BENV'])
108
108
  Boucher.establish_server(server, args.meal)
109
109
  end
110
110
 
@@ -44,7 +44,7 @@ describe "Boucher Cloud" do
44
44
  server = OpenStruct.new(:id => "test_id")
45
45
 
46
46
  Boucher.should_receive(:update_recipes).with(server)
47
- Boucher.should_receive(:ssh).with(server, "cd infrastructure && sudo BUTCHER_ENV=env_name BRANCH=branch_name chef-solo -c config/solo.rb -j config/meal_name.json")
47
+ Boucher.should_receive(:ssh).with(server, "cd infrastructure && sudo BENV=env_name BRANCH=branch_name chef-solo -c config/solo.rb -j config/meal_name.json")
48
48
  Boucher::Config[:branch] = "branch_name"
49
49
  Boucher::Config[:env] = "env_name"
50
50
 
@@ -3,21 +3,21 @@ require 'spec_helper'
3
3
  describe "Environment" do
4
4
  describe "env" do
5
5
  before do
6
- @old_env = ENV['BUTCHER_ENV']
6
+ @old_env = ENV['BENV']
7
7
  end
8
8
 
9
9
  after do
10
- ENV['BUTCHER_ENV'] = @old_env
10
+ ENV['BENV'] = @old_env
11
11
  end
12
12
 
13
13
  it "defaults to :dev" do
14
- ENV.delete('BUTCHER_ENV')
14
+ ENV.delete('BENV')
15
15
  #load File.expand_path(File.dirname(__FILE__) + "/../../lib/boucher/env.rb")
16
16
  Boucher::env_name.should == :dev
17
17
  end
18
18
 
19
19
  it "can be set via an environment variable" do
20
- ENV['BUTCHER_ENV'] = "ci"
20
+ ENV['BENV'] = "ci"
21
21
  load File.expand_path(File.dirname(__FILE__) + "/../../lib/boucher/env.rb")
22
22
  Boucher::env_name.should == "ci"
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: boucher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -127,7 +127,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  segments:
129
129
  - 0
130
- hash: -4594112676882326117
130
+ hash: 1891087491595095313
131
131
  required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  none: false
133
133
  requirements: