heroku-rails-saas 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- heroku-rails-saas (0.1.1)
4
+ heroku-rails-saas (0.1.2)
5
5
  heroku (>= 2.24.1)
6
6
 
7
7
  GEM
data/heroku-rails.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "heroku-rails-saas"
3
- s.version = "0.1.1"
3
+ s.version = "0.1.2"
4
4
 
5
5
  s.authors = [ "Elijah Miller", "Glenn Roberts", "Jacques Crocker", "Lance Sanchez"]
6
6
 
@@ -0,0 +1,4 @@
1
+ require 'heroku-rails-saas/config'
2
+ require 'heroku-rails-saas/runner'
3
+ require 'heroku-rails-saas/railtie' if defined?(::Rails::Railtie)
4
+ require 'heroku-rails-saas/hash_recursive_merge'
@@ -1,6 +1,6 @@
1
1
  require 'erb'
2
2
 
3
- module HerokuRails
3
+ module HerokuRailsSaas
4
4
  class Config
5
5
 
6
6
  SEPERATOR = ":"
@@ -1,7 +1,7 @@
1
- module HerokuRails
1
+ module HerokuRailsSaas
2
2
  class Railtie < ::Rails::Railtie
3
3
  rake_tasks do
4
- HerokuRails::Config.root = ::Rails.root
4
+ HerokuRailsSaas::Config.root = ::Rails.root
5
5
  load 'heroku/rails/tasks.rb'
6
6
  end
7
7
  end
@@ -1,6 +1,6 @@
1
1
  require 'heroku/client'
2
2
 
3
- module HerokuRails
3
+ module HerokuRailsSaas
4
4
  class Runner
5
5
  def initialize(config)
6
6
  @config = config
@@ -109,8 +109,8 @@ module HerokuRails
109
109
  new_config = @config.config(app_env)
110
110
 
111
111
  # default RACK_ENV and RAILS_ENV to the heroku_env (unless its manually set to something else)
112
- new_config["RACK_ENV"] = HerokuRails::Config.extract_environment_from(app_env) unless new_config["RACK_ENV"]
113
- new_config["RAILS_ENV"] = HerokuRails::Config.extract_environment_from(app_env) unless new_config["RAILS_ENV"]
112
+ new_config["RACK_ENV"] = HerokuRailsSaas::Config.extract_environment_from(app_env) unless new_config["RACK_ENV"]
113
+ new_config["RAILS_ENV"] = HerokuRailsSaas::Config.extract_environment_from(app_env) unless new_config["RAILS_ENV"]
114
114
  # get the existing config from heroku's servers
115
115
  existing_config = @heroku.config_vars(app_name) || {}
116
116
 
@@ -1,14 +1,14 @@
1
- require 'heroku-rails'
1
+ require 'heroku-rails-saas'
2
2
 
3
3
  HEROKU_CONFIG_FILE = File.join(HerokuRails::Config.root, 'config', 'heroku.yml')
4
4
  HEROKU_APP_SPECIFIC_CONFIG_FILES = Dir.glob("#{File.join(HerokuRails::Config.root, 'config', 'heroku')}/*.yml")
5
- HEROKU_CONFIG = HerokuRails::Config.new({:default => HEROKU_CONFIG_FILE, :apps => HEROKU_APP_SPECIFIC_CONFIG_FILES})
6
- HEROKU_RUNNER = HerokuRails::Runner.new(HEROKU_CONFIG)
5
+ HEROKU_CONFIG = HerokuRailsSaas::Config.new({:default => HEROKU_CONFIG_FILE, :apps => HEROKU_APP_SPECIFIC_CONFIG_FILES})
6
+ HEROKU_RUNNER = HerokuRailsSaas::Runner.new(HEROKU_CONFIG)
7
7
 
8
8
  # create all the environment specific tasks
9
9
  (HEROKU_CONFIG.apps).each do |app, hsh|
10
10
  hsh.each do |env, heroku_env|
11
- app_name = HerokuRails::Config.app_name(app, env)
11
+ app_name = HerokuRailsSaas::Config.app_name(app, env)
12
12
  desc "Select #{app_name} Heroku app for later commands"
13
13
  task app_name do
14
14
  # callback switch_environment
@@ -231,8 +231,8 @@ namespace :heroku do
231
231
  HEROKU_RUNNER.each_heroku_app do |heroku_env, app_name, repo|
232
232
  system_with_echo "heroku pgdumps:capture --app #{app_name}"
233
233
  dump = `heroku pgdumps --app #{app_name}`.split("\n").last.split(" ").first
234
- system_with_echo "mkdir -p #{HerokuRails::Config.root}/db/dumps"
235
- file = "#{HerokuRails::Config.root}/db/dumps/#{dump}.sql.gz"
234
+ system_with_echo "mkdir -p #{HerokuRailsSaas::Config.root}/db/dumps"
235
+ file = "#{HerokuRailsSaas::Config.root}/db/dumps/#{dump}.sql.gz"
236
236
  url = `heroku pgdumps:url --app #{app_name} #{dump}`.chomp
237
237
  system_with_echo "wget", url, "-O", file
238
238
 
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- module HerokuRails
3
+ module HerokuRailsSaas
4
4
  describe Config do
5
5
  before(:each) do
6
6
  config_files = {:default => config_path("heroku-config.yml"), :apps => [config_path("awesomeapp.yml"), config_path("mediocreapp.yml")]}
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- module HerokuRails
3
+ module HerokuRailsSaas
4
4
  describe Runner do
5
5
  describe "each_heroku_app" do
6
6
  it "should return my apps" do
data/spec/spec_helper.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'heroku-rails'
1
+ require 'heroku-rails-saas'
2
2
  require 'bundler/setup'
3
3
 
4
4
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: heroku-rails-saas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -12,11 +12,11 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-04-27 00:00:00.000000000Z
15
+ date: 2012-04-30 00:00:00.000000000Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: heroku
19
- requirement: &2165409540 !ruby/object:Gem::Requirement
19
+ requirement: &2160512740 !ruby/object:Gem::Requirement
20
20
  none: false
21
21
  requirements:
22
22
  - - ! '>='
@@ -24,10 +24,10 @@ dependencies:
24
24
  version: 2.24.1
25
25
  type: :runtime
26
26
  prerelease: false
27
- version_requirements: *2165409540
27
+ version_requirements: *2160512740
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rspec
30
- requirement: &2165408320 !ruby/object:Gem::Requirement
30
+ requirement: &2160511520 !ruby/object:Gem::Requirement
31
31
  none: false
32
32
  requirements:
33
33
  - - ~>
@@ -35,7 +35,7 @@ dependencies:
35
35
  version: '2.0'
36
36
  type: :development
37
37
  prerelease: false
38
- version_requirements: *2165408320
38
+ version_requirements: *2160511520
39
39
  description: Manage multiple Heroku instances/apps for a single Rails app using Rake.
40
40
  email: railsjedi@gmail.com
41
41
  executables: []
@@ -50,16 +50,16 @@ files:
50
50
  - lib/generators/templates/heroku.rake
51
51
  - lib/generators/templates/heroku.yml
52
52
  - lib/heroku/rails/tasks.rb
53
- - lib/heroku-rails/config.rb
54
- - lib/heroku-rails/hash_recursive_merge.rb
55
- - lib/heroku-rails/railtie.rb
56
- - lib/heroku-rails/runner.rb
57
- - lib/heroku-rails.rb
53
+ - lib/heroku-rails-saas/config.rb
54
+ - lib/heroku-rails-saas/hash_recursive_merge.rb
55
+ - lib/heroku-rails-saas/railtie.rb
56
+ - lib/heroku-rails-saas/runner.rb
57
+ - lib/heroku-rails-saas.rb
58
58
  - spec/fixtures/awesomeapp.yml
59
59
  - spec/fixtures/heroku-config.yml
60
60
  - spec/fixtures/mediocreapp.yml
61
- - spec/heroku/rails/heroku_config_spec.rb
62
- - spec/heroku/rails/heroku_runner_spec.rb
61
+ - spec/heroku/rails/saas/heroku_config_spec.rb
62
+ - spec/heroku/rails/saas/heroku_runner_spec.rb
63
63
  - spec/spec_helper.rb
64
64
  - heroku-rails.gemspec
65
65
  - Gemfile
@@ -84,7 +84,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
84
84
  version: '0'
85
85
  segments:
86
86
  - 0
87
- hash: 352062248353455738
87
+ hash: -1604565509238945250
88
88
  required_rubygems_version: !ruby/object:Gem::Requirement
89
89
  none: false
90
90
  requirements:
@@ -93,7 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
93
93
  version: '0'
94
94
  segments:
95
95
  - 0
96
- hash: 352062248353455738
96
+ hash: -1604565509238945250
97
97
  requirements: []
98
98
  rubyforge_project: none
99
99
  rubygems_version: 1.8.6
@@ -104,6 +104,6 @@ test_files:
104
104
  - spec/fixtures/awesomeapp.yml
105
105
  - spec/fixtures/heroku-config.yml
106
106
  - spec/fixtures/mediocreapp.yml
107
- - spec/heroku/rails/heroku_config_spec.rb
108
- - spec/heroku/rails/heroku_runner_spec.rb
107
+ - spec/heroku/rails/saas/heroku_config_spec.rb
108
+ - spec/heroku/rails/saas/heroku_runner_spec.rb
109
109
  - spec/spec_helper.rb
data/lib/heroku-rails.rb DELETED
@@ -1,4 +0,0 @@
1
- require 'heroku-rails/config'
2
- require 'heroku-rails/runner'
3
- require 'heroku-rails/railtie' if defined?(::Rails::Railtie)
4
- require 'heroku-rails/hash_recursive_merge'