onotole 1.1.3 → 1.1.4
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 +13 -13
- data/lib/onotole/adapters/heroku.rb +1 -1
- data/lib/onotole/add_user_gems/after_install_patch.rb +2 -1
- data/lib/onotole/add_user_gems/before_bundle_patch.rb +1 -1
- data/lib/onotole/default_frontend.rb +5 -0
- data/lib/onotole/generators/app_generator.rb +1 -0
- data/lib/onotole/mail.rb +1 -1
- data/lib/onotole/tests.rb +1 -1
- data/lib/onotole/version.rb +1 -1
- data/spec/features/new_project_spec.rb +1 -1
- data/templates/app.json.erb +0 -3
- data/templates/browserslist +1 -2
- data/templates/circle.yml.erb +1 -1
- data/templates/dotenv.erb +1 -0
- data/templates/postgresql_database.yml.erb +0 -1
- data/templates/rails_helper.rb +1 -1
- data/templates/{spec_helper.rb → spec_helper.rb.erb} +8 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 69becb51cf5563e771e496aa5743128bd51a30a8
|
4
|
+
data.tar.gz: cf533690ac9787e013fb0fc115ad1f99e1bc3eba
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b49e4638c9070060dfd32e063f8d295e100efd8c35e90143cebf120b2712bf77b00e7f1e987f268c72dd3bb43235567a37007f40d8401515d30c5cb761e4cc9
|
7
|
+
data.tar.gz: 4f1e0396723e421bb9994da228e6e5454afaebdb2e45cc9abeb2159f652af5059b133cfd1a39905ecdfea2f346fe95060edbad367155552ddb12cba427756036
|
data/README.md
CHANGED
@@ -26,6 +26,7 @@ will be installed as addition like default, if start `onotole` with out `-c`
|
|
26
26
|
flag. You can provide automatic install with options, like `--haml`. Default
|
27
27
|
pack will not be installed with any gem option.
|
28
28
|
|
29
|
+
### Flexible gem group
|
29
30
|
|
30
31
|
* [Airbrake](https://github.com/airbrake/airbrake) For exception notification
|
31
32
|
* [bootstrap3](https://github.com/seyhunak/twitter-bootstrap-rails) Bootstrap
|
@@ -129,16 +130,18 @@ or
|
|
129
130
|
|
130
131
|
gem install onotole
|
131
132
|
|
132
|
-
Create gemset if you need it.
|
133
|
-
|
134
133
|
Then run:
|
135
134
|
|
136
135
|
onotole projectname [ -c ] [ * rails_genetator_flags ]
|
137
136
|
|
137
|
+
There is 2 main ways of using:
|
138
|
+
1. `onotole projectname` will generate project with default mandatory gems and
|
139
|
+
default flexible gems
|
140
|
+
2. `onotole projectname -c` will generate project with mandatory gems and will
|
141
|
+
provide a menu for gem selection, where you will need to choose all options.
|
138
142
|
|
139
|
-
|
140
|
-
|
141
|
-
onotole projectname -c
|
143
|
+
Of course you are free to add standard `rails new` flags, inasmuch as Onotole
|
144
|
+
based on standard rails generator
|
142
145
|
|
143
146
|
And command like this will add some magic
|
144
147
|
|
@@ -149,10 +152,6 @@ it with gemname flag, after app_name, like `onotole projectname --slim`.
|
|
149
152
|
List of gems you always can get with `onotole --gems` command. Also,
|
150
153
|
`onotole --help` can be useful.
|
151
154
|
|
152
|
-
!!! Note, that databases with names `projectname`_development and `projectname`_test
|
153
|
-
will be dropped. For example, if your project calls `awesome`, databases
|
154
|
-
`awesome_development` and `awesome_test` will be dropped.
|
155
|
-
|
156
155
|
*NB: if you install custom gems, default user gem pack will not be installed.
|
157
156
|
|
158
157
|
## Gemfile
|
@@ -161,7 +160,7 @@ To see the latest and greatest gems, look at Onotole'
|
|
161
160
|
[Gemfile](templates/Gemfile.erb), which will be appended to the default
|
162
161
|
generated projectname/Gemfile. This gem will be installed anyway.
|
163
162
|
|
164
|
-
|
163
|
+
### Mandatory gem group
|
165
164
|
|
166
165
|
* [Autoprefixer Rails](https://github.com/ai/autoprefixer-rails) for CSS vendor prefixes
|
167
166
|
* [Delayed Job](https://github.com/collectiveidea/delayed_job) for background
|
@@ -250,7 +249,9 @@ Onotole also comes with:
|
|
250
249
|
* Added style flash messagaes for `bootstrap-sass` gem
|
251
250
|
* Auto add gem `devise_bootstrap_views` when `bootstrap-sass` and `devise`
|
252
251
|
selected for pretty view from the box
|
253
|
-
* Added autoload js and scss from `vendor/assets/javascripts` and
|
252
|
+
* Added autoload js and scss from `vendor/assets/javascripts` and
|
253
|
+
`vendor/assets/stylesheets`
|
254
|
+
* Added autoload fonts from `app/assets/fonts/**/*`
|
254
255
|
|
255
256
|
## Heroku
|
256
257
|
|
@@ -262,8 +263,7 @@ This:
|
|
262
263
|
|
263
264
|
* Creates a staging and production Heroku app
|
264
265
|
* Sets them as `staging` and `production` Git remotes
|
265
|
-
* Configures staging with `RACK_ENV`
|
266
|
-
to `staging`
|
266
|
+
* Configures staging with `RACK_ENV` environment variable set to `staging`
|
267
267
|
* Adds the [Rails Stdout Logging][logging-gem] gem
|
268
268
|
to configure the app to log to standard out,
|
269
269
|
which is how [Heroku's logging][heroku-logging] works.
|
@@ -26,7 +26,7 @@ module Onotole
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def create_staging_heroku_app(flags)
|
29
|
-
rack_env = 'RACK_ENV=staging
|
29
|
+
rack_env = 'RACK_ENV=staging'
|
30
30
|
app_name = heroku_app_name_for('staging')
|
31
31
|
|
32
32
|
run_toolbelt_command "create #{app_name} #{flags}", 'staging'
|
@@ -52,7 +52,7 @@ module Onotole
|
|
52
52
|
run 'touch .rubocop_todo.yml'
|
53
53
|
t = <<-TEXT
|
54
54
|
|
55
|
-
if ENV['
|
55
|
+
if ENV['RACK_ENV'] == 'test' || ENV['RACK_ENV'] == 'development'
|
56
56
|
require 'rubocop/rake_task'
|
57
57
|
RuboCop::RakeTask.new
|
58
58
|
end
|
@@ -222,6 +222,7 @@ end
|
|
222
222
|
return unless user_choose? :fotoramajs
|
223
223
|
inject_into_file(AppBuilder.js_file, "\n//= require fotorama",
|
224
224
|
after: '//= require jquery_ujs')
|
225
|
+
append_file(AppBuilder.app_file_scss, "\n@import 'fotorama'")
|
225
226
|
end
|
226
227
|
end
|
227
228
|
end
|
@@ -19,7 +19,7 @@ module Onotole
|
|
19
19
|
def add_dotenv_heroku_gem
|
20
20
|
inject_into_file('Gemfile', "\n gem 'dotenv-heroku'",
|
21
21
|
after: 'group :development do')
|
22
|
-
append_file 'Rakefile', %(\nrequire 'dotenv-heroku/tasks' if ENV['
|
22
|
+
append_file 'Rakefile', %(\nrequire 'dotenv-heroku/tasks' if ENV['RACK_ENV'] == 'test' || ENV['RACK_ENV'] == 'development'\n)
|
23
23
|
end
|
24
24
|
|
25
25
|
def add_slim_gem
|
@@ -80,5 +80,10 @@ module Onotole
|
|
80
80
|
vendor_css_path = "\nRails.application.config.assets.paths += Dir[(Rails.root.join('vendor/assets/stylesheets'))]"
|
81
81
|
append_file 'config/initializers/assets.rb', vendor_css_path
|
82
82
|
end
|
83
|
+
|
84
|
+
def add_fonts_autoload
|
85
|
+
fonts = "\nRails.application.config.assets.precompile << /\.(?:svg|eot|woff|ttf|otf)\z/"
|
86
|
+
append_file 'config/initializers/assets.rb', fonts
|
87
|
+
end
|
83
88
|
end
|
84
89
|
end
|
data/lib/onotole/mail.rb
CHANGED
@@ -30,7 +30,7 @@ module Onotole
|
|
30
30
|
def set_test_delivery_method
|
31
31
|
inject_into_file(
|
32
32
|
'config/environments/development.rb',
|
33
|
-
"\n config.action_mailer.delivery_method = :
|
33
|
+
"\n config.action_mailer.delivery_method = :file",
|
34
34
|
after: 'config.action_mailer.raise_delivery_errors = true'
|
35
35
|
)
|
36
36
|
end
|
data/lib/onotole/tests.rb
CHANGED
@@ -28,7 +28,7 @@ end
|
|
28
28
|
remove_file 'spec/rails_helper.rb'
|
29
29
|
remove_file 'spec/spec_helper.rb'
|
30
30
|
copy_file 'rails_helper.rb', 'spec/rails_helper.rb'
|
31
|
-
|
31
|
+
template 'spec_helper.rb.erb', 'spec/spec_helper.rb'
|
32
32
|
end
|
33
33
|
|
34
34
|
def configure_generators
|
data/lib/onotole/version.rb
CHANGED
@@ -114,7 +114,7 @@ RSpec.describe 'Suspend a new project with default configuration' do
|
|
114
114
|
|
115
115
|
it 'configs :test email delivery method for development' do
|
116
116
|
expect(dev_env_file)
|
117
|
-
.to match(/^ +config.action_mailer.delivery_method = :
|
117
|
+
.to match(/^ +config.action_mailer.delivery_method = :file$/)
|
118
118
|
end
|
119
119
|
|
120
120
|
it 'uses APPLICATION_HOST, not HOST in the production config' do
|
data/templates/app.json.erb
CHANGED
data/templates/browserslist
CHANGED
data/templates/circle.yml.erb
CHANGED
data/templates/dotenv.erb
CHANGED
data/templates/rails_helper.rb
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
-
if ENV.fetch(
|
2
|
+
if ENV.fetch("#{app_name.upcase}_COVERAGE", false)
|
3
3
|
require 'simplecov'
|
4
|
-
|
4
|
+
|
5
|
+
if ENV["CIRCLE_ARTIFACTS"]
|
6
|
+
dir = File.join(ENV["CIRCLE_ARTIFACTS"], "coverage")
|
7
|
+
SimpleCov.coverage_dir(dir)
|
8
|
+
end
|
9
|
+
|
10
|
+
SimpleCov.start('rails')
|
5
11
|
end
|
6
12
|
|
7
13
|
require 'webmock/rspec'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onotole
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- kvokka
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-03-
|
12
|
+
date: 2016-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -162,7 +162,7 @@ files:
|
|
162
162
|
- templates/secrets.yml
|
163
163
|
- templates/shoulda_matchers_config_rspec.rb
|
164
164
|
- templates/smtp.rb.erb
|
165
|
-
- templates/spec_helper.rb
|
165
|
+
- templates/spec_helper.rb.erb
|
166
166
|
- templates/staging.rb
|
167
167
|
- templates/tinymce.yml
|
168
168
|
homepage: http://github.com/kvokka/onotole
|