blueberry_rails 0.3.1 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -3
- data/README.md +1 -1
- data/bin/blueberry_rails +6 -3
- data/blueberry_rails.gemspec +1 -1
- data/lib/blueberry_rails.rb +4 -2
- data/lib/blueberry_rails/app_builder.rb +8 -0
- data/lib/blueberry_rails/generators/app_generator.rb +2 -0
- data/lib/blueberry_rails/version.rb +5 -1
- data/templates/Gemfile_custom.erb +4 -1
- data/templates/gitignore +1 -0
- data/templates/pryrc.rb +51 -0
- data/templates/travis.yml.erb +24 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85a5471d088ab01e2c8f67de92f4efed8ea7e484
|
4
|
+
data.tar.gz: 413aca5512b2bca982e358a6aa9f59d2e6dd4e85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ce5feb5a3b0932b12c8bca4e47a964bbe5bb0ddf734a026ba6073aabf25a475a733343a3538090058730f9a31efb9151f0a66c696a60903fc10bbaa076f4bcb
|
7
|
+
data.tar.gz: 0c2a9c95003732e1aece8365755465fd293d45da7d31dece163800993fa4dfbb5b89b3620439cd6e9afa545e2f79bac2261b87333cbe52e2a9fc0fd54d82ffe5
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -28,7 +28,7 @@ Blueberry Rails template contains following gems by default:
|
|
28
28
|
Testing related:
|
29
29
|
|
30
30
|
* [Capybara](https://github.com/jnicklas/capybara) for acceptance testing
|
31
|
-
* [Guard](https://github.com/
|
31
|
+
* [Guard](https://github.com/ranmocy/guard-rails) for automatically running specs
|
32
32
|
* [Factory Girl](https://github.com/rspec/rspec-rails) as a fixtures replacement
|
33
33
|
* [Rspec](https://github.com/rspec/rspec-rails)
|
34
34
|
|
data/bin/blueberry_rails
CHANGED
@@ -1,8 +1,11 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
|
5
|
-
|
3
|
+
require 'pathname'
|
4
|
+
|
5
|
+
source_path = (Pathname.new(__FILE__).dirname + '../lib').expand_path
|
6
|
+
$LOAD_PATH << source_path
|
7
|
+
|
8
|
+
require 'blueberry_rails'
|
6
9
|
|
7
10
|
templates_root = File.expand_path(File.join('..', 'templates'), File.dirname(__FILE__))
|
8
11
|
BlueberryRails::AppGenerator.source_root templates_root
|
data/blueberry_rails.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_dependency 'bundler', '~> 1.3'
|
22
|
-
spec.add_dependency 'rails',
|
22
|
+
spec.add_dependency 'rails', BlueberryRails::RAILS_VERSION
|
23
23
|
|
24
24
|
spec.add_development_dependency 'rake'
|
25
25
|
|
data/lib/blueberry_rails.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
require
|
1
|
+
require 'blueberry_rails/version'
|
2
|
+
require 'blueberry_rails/generators/app_generator'
|
3
|
+
require 'blueberry_rails/action_helpers'
|
4
|
+
require 'blueberry_rails/app_builder'
|
2
5
|
|
3
6
|
module BlueberryRails
|
4
|
-
# Your code goes here...
|
5
7
|
end
|
@@ -59,6 +59,10 @@ module BlueberryRails
|
|
59
59
|
force: true
|
60
60
|
end
|
61
61
|
|
62
|
+
def create_pryrc
|
63
|
+
copy_file 'pryrc.rb', '.pryrc'
|
64
|
+
end
|
65
|
+
|
62
66
|
def remove_turbolinks
|
63
67
|
replace_in_file 'app/assets/javascripts/application.js',
|
64
68
|
/\/\/= require turbolinks\n/,
|
@@ -121,6 +125,10 @@ module BlueberryRails
|
|
121
125
|
inject_into_class 'config/application.rb', 'Application', config
|
122
126
|
end
|
123
127
|
|
128
|
+
def configure_travis
|
129
|
+
template 'travis.yml.erb', '.travis.yml'
|
130
|
+
end
|
131
|
+
|
124
132
|
def add_ruby_version_file
|
125
133
|
current_version = RUBY_VERSION.split('.').map(&:to_i)
|
126
134
|
version = if current_version[0] >= 2 && current_version[1] >= 0
|
@@ -72,6 +72,7 @@ module BlueberryRails
|
|
72
72
|
build :configure_rspec
|
73
73
|
build :setup_rspec_support_files
|
74
74
|
build :test_factories_first
|
75
|
+
build :configure_travis
|
75
76
|
build :init_guard
|
76
77
|
end
|
77
78
|
|
@@ -91,6 +92,7 @@ module BlueberryRails
|
|
91
92
|
build :disable_xml_params
|
92
93
|
build :setup_mailer_hosts
|
93
94
|
build :remove_turbolinks
|
95
|
+
build :create_pryrc
|
94
96
|
build :add_ruby_version_file
|
95
97
|
end
|
96
98
|
|
@@ -1,5 +1,7 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
+
ruby "<%= BlueberryRails::RUBY_VERSION %>"
|
4
|
+
|
3
5
|
gem 'airbrake'
|
4
6
|
<% if options[:bootstrap] -%>
|
5
7
|
gem 'bootstrap-sass'
|
@@ -12,11 +14,12 @@ gem 'dotenv-rails'
|
|
12
14
|
gem 'flutie'
|
13
15
|
gem 'jquery-rails'
|
14
16
|
gem 'pg'
|
15
|
-
gem 'rails', '~>
|
17
|
+
gem 'rails', '~> <%= BlueberryRails::RAILS_VERSION %>'
|
16
18
|
gem 'sass-rails', '~> 4.0.4'
|
17
19
|
gem 'simple_form'
|
18
20
|
gem 'slim-rails'
|
19
21
|
gem 'uglifier', '>= 2.5.0'
|
22
|
+
gem 'unicorn'
|
20
23
|
|
21
24
|
group :development do
|
22
25
|
gem 'better_errors'
|
data/templates/gitignore
CHANGED
data/templates/pryrc.rb
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# Switch default editor for pry to Sublime text
|
2
|
+
Pry.config.editor = ENV['PRY_EDITOR'] || 'sublime'
|
3
|
+
|
4
|
+
# History
|
5
|
+
Pry.config.history.file = '.pry_history'
|
6
|
+
|
7
|
+
# Support for debugger - remove aliases
|
8
|
+
if defined? PryDebugger
|
9
|
+
Pry::Commands.delete 'c'
|
10
|
+
Pry::Commands.delete 'n'
|
11
|
+
Pry::Commands.delete 's'
|
12
|
+
end
|
13
|
+
|
14
|
+
# awesome_print gem
|
15
|
+
begin
|
16
|
+
require 'awesome_print'
|
17
|
+
Pry.config.print = proc { |output, value| Pry::Helpers::BaseHelpers.stagger_output("=> #{value.ai}", output) }
|
18
|
+
rescue LoadError
|
19
|
+
# no awesome_print present
|
20
|
+
end
|
21
|
+
|
22
|
+
# Prompt with app name
|
23
|
+
Pry.config.prompt_name = begin
|
24
|
+
current_branch = `git rev-parse --abbrev-ref HEAD`.chomp
|
25
|
+
current_branch = "#{current_branch[0..14]}.." if current_branch.length > 16
|
26
|
+
|
27
|
+
prompt_name = ENV['APP_NAME'] || File.basename(Rails.root)
|
28
|
+
prompt_name << "#{Rails.env.to_s.first}" unless Rails.env.development?
|
29
|
+
prompt_name << " (#{current_branch})"
|
30
|
+
prompt_name
|
31
|
+
end
|
32
|
+
|
33
|
+
Pry.config.prompt = [
|
34
|
+
# Default
|
35
|
+
-> (target_self, nest_level, pry) {
|
36
|
+
prompt = "[#{pry.input_array.size}]"
|
37
|
+
prompt << " #{Pry.config.prompt_name}:"
|
38
|
+
prompt << " #{Pry.view_clip(target_self)}"
|
39
|
+
prompt << "#{":#{nest_level}" unless nest_level.zero?}> "
|
40
|
+
prompt
|
41
|
+
},
|
42
|
+
|
43
|
+
# Nested under def, class etc.
|
44
|
+
->(target_self, nest_level, pry) {
|
45
|
+
default_prompt = Pry.config.prompt[0].call(target_self, nest_level, pry)
|
46
|
+
prompt = (' ' * default_prompt.length)[0...-(pry.input_array.size.to_s.length + 4)]
|
47
|
+
prompt << " #{pry.input_array.size} "
|
48
|
+
prompt << '> '
|
49
|
+
prompt
|
50
|
+
}
|
51
|
+
]
|
@@ -0,0 +1,24 @@
|
|
1
|
+
before_install:
|
2
|
+
- "echo '--colour' > ~/.rspec"
|
3
|
+
- "echo 'gem: --no-document' > ~/.gemrc"
|
4
|
+
- export DISPLAY=:99.0
|
5
|
+
- sh -e /etc/init.d/xvfb start
|
6
|
+
before_script:
|
7
|
+
- cp .sample.env .env
|
8
|
+
<% if options[:database] == "postgresql" %>
|
9
|
+
- psql -c 'create database "<%= app_name %>_test";' -U postgres
|
10
|
+
<% end %>
|
11
|
+
branches:
|
12
|
+
only:
|
13
|
+
- master
|
14
|
+
cache:
|
15
|
+
- bundler
|
16
|
+
language:
|
17
|
+
- ruby
|
18
|
+
notifications:
|
19
|
+
email:
|
20
|
+
- false
|
21
|
+
rvm:
|
22
|
+
- <%= BlueberryRails::RUBY_VERSION %>
|
23
|
+
addons:
|
24
|
+
postgresql: "9.3"
|
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.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- BlueberryApps
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - '='
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 4.1.
|
33
|
+
version: 4.1.9
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 4.1.
|
40
|
+
version: 4.1.9
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -89,9 +89,11 @@ files:
|
|
89
89
|
- templates/factory_girl_syntax.rb
|
90
90
|
- templates/gitignore
|
91
91
|
- templates/layout.html.slim.erb
|
92
|
+
- templates/pryrc.rb
|
92
93
|
- templates/root_controller_spec.rb
|
93
94
|
- templates/secret_token.rb.erb
|
94
95
|
- templates/spec_helper.rb
|
96
|
+
- templates/travis.yml.erb
|
95
97
|
- templates/users_factory.rb
|
96
98
|
homepage: https://github.com/blueberryapps/blueberry_rails
|
97
99
|
licenses:
|