beans_rails 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.textile ADDED
@@ -0,0 +1,15 @@
1
+ h1. beans_rails
2
+
3
+ The 80beans rails project template (and generator)
4
+
5
+ h2. Usage
6
+
7
+ Install the gem;
8
+
9
+ bc. sudo gem install beans_rails
10
+
11
+ And use the @beans_rails@ generator to start your project instead of the standard @rails@ generator;
12
+
13
+ bc. beans_rails <project_name>
14
+
15
+ Have fun! :)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/beans_rails.gemspec CHANGED
@@ -5,22 +5,24 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{beans_rails}
8
- s.version = "0.1.0"
8
+ s.version = "0.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jeff Kreeftmeijer"]
12
- s.date = %q{2009-12-11}
12
+ s.date = %q{2009-12-16}
13
13
  s.default_executable = %q{beans_rails}
14
14
  s.description = %q{the 80beans rails project template (and generator)}
15
15
  s.email = %q{jeff@80beans.com}
16
16
  s.executables = ["beans_rails"]
17
17
  s.extra_rdoc_files = [
18
- "LICENSE"
18
+ "LICENSE",
19
+ "README.textile"
19
20
  ]
20
21
  s.files = [
21
22
  ".document",
22
23
  ".gitignore",
23
24
  "LICENSE",
25
+ "README.textile",
24
26
  "Rakefile",
25
27
  "VERSION",
26
28
  "beans_rails.gemspec",
@@ -28,6 +30,7 @@ Gem::Specification.new do |s|
28
30
  "bin/beans_rails",
29
31
  "templates/.gitignore",
30
32
  "templates/Capfile",
33
+ "templates/Gemfile",
31
34
  "templates/config/database.yml",
32
35
  "templates/config/deploy.rb",
33
36
  "templates/config/deploy/config/staging.yml",
@@ -36,6 +39,7 @@ Gem::Specification.new do |s|
36
39
  "templates/config/deploy/templates/database.erb",
37
40
  "templates/config/deploy/templates/public_keys.txt",
38
41
  "templates/config/deploy/templates/staging_vhost.erb",
42
+ "templates/config/preinitializer.rb",
39
43
  "templates/recipes/beans_server.rb"
40
44
  ]
41
45
  s.homepage = %q{http://github.com/80beans/beans_rails}
data/beans_rails.rb CHANGED
@@ -19,16 +19,15 @@ end
19
19
 
20
20
  # add the required gems to the environment file and install
21
21
 
22
- gem 'capistrano'
23
- gem 'capistrano-ext', :lib => 'capistrano'
24
- gem 'haml'
25
- gem 'paperclip'
26
- gem 'rspec'
27
- gem 'rspec-rails', :lib => 'spec'
28
- gem 'will_paginate'
29
-
22
+ gem 'bundler'
30
23
  rake "gems:install", :sudo => true
31
24
 
25
+ run 'gem bundle'
26
+
27
+ # copy the .gitignore, database.yml and files needed for bundler to the app
28
+
29
+ ['.gitignore', 'Gemfile', 'config/database.yml', 'config/preinitializer.rb'].each { |file| template_file(file) }
30
+
32
31
  # copy the .gitignore and database.yml to the app
33
32
 
34
33
  ['.gitignore', 'config/database.yml'].each { |file| template_file(file) }
data/templates/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ gem 'rails', '2.3.5'
2
+ gem 'capistrano'
3
+ gem 'capistrano-ext'
4
+ gem 'haml'
5
+ gem 'paperclip'
6
+ gem 'rspec'
7
+ gem 'rspec-rails'
8
+ gem 'will_paginate'
@@ -1 +1,2 @@
1
1
  ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA5MbbNLFpM06Z7IsBGYGjQ9IKDKbFaxV3fRVoPBm3h3fvJXuZbm7u76CthbAThRLbchFYLI3UilWIG9F2fNVkt1EEUE32Pcm7RRoVHAbQmoK8vgwQv8u96i1fz57xwfyjErkuzUTTpV9P2UgC0+NBIAR34vefQZp3G8WEBHyzQDQYTy6lw4ek2zTK/whtBP4PkYF2vNdyYBofgHi4XRJ0R44PRYFX0znlDAI7ELg4bOq26FvvBdd50NT5OwzXb0GtAjqESfS/MOPoz6D0Nm2t1iJY8QJE85uki7z4Gdmr9FOxuEbLSgtuoEi2tiilQdSaDHxtu3ndIBJo3ia7AqY2ww== robertbeekman@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U9BRzZ9SVCNcj9+TeWcV6pHigFbqMrZZ36XH5X+4SU5vXvvr7 roy@80beans.com
@@ -0,0 +1,19 @@
1
+ require "#{File.dirname(__FILE__)}/../vendor/gems/environment"
2
+
3
+ class Rails::Boot
4
+ def run
5
+ load_initializer
6
+ extend_environment
7
+ Rails::Initializer.run(:set_load_path)
8
+ end
9
+
10
+ def extend_environment
11
+ Rails::Initializer.class_eval do
12
+ old_load = instance_method(:load_environment)
13
+ define_method(:load_environment) do
14
+ Bundler.require_env RAILS_ENV
15
+ old_load.bind(self).call
16
+ end
17
+ end
18
+ end
19
+ end
@@ -6,7 +6,7 @@ Capistrano::Configuration.instance(:must_exist).load do
6
6
  working_directory = current_path
7
7
 
8
8
  @service_name = application
9
- @server_info = YAML.load(File.read(File.join(File.dirname(__FILE__), 'config', "#{rails_env}.yml")))
9
+ @server_info = YAML.load(File.read(File.join(File.dirname(__FILE__), '..', 'config', 'deploy', 'config', "#{rails_env}.yml")))
10
10
  @application_name = "#{application}_#{rails_env}"
11
11
  @home_path = "/home/#{@application_name}"
12
12
  original_ssh_username = ssh_options[:username]
@@ -37,7 +37,7 @@ Capistrano::Configuration.instance(:must_exist).load do
37
37
 
38
38
  sudo "useradd -d #{@home_path} -m -G www-data #{@application_name}"
39
39
 
40
- public_keys = File.read(File.join(File.dirname(__FILE__), 'templates', "public_keys.txt"))
40
+ public_keys = File.read(File.join(File.dirname(__FILE__), '..', 'config', 'deploy', 'templates', "public_keys.txt"))
41
41
 
42
42
  put public_keys, "#{application}-public_keys.txt"
43
43
  sudo "mkdir #{@home_path}/.ssh"
@@ -61,7 +61,7 @@ Capistrano::Configuration.instance(:must_exist).load do
61
61
  public_path = "#{current_path}/public"
62
62
  application_name = @application_name
63
63
 
64
- template = File.read(File.join(File.dirname(__FILE__), 'templates', "#{rails_env}_vhost.erb"))
64
+ template = File.read(File.join(File.dirname(__FILE__), '..', 'config', 'deploy', 'templates', "#{rails_env}_vhost.erb"))
65
65
  buffer = ERB.new(template).result(binding)
66
66
 
67
67
  put buffer, "#{application}-apache-vhost.conf"
@@ -86,7 +86,7 @@ Capistrano::Configuration.instance(:must_exist).load do
86
86
  mysql_pass = @server_info['mysql']['pass'] ? @server_info['mysql']['pass'] : Capistrano::CLI.ui.ask("Mysql password for #{mysql_user}: ")
87
87
 
88
88
 
89
- template = File.read(File.join(File.dirname(__FILE__), 'templates', "database.erb"))
89
+ template = File.read(File.join(File.dirname(__FILE__), '..', 'config', 'deploy', 'templates', "database.erb"))
90
90
  buffer = ERB.new(template).result(binding)
91
91
 
92
92
  put buffer, "#{application}-database.sql"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beans_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeff Kreeftmeijer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-11 00:00:00 +01:00
12
+ date: 2009-12-16 00:00:00 +01:00
13
13
  default_executable: beans_rails
14
14
  dependencies: []
15
15
 
@@ -21,10 +21,12 @@ extensions: []
21
21
 
22
22
  extra_rdoc_files:
23
23
  - LICENSE
24
+ - README.textile
24
25
  files:
25
26
  - .document
26
27
  - .gitignore
27
28
  - LICENSE
29
+ - README.textile
28
30
  - Rakefile
29
31
  - VERSION
30
32
  - beans_rails.gemspec
@@ -32,6 +34,7 @@ files:
32
34
  - bin/beans_rails
33
35
  - templates/.gitignore
34
36
  - templates/Capfile
37
+ - templates/Gemfile
35
38
  - templates/config/database.yml
36
39
  - templates/config/deploy.rb
37
40
  - templates/config/deploy/config/staging.yml
@@ -40,6 +43,7 @@ files:
40
43
  - templates/config/deploy/templates/database.erb
41
44
  - templates/config/deploy/templates/public_keys.txt
42
45
  - templates/config/deploy/templates/staging_vhost.erb
46
+ - templates/config/preinitializer.rb
43
47
  - templates/recipes/beans_server.rb
44
48
  has_rdoc: true
45
49
  homepage: http://github.com/80beans/beans_rails