nubis_rails_boilerplate 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,8 +1,8 @@
1
1
  production:
2
2
  adapter: mysql2
3
3
  encoding: utf8
4
- database: <%= mysql_database %>
4
+ database: <%= configs['mysql']['database'] %>
5
5
  pool: 5
6
- username: <%= mysql_username %>
7
- password: <%= mysql_password %>
8
- host: <%= mysql_host %>
6
+ username: <%= configs['mysql']['username'] %>
7
+ password: <%= configs['mysql']['password'] %>
8
+ host: <%= configs['mysql']['host'] %>
@@ -8,10 +8,10 @@ module NubisRailsBoilerplate
8
8
 
9
9
  cap.set :host_app_path, cap_path
10
10
  cap.set :repository, "git@github.com:nubis/#{app_name}.git"
11
+ load_configs
11
12
  check_git_repo
12
13
  load_modules
13
14
  load_permission
14
- load_configs
15
15
 
16
16
  cap.set :user, "ubuntu"
17
17
  cap.set :application, app_name
@@ -70,11 +70,12 @@ module NubisRailsBoilerplate
70
70
  unless configs.values.all?
71
71
  puts "You need to provide your configuration options before you can push."
72
72
  puts "Setup your server and database and input your data in: #{configs_path}"
73
+ exit 1
73
74
  end
74
75
  configs.each do |key, value|
75
- cap.set key, value
76
+ cap.set :configs, configs
76
77
  end
77
- cap.server configs['server_url'], :web, :app, :db, primary: true
78
+ cap.server configs['site_url'], :web, :app, :db, primary: true
78
79
  end
79
80
  end
80
81
  end
@@ -76,8 +76,8 @@ if Rails.env.production?
76
76
  definition[:storage] = 's3'
77
77
  definition[:bucket] = Settings.s3_bucket_name
78
78
  definition[:s3_credentials] = {
79
- access_key_id: Settings.aws_access_key_id,
80
- secret_access_key: Settings.aws_secret_access_key
79
+ access_key_id: Settings.s3.aws_access_key_id,
80
+ secret_access_key: Settings.s3.aws_secret_access_key
81
81
  }
82
82
  end
83
83
  end
data/lib/templates.rb CHANGED
@@ -13,7 +13,7 @@ module NubisRailsBoilerplate
13
13
  puts "Patching #{skeleton} files for #{app_name}"
14
14
  %w(Rakefile config/application.rb config/environment.rb config/environments/development.rb
15
15
  config/environments/test.rb config/environments/production.rb config/initializers/secret_token.rb
16
- config/database.yml config/initializers/session_store.rb config/routes.rb config.ru).each do |filename|
16
+ config/deploy.rb config/database.yml config/initializers/session_store.rb config/routes.rb config.ru).each do |filename|
17
17
  full_path = File.expand_path(filename, app_name)
18
18
  new_contents = File.read(full_path)
19
19
  .gsub(skeleton.camelize, app_name.camelize)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nubis_rails_boilerplate
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-11-17 00:00:00.000000000 Z
12
+ date: 2013-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: capistrano
16
- requirement: &70133092875420 !ruby/object:Gem::Requirement
16
+ requirement: &70278036112220 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70133092875420
24
+ version_requirements: *70278036112220
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: activeadmin
27
- requirement: &70133092887800 !ruby/object:Gem::Requirement
27
+ requirement: &70278036111300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - =
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.5.0
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70133092887800
35
+ version_requirements: *70278036111300
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: settingslogic
38
- requirement: &70133092885820 !ruby/object:Gem::Requirement
38
+ requirement: &70278036110040 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70133092885820
46
+ version_requirements: *70278036110040
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rails
49
- requirement: &70133092884080 !ruby/object:Gem::Requirement
49
+ requirement: &70278036124060 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,15 +54,13 @@ dependencies:
54
54
  version: 3.2.0
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70133092884080
57
+ version_requirements: *70278036124060
58
58
  description: I usually start the same rails apps, running on the same infrastructure,
59
59
  so this collection of recipes and application templates let me focus on what I care
60
60
  about the most.
61
61
  email: yo@nubis.im
62
62
  executables:
63
63
  - new_real_estate_app
64
- - new_site_with_admin
65
- - new_spree_app
66
64
  extensions: []
67
65
  extra_rdoc_files: []
68
66
  files:
@@ -89,8 +87,6 @@ files:
89
87
  - Readme.md
90
88
  - MIT-LICENSE
91
89
  - bin/new_real_estate_app
92
- - bin/new_site_with_admin
93
- - bin/new_spree_app
94
90
  homepage: https://github.com/nubis/nubis_rails_boilerplate
95
91
  licenses: []
96
92
  post_install_message:
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
- if ARGV.size != 1
3
- puts "Call like #{$0} appname"
4
- exit 1
5
- end
6
-
7
- template = File.expand_path('../../lib/rails_app_templates/site_with_admin.rb', __FILE__)
8
- exec("rails new #{ARGV.first} -d mysql -m #{template}")
data/bin/new_spree_app DELETED
@@ -1,8 +0,0 @@
1
- #!/usr/bin/env ruby
2
- if ARGV.size != 1
3
- puts "Call like #{$0} appname"
4
- exit 1
5
- end
6
-
7
- template = File.expand_path('../../lib/rails_app_templates/spree.rb', __FILE__)
8
- exec("rails new #{ARGV.first} -d mysql -m #{template}")