bluebase 0.0.2 → 1.0.0
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/.envrc +1 -0
- data/README.md +67 -12
- data/Rakefile +7 -1
- data/bin/bluebase +13 -0
- data/bin/bundler +16 -0
- data/bin/rake +16 -0
- data/bin/rspec +16 -0
- data/bluebase.gemspec +1 -0
- data/lib/bluebase.rb +3 -6
- data/lib/bluebase/actions.rb +25 -0
- data/lib/bluebase/app_builder.rb +356 -0
- data/lib/bluebase/generators/app_generator.rb +129 -0
- data/lib/bluebase/version.rb +1 -1
- data/spec/fakes/bin/heroku +5 -0
- data/spec/fakes/bin/hub +5 -0
- data/spec/features/github_spec.rb +10 -0
- data/spec/features/heroku_spec.rb +24 -0
- data/spec/features/new_project_spec.rb +68 -0
- data/spec/spec_helper.rb +24 -0
- data/spec/support/bluebase.rb +49 -0
- data/spec/support/fake_github.rb +21 -0
- data/spec/support/fake_heroku.rb +32 -0
- data/templates/.envrc +1 -0
- data/templates/.hound.yml +4 -0
- data/templates/.rspec +2 -0
- data/templates/.rubocop.yml +20 -0
- data/templates/.travis.yml.erb +12 -0
- data/templates/Gemfile.erb +74 -0
- data/templates/Guardfile +43 -0
- data/templates/README.md.erb +30 -0
- data/templates/app/_fb_meta_tags.html.slim +6 -0
- data/templates/app/_flash.html.slim +2 -0
- data/templates/app/_ga_boiler.html.slim +8 -0
- data/templates/app/application.css.scss +12 -0
- data/templates/app/application.html.slim +23 -0
- data/templates/bin/setup +28 -0
- data/templates/bluebase_gitignore +18 -0
- data/templates/config/application.yml.sample.erb +26 -0
- data/templates/config/bluebase_secrets.yml +14 -0
- data/templates/config/database.yml.sample.erb +15 -0
- data/templates/config/database.yml.travis.erb +4 -0
- data/templates/config/devise.rb +298 -0
- data/templates/config/en.yml.erb +19 -0
- data/templates/config/figaro.rb +2 -0
- data/templates/config/i18n-tasks.yml +93 -0
- data/templates/config/smtp.rb +9 -0
- data/templates/config/staging.rb.erb +9 -0
- data/templates/spec/action_mailer.rb +5 -0
- data/templates/spec/database_cleaner_and_factory_girl_lint.rb +26 -0
- data/templates/spec/factory_girl.rb +3 -0
- data/templates/spec/i18n.rb +3 -0
- data/templates/spec/rails_helper.rb +30 -0
- data/templates/spec/spec_helper.rb +17 -0
- metadata +79 -4
@@ -0,0 +1,93 @@
|
|
1
|
+
# i18n-tasks finds and manages missing and unused translations https://github.com/glebm/i18n-tasks
|
2
|
+
|
3
|
+
base_locale: en
|
4
|
+
## i18n-tasks detects locales automatically from the existing locale files
|
5
|
+
## uncomment to set locales explicitly
|
6
|
+
# locales: [en, es, fr]
|
7
|
+
|
8
|
+
## i18n-tasks report locale, default: en, available: en, ru
|
9
|
+
# internal_locale: ru
|
10
|
+
|
11
|
+
# Read and write locale data
|
12
|
+
data:
|
13
|
+
## by default, translation data are read from the file system, or you can provide a custom data adapter
|
14
|
+
# adapter: I18n::Tasks::Data::FileSystem
|
15
|
+
|
16
|
+
# Locale files to read from
|
17
|
+
read:
|
18
|
+
- config/locales/*.%{locale}.yml
|
19
|
+
- config/locales/%{locale}.yml
|
20
|
+
# - config/locales/*.%{locale}.yml
|
21
|
+
# - config/locales/**/*.%{locale}.yml
|
22
|
+
|
23
|
+
# key => file routes, matched top to bottom
|
24
|
+
write:
|
25
|
+
## E.g., write devise and simple form keys to their respective files
|
26
|
+
# - ['{devise, simple_form}.*', 'config/locales/\1.%{locale}.yml']
|
27
|
+
# Catch-all
|
28
|
+
- config/locales/%{locale}.yml
|
29
|
+
# `i18n-tasks normalize -p` will force move the keys according to these rules
|
30
|
+
|
31
|
+
# YAML / JSON serializer options, passed to load / dump / parse / serialize
|
32
|
+
yaml:
|
33
|
+
write:
|
34
|
+
# do not wrap lines at 80 characters
|
35
|
+
line_width: -1
|
36
|
+
json:
|
37
|
+
write:
|
38
|
+
# pretty print JSON
|
39
|
+
indent: ' '
|
40
|
+
space: ' '
|
41
|
+
object_nl: "\n"
|
42
|
+
array_nl: "\n"
|
43
|
+
|
44
|
+
# Find translate calls
|
45
|
+
search:
|
46
|
+
## Default scanner finds t() and I18n.t() calls
|
47
|
+
# scanner: I18n::Tasks::Scanners::PatternWithScopeScanner
|
48
|
+
|
49
|
+
## Paths to search in, passed to File.find
|
50
|
+
paths:
|
51
|
+
- app/
|
52
|
+
- spec/
|
53
|
+
|
54
|
+
## Root for resolving relative keys (default)
|
55
|
+
# relative_roots:
|
56
|
+
# - app/views
|
57
|
+
|
58
|
+
## File.fnmatch patterns to exclude from search (default)
|
59
|
+
# exclude: ["*.jpg", "*.png", "*.gif", "*.svg", "*.ico", "*.eot", "*.ttf", "*.woff", "*.pdf"]
|
60
|
+
|
61
|
+
## Or, File.fnmatch patterns to include
|
62
|
+
# include: ["*.rb", "*.html.slim"]
|
63
|
+
|
64
|
+
## Google Translate
|
65
|
+
# translation:
|
66
|
+
# # Get an API key and set billing info at https://code.google.com/apis/console to use Google Translate
|
67
|
+
# api_key: "AbC-dEf5"
|
68
|
+
|
69
|
+
## Consider these keys not missing
|
70
|
+
# ignore_missing:
|
71
|
+
# - 'errors.messages.{accepted,blank,invalid,too_short,too_long}'
|
72
|
+
# - '{devise,simple_form}.*'
|
73
|
+
|
74
|
+
## Consider these keys used
|
75
|
+
ignore_unused:
|
76
|
+
- '{devise,kaminari}.*'
|
77
|
+
- 'errors.*'
|
78
|
+
- 'titles.*'
|
79
|
+
- 'simple_form.{yes,no}'
|
80
|
+
- 'simple_form.{placeholders,hints,labels}.*'
|
81
|
+
- 'simple_form.{error_notification,required}.:'
|
82
|
+
# - 'activerecord.attributes.*'
|
83
|
+
|
84
|
+
## Exclude these keys from `i18n-tasks eq-base' report
|
85
|
+
# ignore_eq_base:
|
86
|
+
# all:
|
87
|
+
# - common.ok
|
88
|
+
# fr,es:
|
89
|
+
# - common.brand
|
90
|
+
|
91
|
+
## Exclude these keys from all of the reports
|
92
|
+
# ignore:
|
93
|
+
# - kaminari.*
|
@@ -0,0 +1,9 @@
|
|
1
|
+
SMTP_SETTINGS = {
|
2
|
+
address: ENV.fetch("SMTP_ADDRESS"), # example: "smtp.sendgrid.net"
|
3
|
+
authentication: :plain,
|
4
|
+
domain: ENV.fetch("SMTP_DOMAIN"), # example: "this-app.com"
|
5
|
+
enable_starttls_auto: true,
|
6
|
+
password: ENV.fetch("SMTP_PASSWORD"),
|
7
|
+
port: "587",
|
8
|
+
user_name: ENV.fetch("SMTP_USERNAME")
|
9
|
+
}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
require_relative "production"
|
2
|
+
|
3
|
+
Mail.register_interceptor(
|
4
|
+
RecipientInterceptor.new(ENV.fetch("EMAIL_RECIPIENTS"), subject_prefix: "[STAGING]")
|
5
|
+
)
|
6
|
+
|
7
|
+
Rails.application.configure do
|
8
|
+
config.action_mailer.default_url_options = { host: "staging.<%= app_path %>.com" }
|
9
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
RSpec.configure do |config|
|
2
|
+
config.before(:suite) do
|
3
|
+
begin
|
4
|
+
DatabaseCleaner.clean_with(:truncation)
|
5
|
+
FactoryGirl.lint
|
6
|
+
ensure
|
7
|
+
DatabaseCleaner.clean
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
config.before(:each) do
|
12
|
+
DatabaseCleaner.strategy = :transaction
|
13
|
+
end
|
14
|
+
|
15
|
+
config.before(:each, js: true) do
|
16
|
+
DatabaseCleaner.strategy = :truncation
|
17
|
+
end
|
18
|
+
|
19
|
+
config.before(:each) do
|
20
|
+
DatabaseCleaner.start
|
21
|
+
end
|
22
|
+
|
23
|
+
config.after(:each) do
|
24
|
+
DatabaseCleaner.clean
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# Rspec config for Rails
|
2
|
+
ENV["RAILS_ENV"] ||= 'test'
|
3
|
+
require 'spec_helper'
|
4
|
+
require File.expand_path("../../config/environment", __FILE__)
|
5
|
+
require 'rspec/rails'
|
6
|
+
require 'shoulda/matchers'
|
7
|
+
|
8
|
+
# Requires supporting ruby files with custom matchers and macros, etc, in
|
9
|
+
# spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
|
10
|
+
# run as spec files by default. This means that files in spec/support that end
|
11
|
+
# in _spec.rb will both be required and run as specs, causing the specs to be
|
12
|
+
# run twice. It is recommended that you do not name files matching this glob to
|
13
|
+
# end with _spec.rb. You can configure this pattern with the --pattern
|
14
|
+
# option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
|
15
|
+
#
|
16
|
+
# The following line is provided for convenience purposes. It has the downside
|
17
|
+
# of increasing the boot-up time by auto-requiring all files in the support
|
18
|
+
# directory. Alternatively, in the individual `*_spec.rb` files, manually
|
19
|
+
# require only the support files necessary.
|
20
|
+
#
|
21
|
+
Dir[Rails.root.join("spec/support/**/*.rb")].each { |f| require f }
|
22
|
+
|
23
|
+
# Checks for pending migrations before tests are run.
|
24
|
+
ActiveRecord::Migration.maintain_test_schema!
|
25
|
+
|
26
|
+
RSpec.configure do |config|
|
27
|
+
config.include Features, type: :feature
|
28
|
+
config.use_transactional_fixtures = false
|
29
|
+
config.infer_spec_type_from_file_location!
|
30
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Start CodeClimate
|
2
|
+
require "codeclimate-test-reporter"
|
3
|
+
CodeClimate::TestReporter.start
|
4
|
+
|
5
|
+
# http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
6
|
+
RSpec.configure do |config|
|
7
|
+
config.expect_with :rspec do |expectations|
|
8
|
+
expectations.syntax = :expect
|
9
|
+
expectations.include_chain_clauses_in_custom_matcher_descriptions = true
|
10
|
+
end
|
11
|
+
|
12
|
+
config.mock_with :rspec do |mocks|
|
13
|
+
mocks.syntax = :expect
|
14
|
+
end
|
15
|
+
|
16
|
+
config.order = :random
|
17
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bluebase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sam Lau
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-11-
|
12
|
+
date: 2014-11-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -59,6 +59,20 @@ dependencies:
|
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: 3.1.0
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: pry
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0.10'
|
69
|
+
type: :development
|
70
|
+
prerelease: false
|
71
|
+
version_requirements: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.10'
|
62
76
|
- !ruby/object:Gem::Dependency
|
63
77
|
name: capybara
|
64
78
|
requirement: !ruby/object:Gem::Requirement
|
@@ -83,10 +97,15 @@ description: |
|
|
83
97
|
Bluebase is Blueprint's base Rails app. We use it internally to get a jump start on our Rails projects.
|
84
98
|
email:
|
85
99
|
- team@calblueprint.org
|
86
|
-
executables:
|
100
|
+
executables:
|
101
|
+
- bluebase
|
102
|
+
- bundler
|
103
|
+
- rake
|
104
|
+
- rspec
|
87
105
|
extensions: []
|
88
106
|
extra_rdoc_files: []
|
89
107
|
files:
|
108
|
+
- ".envrc"
|
90
109
|
- ".gitignore"
|
91
110
|
- ".ruby-gemset"
|
92
111
|
- ".ruby-version"
|
@@ -94,9 +113,56 @@ files:
|
|
94
113
|
- LICENSE.txt
|
95
114
|
- README.md
|
96
115
|
- Rakefile
|
116
|
+
- bin/bluebase
|
117
|
+
- bin/bundler
|
118
|
+
- bin/rake
|
119
|
+
- bin/rspec
|
97
120
|
- bluebase.gemspec
|
98
121
|
- lib/bluebase.rb
|
122
|
+
- lib/bluebase/actions.rb
|
123
|
+
- lib/bluebase/app_builder.rb
|
124
|
+
- lib/bluebase/generators/app_generator.rb
|
99
125
|
- lib/bluebase/version.rb
|
126
|
+
- spec/fakes/bin/heroku
|
127
|
+
- spec/fakes/bin/hub
|
128
|
+
- spec/features/github_spec.rb
|
129
|
+
- spec/features/heroku_spec.rb
|
130
|
+
- spec/features/new_project_spec.rb
|
131
|
+
- spec/spec_helper.rb
|
132
|
+
- spec/support/bluebase.rb
|
133
|
+
- spec/support/fake_github.rb
|
134
|
+
- spec/support/fake_heroku.rb
|
135
|
+
- templates/.envrc
|
136
|
+
- templates/.hound.yml
|
137
|
+
- templates/.rspec
|
138
|
+
- templates/.rubocop.yml
|
139
|
+
- templates/.travis.yml.erb
|
140
|
+
- templates/Gemfile.erb
|
141
|
+
- templates/Guardfile
|
142
|
+
- templates/README.md.erb
|
143
|
+
- templates/app/_fb_meta_tags.html.slim
|
144
|
+
- templates/app/_flash.html.slim
|
145
|
+
- templates/app/_ga_boiler.html.slim
|
146
|
+
- templates/app/application.css.scss
|
147
|
+
- templates/app/application.html.slim
|
148
|
+
- templates/bin/setup
|
149
|
+
- templates/bluebase_gitignore
|
150
|
+
- templates/config/application.yml.sample.erb
|
151
|
+
- templates/config/bluebase_secrets.yml
|
152
|
+
- templates/config/database.yml.sample.erb
|
153
|
+
- templates/config/database.yml.travis.erb
|
154
|
+
- templates/config/devise.rb
|
155
|
+
- templates/config/en.yml.erb
|
156
|
+
- templates/config/figaro.rb
|
157
|
+
- templates/config/i18n-tasks.yml
|
158
|
+
- templates/config/smtp.rb
|
159
|
+
- templates/config/staging.rb.erb
|
160
|
+
- templates/spec/action_mailer.rb
|
161
|
+
- templates/spec/database_cleaner_and_factory_girl_lint.rb
|
162
|
+
- templates/spec/factory_girl.rb
|
163
|
+
- templates/spec/i18n.rb
|
164
|
+
- templates/spec/rails_helper.rb
|
165
|
+
- templates/spec/spec_helper.rb
|
100
166
|
homepage: https://github.com/calblueprint/bluebase
|
101
167
|
licenses:
|
102
168
|
- MIT
|
@@ -121,4 +187,13 @@ rubygems_version: 2.2.2
|
|
121
187
|
signing_key:
|
122
188
|
specification_version: 4
|
123
189
|
summary: Bluebase creates a Rails app with all of our favorite defaults.
|
124
|
-
test_files:
|
190
|
+
test_files:
|
191
|
+
- spec/fakes/bin/heroku
|
192
|
+
- spec/fakes/bin/hub
|
193
|
+
- spec/features/github_spec.rb
|
194
|
+
- spec/features/heroku_spec.rb
|
195
|
+
- spec/features/new_project_spec.rb
|
196
|
+
- spec/spec_helper.rb
|
197
|
+
- spec/support/bluebase.rb
|
198
|
+
- spec/support/fake_github.rb
|
199
|
+
- spec/support/fake_heroku.rb
|