blueberry_rails 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +27 -0
- data/lib/blueberry_rails/app_builder.rb +13 -0
- data/lib/blueberry_rails/generators/app_generator.rb +3 -0
- data/lib/blueberry_rails/version.rb +1 -1
- data/templates/Gemfile_custom.erb +1 -5
- data/templates/deploy.rb.erb +40 -0
- data/templates/deploy_production.rb.erb +5 -0
- data/templates/deploy_staging.rb.erb +5 -0
- data/templates/factories_spec.rb +14 -0
- metadata +6 -3
- data/templates/Gemfile +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8fe0a9fcb3368c2539f58a84f7a49d78c75f68e7
|
4
|
+
data.tar.gz: 204c12fce1fa68dbbb10340fcc9fe632ce33f401
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91ed6e1d77c686f5deb934757668a27e7c35592097cdbba40a9acb16d28eb1bc4d8dd4ee622a01449b9743233d1f52a1d085dd5f48e1ff65ed4ac099785069c9
|
7
|
+
data.tar.gz: 112db37da4e1873f01bb9c55c3b6d90e27069e62dacf882059d4fe39c796d1db0e35761d296991114347d9edc436327eed05be511e00b8deb4cb0ea014fe8fb2
|
data/README.md
CHANGED
@@ -12,6 +12,33 @@ Then you can run
|
|
12
12
|
|
13
13
|
$ blueberry_rails newproject
|
14
14
|
|
15
|
+
## Gems
|
16
|
+
|
17
|
+
Blueberry Rails template contains following gems by default:
|
18
|
+
|
19
|
+
* [Better Errors](https://github.com/charliesome/better_errors) for better error pages
|
20
|
+
* [dotenv](https://github.com/bkeepers/dotenv) for server-side configuration
|
21
|
+
* [Devise](https://github.com/plataformatec/devise) for user authentication
|
22
|
+
* [New Relic RPM](https://github.com/newrelic/rpm) for performance monitoring
|
23
|
+
* [Mailcatcher](http://mailcatcher.me/) for testing & viewing emails
|
24
|
+
* [PostgreSQL driver (pg)](https://github.com/ged/ruby-pg)
|
25
|
+
* [slim](http://slim-lang.com/) for templates
|
26
|
+
* [simple_form](https://github.com/plataformatec/simple_form) for better & easier forms
|
27
|
+
|
28
|
+
Testing related:
|
29
|
+
|
30
|
+
* [Capybara](https://github.com/jnicklas/capybara) for acceptance testing
|
31
|
+
* [Guard](https://github.com/guard/guard-rails) for automatically running specs
|
32
|
+
* [Factory Girl](https://github.com/rspec/rspec-rails) as a fixtures replacement
|
33
|
+
* [Rspec](https://github.com/rspec/rspec-rails)
|
34
|
+
|
35
|
+
## Other great stuff
|
36
|
+
|
37
|
+
* Do not secret token in the repo - load it via ENV variable
|
38
|
+
* Default Slim application layout
|
39
|
+
* Generates User model by default (via devise)
|
40
|
+
* Partial for displaying flash messages in the default layout
|
41
|
+
|
15
42
|
## Credits
|
16
43
|
|
17
44
|
Based on [suspenders](https://github.com/thoughtbot/suspenders/blob/master/README.md)
|
@@ -78,6 +78,10 @@ module BlueberryRails
|
|
78
78
|
copy_file 'spec_helper.rb', 'spec/spec_helper.rb'
|
79
79
|
end
|
80
80
|
|
81
|
+
def test_factories_first
|
82
|
+
copy_file 'factories_spec.rb', 'spec/models/factories_spec.rb'
|
83
|
+
end
|
84
|
+
|
81
85
|
def enable_factory_girl_syntax
|
82
86
|
copy_file 'factory_girl_syntax.rb', 'spec/support/factory_girl.rb'
|
83
87
|
end
|
@@ -127,6 +131,15 @@ module BlueberryRails
|
|
127
131
|
end
|
128
132
|
end
|
129
133
|
|
134
|
+
def setup_capistrano
|
135
|
+
bundle_command 'exec capify .'
|
136
|
+
remove_file 'config/deploy.rb'
|
137
|
+
template 'deploy.rb.erb', 'config/deploy.rb'
|
138
|
+
template 'deploy_production.rb.erb', 'config/deploy/production.rb'
|
139
|
+
template 'deploy_staging.rb.erb', 'config/deploy/staging.rb'
|
140
|
+
run 'mkdir config/deploy'
|
141
|
+
end
|
142
|
+
|
130
143
|
def setup_gitignore
|
131
144
|
remove_file '.gitignore'
|
132
145
|
copy_file 'gitignore', '.gitignore'
|
@@ -64,6 +64,7 @@ module BlueberryRails
|
|
64
64
|
build :generate_rspec
|
65
65
|
build :configure_rspec
|
66
66
|
build :enable_factory_girl_syntax
|
67
|
+
build :test_factories_first
|
67
68
|
build :init_guard
|
68
69
|
end
|
69
70
|
|
@@ -94,6 +95,8 @@ module BlueberryRails
|
|
94
95
|
say 'Setting up devise'
|
95
96
|
build :install_devise
|
96
97
|
end
|
98
|
+
say 'Setting up Capistrano'
|
99
|
+
build :setup_capistrano
|
97
100
|
end
|
98
101
|
|
99
102
|
def setup_git
|
@@ -16,7 +16,7 @@ gem 'uglifier', '>= 1.3.0'
|
|
16
16
|
group :development do
|
17
17
|
gem 'better_errors'
|
18
18
|
gem 'capistrano'
|
19
|
-
gem 'guard'
|
19
|
+
gem 'guard-rails'
|
20
20
|
gem 'mailcatcher'
|
21
21
|
end
|
22
22
|
|
@@ -25,10 +25,6 @@ group :development, :test do
|
|
25
25
|
gem 'rspec-rails', '>= 2.14'
|
26
26
|
end
|
27
27
|
|
28
|
-
group :doc do
|
29
|
-
gem 'sdoc', require: false
|
30
|
-
end
|
31
|
-
|
32
28
|
group :staging, :production do
|
33
29
|
gem 'newrelic_rpm', '>= 3.6.7'
|
34
30
|
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
require 'bundler/capistrano'
|
2
|
+
set :bundle_without, [:darwin, :test]
|
3
|
+
|
4
|
+
set :stages, %w(staging production)
|
5
|
+
require 'capistrano/ext/multistage'
|
6
|
+
|
7
|
+
set :application, '<%= app_name %>'
|
8
|
+
set :repository, 'git@github.com:blueberryapps/<%= app_name %>.git'
|
9
|
+
set :branch, 'master'
|
10
|
+
|
11
|
+
default_run_options[:pty] = true
|
12
|
+
ssh_options[:forward_agent] = true
|
13
|
+
|
14
|
+
set :use_sudo, false
|
15
|
+
set :deploy_via, :remote_cache
|
16
|
+
set :keep_releases, 3
|
17
|
+
set :group_writable, false
|
18
|
+
ssh_options[:forward_agent] = true
|
19
|
+
|
20
|
+
after 'deploy:restart', 'deploy:cleanup'
|
21
|
+
after 'deploy:update_code', 'deploy:symlink_shared'
|
22
|
+
load 'deploy/assets'
|
23
|
+
|
24
|
+
namespace :deploy do
|
25
|
+
|
26
|
+
task :start do ; end
|
27
|
+
task :stop do ; end
|
28
|
+
task :restart, :roles => :app, :except => { :no_release => true } do
|
29
|
+
run "#{try_sudo} touch #{File.join(current_path, 'tmp', 'restart.txt')}"
|
30
|
+
end
|
31
|
+
|
32
|
+
desc 'Create symbolic links for all shared and platform-specific resources.'
|
33
|
+
task :symlink_shared, roles: [:app] do
|
34
|
+
run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
|
35
|
+
run "ln -nfs #{shared_path}/system #{release_path}/public/system"
|
36
|
+
run "ln -nfs #{shared_path}/config/dotenv #{release_path}/.env"
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
FactoryGirl.factories.map(&:name).each do |factory_name|
|
4
|
+
describe "factory #{factory_name}" do
|
5
|
+
it 'is valid' do
|
6
|
+
factory = build(factory_name)
|
7
|
+
|
8
|
+
if factory.respond_to?(:valid?)
|
9
|
+
expect(factory).to be_valid, factory.errors.full_messages.join(',')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blueberry_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blueberryapps
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,12 +72,15 @@ files:
|
|
72
72
|
- lib/blueberry_rails/app_builder.rb
|
73
73
|
- lib/blueberry_rails/generators/app_generator.rb
|
74
74
|
- lib/blueberry_rails/version.rb
|
75
|
-
- templates/Gemfile
|
76
75
|
- templates/Gemfile_custom.erb
|
77
76
|
- templates/README.md.erb
|
78
77
|
- templates/_flashes.html.slim
|
79
78
|
- templates/database.yml.erb
|
79
|
+
- templates/deploy.rb.erb
|
80
|
+
- templates/deploy_production.rb.erb
|
81
|
+
- templates/deploy_staging.rb.erb
|
80
82
|
- templates/disable_xml_params.rb
|
83
|
+
- templates/factories_spec.rb
|
81
84
|
- templates/factory_girl_syntax.rb
|
82
85
|
- templates/gitignore
|
83
86
|
- templates/layout.html.slim.erb
|
data/templates/Gemfile
DELETED
File without changes
|