stationed 0.0.1 → 0.1.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/LICENSE +1 -1
- data/README.md +6 -3
- data/lib/stationed/generators/app_generator.rb +0 -1
- data/lib/stationed/generators/plugins/capybara.rb +8 -0
- data/lib/stationed/generators/plugins/capybara_webkit.rb +8 -0
- data/lib/stationed/generators/plugins/database_cleaner.rb +8 -0
- data/lib/stationed/generators/plugins/devise.rb +11 -1
- data/lib/stationed/generators/plugins/draper.rb +8 -0
- data/lib/stationed/generators/plugins/factory_girl.rb +8 -0
- data/lib/stationed/generators/plugins/flashes.rb +8 -0
- data/lib/stationed/generators/plugins/foreman.rb +9 -1
- data/lib/stationed/generators/plugins/generators.rb +8 -0
- data/lib/stationed/generators/plugins/guard.rb +9 -0
- data/lib/stationed/generators/plugins/haml.rb +8 -0
- data/lib/stationed/generators/plugins/i18n_spec.rb +8 -0
- data/lib/stationed/generators/plugins/kaminari.rb +9 -0
- data/lib/stationed/generators/plugins/layout.rb +8 -0
- data/lib/stationed/generators/plugins/pry.rb +8 -0
- data/lib/stationed/generators/plugins/pundit.rb +9 -0
- data/lib/stationed/generators/plugins/rack_deflater.rb +8 -0
- data/lib/stationed/generators/plugins/responders.rb +8 -0
- data/lib/stationed/generators/plugins/rspec.rb +9 -0
- data/lib/stationed/generators/plugins/rubocop.rb +8 -0
- data/lib/stationed/generators/plugins/simple_form.rb +9 -0
- data/lib/stationed/generators/plugins/simple_form_inputs.rb +8 -0
- data/lib/stationed/generators/plugins/spring.rb +8 -0
- data/lib/stationed/generators/plugins/stationed.rb +8 -0
- data/lib/stationed/generators/plugins/strong_parameters.rb +8 -0
- data/lib/stationed/generators/plugins/styles.rb +10 -0
- data/lib/stationed/generators/plugins/turbolinks.rb +8 -0
- data/lib/stationed/generators/plugins/webmock.rb +8 -0
- data/lib/stationed/generators/plugins/wiki.rb +8 -0
- data/lib/stationed/generators/plugins/yard.rb +8 -0
- data/lib/stationed/generators/templates/application.html.haml +1 -0
- data/lib/stationed/version.rb +1 -1
- data/spec/dummy/log/test.log +56 -0
- metadata +2 -3
- data/lib/stationed/generators/plugins/normalize.rb +0 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ddd733df0111d69ab25025b8cd2cd21d46b5df23
|
4
|
+
data.tar.gz: b1574b28a98ef141d8b7b1354f07848edc6f3c87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b658a1b9f224f88cd45eefd99a32e3a1b942d22c5e958b995f08d3840dd1dff4c228172fa2d290251b64b787e50b04de8669258122c447f2b9e959ad13bfa486
|
7
|
+
data.tar.gz: 40ab1e4c1ca98273577df0f1e0235aa1ccec4df7dac8e1e344d3a64625efd762252fb52d72a81073b2660c6001af17373f5521e38f3697878afeef5e84ec476b
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -55,8 +55,11 @@ This will generate a default Rails application with the following additions:
|
|
55
55
|
...and some other minor configurations and goodies.
|
56
56
|
|
57
57
|
All these additions are stand-alone "plugins" for the base application
|
58
|
-
generator, so it is easy to adapt them or add others.
|
59
|
-
|
58
|
+
generator, so it is easy to adapt them or add others. Plugins have their own CLI
|
59
|
+
options, so you can easily enable or disable them. To see the available options,
|
60
|
+
run:
|
61
|
+
|
62
|
+
% stationed -h
|
60
63
|
|
61
64
|
## Helpers
|
62
65
|
|
@@ -131,6 +134,6 @@ See the [HISTORY](https://github.com/avdgaag/stationed/blob/master/HISTORY.md) f
|
|
131
134
|
Created by: Arjan van der Gaag
|
132
135
|
URL: [http://arjanvandergaag.nl](http://arjanvandergaag.nl)
|
133
136
|
Project homepage:
|
134
|
-
[http://avdgaag.github.com/
|
137
|
+
[http://avdgaag.github.com/stationed](http://avdgaag.github.com/stationed)
|
135
138
|
Date: april 2014
|
136
139
|
License: [MIT-license](https://github.com/avdgaag/stationed/LICENSE) (same as Ruby)
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Capybara
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :capybara,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include Capybara'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:capybara]
|
6
14
|
gem 'capybara', group: :test
|
7
15
|
super
|
8
16
|
end
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module CapybaraWebkit
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :capybara_webkit,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include CapybaraWebkit for headless browser testing'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:capybara] && options[:capybara_webkit]
|
6
14
|
gem 'capybara-webkit', group: :test
|
7
15
|
copy_file 'capybara_webkit.rb', 'spec/support/capybara_webkit.rb'
|
8
16
|
super
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module DatabaseCleaner
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :database_cleaner,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Replace transactional fixtures with DatabaseCleaner'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:database_cleaner]
|
6
14
|
gem 'database_cleaner', group: :test
|
7
15
|
copy_file 'database_cleaner.rb', 'spec/support/database_cleaner.rb'
|
8
16
|
super
|
@@ -2,9 +2,17 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Devise
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :devise,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Set up authentication with Devise'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:devise]
|
6
14
|
gem 'devise'
|
7
|
-
copy_file 'devise.rb', 'spec/support/devise.rb'
|
15
|
+
copy_file 'devise.rb', 'spec/support/devise.rb' if options[:rspec]
|
8
16
|
route "devise_scope :user do\n root to: 'devise/sessions#new'\n end\n"
|
9
17
|
environment nil, env: :test do
|
10
18
|
"config.action_mailer.default_url_options = { host: 'example.com' }"
|
@@ -17,8 +25,10 @@ module Stationed
|
|
17
25
|
|
18
26
|
def run_bundle
|
19
27
|
super
|
28
|
+
return unless options[:devise]
|
20
29
|
generate 'devise:install'
|
21
30
|
generate 'devise user'
|
31
|
+
return unless options[:pundit]
|
22
32
|
application do
|
23
33
|
<<-RUBY
|
24
34
|
# Let Pundit authorization or custom responders not influence the workings
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Draper
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :draper,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include and configure draper for view decorators'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:draper]
|
6
14
|
gem 'draper'
|
7
15
|
copy_file 'application_decorator.rb', 'app/decorators/application_decorator.rb'
|
8
16
|
copy_file 'paginating_decorator.rb', 'app/decorators/paginating_decorator.rb'
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module FactoryGirl
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :factory_girl,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include FactoryGirl and default tests for valid factories'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:factory_girl]
|
6
14
|
gem 'factory_girl_rails', group: [:development, :test]
|
7
15
|
copy_file 'factory_girl.rb', 'spec/support/factory_girl.rb'
|
8
16
|
copy_file 'factories_spec.rb', 'spec/models/factories_spec.rb'
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Flashes
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :flashes,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include generic flashes partial'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:flashes] && options[:layout]
|
6
14
|
copy_file 'flashes.html.haml', 'app/views/application/_flashes.html.haml'
|
7
15
|
super
|
8
16
|
end
|
@@ -2,9 +2,17 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Foreman
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :foreman,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Configure Foreman with a Procfile and .env file'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:foreman]
|
6
14
|
gem 'foreman'
|
7
|
-
gem '
|
15
|
+
gem 'dotenv-rails'
|
8
16
|
copy_file 'Procfile', 'Procfile'
|
9
17
|
template 'env.erb', '.env'
|
10
18
|
super
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Generators
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :generators,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Set up default generators to disable helpers, assets, etc'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:generators]
|
6
14
|
copy_file 'generators.rb', 'config/initializers/generators.rb'
|
7
15
|
super
|
8
16
|
end
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Guard
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :guard,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include Guard for Rspec and Livereload'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:guard]
|
6
14
|
gem_group :development do
|
7
15
|
gem 'guard'
|
8
16
|
gem 'guard-rspec'
|
@@ -14,6 +22,7 @@ module Stationed
|
|
14
22
|
|
15
23
|
def run_bundle
|
16
24
|
super
|
25
|
+
return unless options[:guard]
|
17
26
|
run 'bundle exec guard init rspec'
|
18
27
|
run 'bundle exec guard init livereload'
|
19
28
|
gsub_file 'Guardfile',
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Haml
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :haml,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include Haml as template engine'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:haml]
|
6
14
|
gem 'haml-rails'
|
7
15
|
super
|
8
16
|
end
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module I18nSpec
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :i18n_spec,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Set up tests for locale files'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:i18n_spec]
|
6
14
|
gem 'i18n-spec', group: :test
|
7
15
|
copy_file 'i18n_spec.rb', 'spec/locales/i18n_spec.rb'
|
8
16
|
super
|
@@ -2,13 +2,22 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Kaminari
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :kaminari,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include Kaminari with config and views for pagination'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:kaminari]
|
6
14
|
gem 'kaminari'
|
7
15
|
super
|
8
16
|
end
|
9
17
|
|
10
18
|
def run_bundle
|
11
19
|
super
|
20
|
+
return unless options[:kaminari]
|
12
21
|
generate 'kaminari:config'
|
13
22
|
generate 'kaminari:views default'
|
14
23
|
end
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Layout
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :layout,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Add a generic Haml application layout file'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:layout]
|
6
14
|
remove_file 'app/views/layouts/application.html.haml'
|
7
15
|
copy_file 'application.html.haml', 'app/views/layouts/application.html.haml'
|
8
16
|
super
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Pry
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :pry,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include Pry debugging gems'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:pry]
|
6
14
|
gem_group :development, :test do
|
7
15
|
gem 'pry-rails'
|
8
16
|
gem 'pry-byebug'
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Pundit
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :pundit,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include and configure Pundit for authorization'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:pundit]
|
6
14
|
gem 'pundit'
|
7
15
|
copy_file 'pundit.rb', 'spec/support/pundit.rb'
|
8
16
|
copy_file 'authorization.rb', 'app/controllers/concerns/authorization.rb'
|
@@ -12,6 +20,7 @@ module Stationed
|
|
12
20
|
|
13
21
|
def run_bundle
|
14
22
|
super
|
23
|
+
return unless options[:pundit]
|
15
24
|
generate 'pundit:install'
|
16
25
|
end
|
17
26
|
end
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module RackDeflater
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :rack_deflator,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include rack-deflator in production mode'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:rack_deflator]
|
6
14
|
environment nil, env: :production do
|
7
15
|
<<-RUBY
|
8
16
|
# Enable deflate / gzip compression of controller-generated responses
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Responders
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :responders,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Add and configure Responders gem for DRY controllers'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:responders]
|
6
14
|
gem 'responders'
|
7
15
|
copy_file 'application_responder.rb', 'lib/application_responder.rb'
|
8
16
|
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Rspec
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :rspec,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Generate configuration for Rspec with Simplecov'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:rspec]
|
6
14
|
gem 'simplecov', group: :test
|
7
15
|
gem 'rspec-rails', group: [:development, :test]
|
8
16
|
copy_file 'simplecov', '.simplecov'
|
@@ -11,6 +19,7 @@ module Stationed
|
|
11
19
|
|
12
20
|
def run_bundle
|
13
21
|
super
|
22
|
+
return unless options[:rspec]
|
14
23
|
generate 'rspec:install'
|
15
24
|
remove_file 'spec/spec_helper.rb'
|
16
25
|
copy_file 'spec_helper.rb', 'spec/spec_helper.rb'
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Rubocop
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :rubocop,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include configuration and tasks to run Rubocop.'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:rubocop]
|
6
14
|
gem 'rubocop', group: :development
|
7
15
|
copy_file 'rubocop.rake', 'lib/tasks/rubocop.rake'
|
8
16
|
copy_file 'rubocop.yml', '.rubocop.yml'
|
@@ -2,13 +2,22 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module SimpleForm
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :simple_form,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include and configure simple_form as FormBuilder'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:simple_form]
|
6
14
|
gem 'simple_form'
|
7
15
|
super
|
8
16
|
end
|
9
17
|
|
10
18
|
def run_bundle
|
11
19
|
super
|
20
|
+
return unless options[:simple_form]
|
12
21
|
generate 'simple_form:install'
|
13
22
|
remove_file 'config/initializers/simple_form.rb'
|
14
23
|
copy_file 'simple_form.rb', 'config/initializers/simple_form.rb'
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module SimpleFormInputs
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :simple_form_inputs,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Install custom simple_form inputs'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:simple_form] && options[:simple_form_inputs]
|
6
14
|
copy_file 'static_input.rb', 'app/inputs/static_input.rb'
|
7
15
|
copy_file 'select2_input.rb', 'app/inputs/select2_input.rb'
|
8
16
|
super
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Spring
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :spring,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Add Rspec spring commands and configuration'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:spring]
|
6
14
|
gem 'spring-commands-rspec', group: :development
|
7
15
|
copy_file 'spring.rb', 'config/spring.rb'
|
8
16
|
super
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Stationed
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :stationed,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include stationed itself as an engine'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:stationed]
|
6
14
|
gem 'stationed', path: '~/code/stationed'
|
7
15
|
super
|
8
16
|
end
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module StrongParameters
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :strong_parameters,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Be strict about strong parameters in development'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
returns uper unless options[:strong_parameters]
|
6
14
|
environment nil, env: :development do
|
7
15
|
<<-RUBY
|
8
16
|
# Raise an ActionController::UnpermittedParameters exception when
|
@@ -2,18 +2,28 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Styles
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :styles,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include Bourbon, Neat, Bitters and Normalize.css'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:styles]
|
6
14
|
gem 'bourbon'
|
7
15
|
gem 'neat'
|
8
16
|
gem 'bitters'
|
9
17
|
remove_file 'app/assets/stylesheets/application.css'
|
10
18
|
copy_file 'application.scss', 'app/assets/stylesheets/application.scss'
|
11
19
|
copy_file 'layout.scss', 'app/assets/stylesheets/_layout.scss'
|
20
|
+
copy_file 'normalize.css', 'vendor/assets/stylesheets/normalize.css'
|
12
21
|
super
|
13
22
|
end
|
14
23
|
|
15
24
|
def run_bundle
|
16
25
|
super
|
26
|
+
return unless options[:styles]
|
17
27
|
run 'bitters install'
|
18
28
|
FileUtils.mv 'bitters', 'app/assets/stylesheets/bitters'
|
19
29
|
gsub_file 'app/assets/stylesheets/bitters/_bitters.scss', %r{// @import}, '@import'
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Turbolinks
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :turbolinks,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Remove turbolinks from the generated project'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:turbolinks]
|
6
14
|
gsub_file 'Gemfile', /^gem 'turbolinks'.*\n/, ''
|
7
15
|
gsub_file 'app/assets/javascripts/application.js', %r{//= require turbolinks\n}, ''
|
8
16
|
super
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Webmock
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :webmock,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Install webmock to prevent external HTTP requests in tests'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:webmock]
|
6
14
|
gem 'webmock', group: :test
|
7
15
|
copy_file 'webmock.rb', 'spec/support/webmock.rb'
|
8
16
|
super
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Wiki
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :wiki,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include a Gollum-based stub Wiki in ./doc/wiki'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:wiki]
|
6
14
|
gem 'gollum', require: 'gollum/app', group: [:development]
|
7
15
|
route "mount Precious::App => '/wiki' if defined?(Precious)"
|
8
16
|
copy_file 'Home.md', 'doc/wiki/Home.md'
|
@@ -2,7 +2,15 @@ module Stationed
|
|
2
2
|
module Generators
|
3
3
|
module Plugins
|
4
4
|
module Yard
|
5
|
+
def self.prepended(base)
|
6
|
+
base.class_option :yard,
|
7
|
+
type: :boolean,
|
8
|
+
default: true,
|
9
|
+
desc: 'Include and configure Yard for API documentation'
|
10
|
+
end
|
11
|
+
|
5
12
|
def finish_template
|
13
|
+
return super unless options[:yard]
|
6
14
|
gem 'yard', require: false, group: :doc
|
7
15
|
gem 'kramdown', require: false, group: :doc
|
8
16
|
copy_file 'yardopts', '.yardopts'
|
data/lib/stationed/version.rb
CHANGED
data/spec/dummy/log/test.log
CHANGED
@@ -1416,3 +1416,59 @@
|
|
1416
1416
|
[1m[35m (0.0ms)[0m rollback transaction
|
1417
1417
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1418
1418
|
[1m[35m (0.1ms)[0m rollback transaction
|
1419
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
1420
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1421
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1422
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1423
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1424
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1425
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1426
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1427
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1428
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1429
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1430
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1431
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1432
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1433
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1434
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1435
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1436
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1437
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1438
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1439
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1440
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1441
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1442
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1443
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1444
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1445
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1446
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1447
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
1448
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1449
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1450
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1451
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1452
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1453
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1454
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
1455
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1456
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1457
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1458
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1459
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1460
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1461
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1462
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1463
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1464
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1465
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
1466
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1467
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1468
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1469
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1470
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1471
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1472
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
1473
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
1474
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: stationed
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 0.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arjan van der Gaag
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -91,7 +91,6 @@ files:
|
|
91
91
|
- lib/stationed/generators/plugins/i18n_spec.rb
|
92
92
|
- lib/stationed/generators/plugins/kaminari.rb
|
93
93
|
- lib/stationed/generators/plugins/layout.rb
|
94
|
-
- lib/stationed/generators/plugins/normalize.rb
|
95
94
|
- lib/stationed/generators/plugins/pry.rb
|
96
95
|
- lib/stationed/generators/plugins/pundit.rb
|
97
96
|
- lib/stationed/generators/plugins/rack_deflater.rb
|