generapp 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/README.md +0 -2
- data/lib/generapp/actions/configuration.rb +16 -25
- data/lib/generapp/actions/develop.rb +31 -45
- data/lib/generapp/app_builder.rb +2 -1
- data/lib/generapp/generators/app_generator.rb +3 -3
- data/lib/generapp/version.rb +2 -2
- data/templates/Gemfile.erb +7 -6
- data/templates/config/postgresql_database.yml.erb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: '01877679c8c617fff4b625604e0d79675646521e'
|
4
|
+
data.tar.gz: 717552062545ba3a03f1528ecdac56fdfb27a742
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f14eec1fe10724b82b887ac57c57c2f24e3d0777e47df88d1706976f78546a1283c3be5b67d338799abee90817fb2e55e710bcd5d8f245aac622d9b9acdfcda
|
7
|
+
data.tar.gz: d2f3024084abb0fc0b4c86d2f6a3622bb37e1622ac49550f5d3fd92ab67a390e5286b394f5ca295d43320cd3ebbb333308562ed657ba0a205c161216eb0d27b4
|
data/.rubocop_todo.yml
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on 2016-
|
3
|
+
# on 2016-10-20 11:42:13 -0500 using RuboCop version 0.44.1.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
@@ -11,13 +11,13 @@
|
|
11
11
|
Metrics/ClassLength:
|
12
12
|
Max: 114
|
13
13
|
|
14
|
-
# Offense count:
|
15
|
-
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
|
14
|
+
# Offense count: 5
|
15
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives.
|
16
16
|
# URISchemes: http, https
|
17
17
|
Metrics/LineLength:
|
18
18
|
Max: 92
|
19
19
|
|
20
|
-
# Offense count:
|
20
|
+
# Offense count: 1
|
21
21
|
# Configuration parameters: CountComments.
|
22
22
|
Metrics/MethodLength:
|
23
23
|
Max: 13
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.4.0
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -50,8 +50,6 @@ Development gems:
|
|
50
50
|
* [lol_dba](https://github.com/plentz/lol_dba) for scanning missing indexes
|
51
51
|
* [Pry Rails](https://github.com/rweng/pry-rails) for interactively exploring
|
52
52
|
objects
|
53
|
-
* [Quiet Assets](https://github.com/evrone/quiet_assets) for muting assets
|
54
|
-
pipeline log messages
|
55
53
|
* [rails-erd](https://github.com/voormedia/rails-erd) for generating Entity-Relationship Diagrams
|
56
54
|
* [Spring](https://github.com/rails/spring) for fast Rails actions via
|
57
55
|
pre-loading
|
@@ -3,16 +3,27 @@ module Generapp
|
|
3
3
|
module Actions #:nodoc
|
4
4
|
# App configuration associated actions
|
5
5
|
module Configuration
|
6
|
+
DEFAULT_TASK = <<~RUBY
|
7
|
+
task(:default).clear
|
8
|
+
task default: [:spec]
|
9
|
+
|
10
|
+
if defined? RSpec
|
11
|
+
task(:spec).clear
|
12
|
+
RSpec::Core::RakeTask.new(:spec) do |t|
|
13
|
+
t.verbose = false
|
14
|
+
end
|
15
|
+
end
|
16
|
+
task default: 'bundler:audit'
|
17
|
+
RUBY
|
18
|
+
|
19
|
+
private_constant :DEFAULT_TASK
|
20
|
+
|
6
21
|
def setup_default_rake_task
|
7
22
|
append_file 'Rakefile' do
|
8
|
-
|
23
|
+
DEFAULT_TASK
|
9
24
|
end
|
10
25
|
end
|
11
26
|
|
12
|
-
def configure_puma
|
13
|
-
copy_file 'config/puma.rb', 'config/puma.rb'
|
14
|
-
end
|
15
|
-
|
16
27
|
def set_up_version
|
17
28
|
template 'config/version.rb.erb', 'config/initializers/version.rb'
|
18
29
|
end
|
@@ -20,26 +31,6 @@ module Generapp
|
|
20
31
|
def set_up_procfile
|
21
32
|
copy_file 'Procfile', 'Procfile'
|
22
33
|
end
|
23
|
-
|
24
|
-
def generate_devise
|
25
|
-
generate 'devise:install'
|
26
|
-
end
|
27
|
-
|
28
|
-
protected
|
29
|
-
|
30
|
-
def rspec_task
|
31
|
-
<<-RUBY
|
32
|
-
task(:default).clear
|
33
|
-
task default: [:spec]
|
34
|
-
|
35
|
-
if defined? RSpec
|
36
|
-
task(:spec).clear
|
37
|
-
RSpec::Core::RakeTask.new(:spec) do |t|
|
38
|
-
t.verbose = false
|
39
|
-
end
|
40
|
-
end
|
41
|
-
RUBY
|
42
|
-
end
|
43
34
|
end
|
44
35
|
end
|
45
36
|
end
|
@@ -4,6 +4,33 @@ module Generapp
|
|
4
4
|
# App develop environment
|
5
5
|
# associated actions
|
6
6
|
module Develop
|
7
|
+
GENERAPP_GENERATORS = <<-RUBY
|
8
|
+
config.generators do |g|
|
9
|
+
g.assets false
|
10
|
+
g.test_framework :rspec,
|
11
|
+
fixtures: true,
|
12
|
+
view_specs: false,
|
13
|
+
helper_specs: false,
|
14
|
+
routing_specs: false,
|
15
|
+
controller_specs: true,
|
16
|
+
request_specs: false
|
17
|
+
g.fixture_replacement :factory_girl, dir: 'spec/factories'
|
18
|
+
end
|
19
|
+
RUBY
|
20
|
+
|
21
|
+
BULLET_CONFIGURATION = <<-RUBY
|
22
|
+
|
23
|
+
# Bullet configuration
|
24
|
+
config.after_initialize do
|
25
|
+
Bullet.enable = true
|
26
|
+
Bullet.bullet_logger = true
|
27
|
+
Bullet.rails_logger = true
|
28
|
+
end
|
29
|
+
RUBY
|
30
|
+
|
31
|
+
private_constant :GENERAPP_GENERATORS
|
32
|
+
private_constant :BULLET_CONFIGURATION
|
33
|
+
|
7
34
|
def raise_on_delivery_errors
|
8
35
|
gsub_file 'config/environments/development.rb',
|
9
36
|
'raise_delivery_errors = false',
|
@@ -11,27 +38,16 @@ module Generapp
|
|
11
38
|
end
|
12
39
|
|
13
40
|
def add_bullet_gem_configuration
|
41
|
+
last_line = "config.file_watcher = ActiveSupport::EventedFileUpdateChecker\n"
|
14
42
|
inject_into_file 'config/environments/development.rb',
|
15
|
-
|
16
|
-
after:
|
17
|
-
end
|
18
|
-
|
19
|
-
def configure_dalli
|
20
|
-
config = <<-RUBY
|
21
|
-
|
22
|
-
config.cache_store = :dalli_store, '127.0.0.1'
|
23
|
-
|
24
|
-
RUBY
|
25
|
-
|
26
|
-
inject_into_file 'config/environments/development.rb',
|
27
|
-
config,
|
28
|
-
after: "config.action_mailer.raise_delivery_errors = true\n"
|
43
|
+
BULLET_CONFIGURATION,
|
44
|
+
after: last_line
|
29
45
|
end
|
30
46
|
|
31
47
|
def configure_generators
|
32
48
|
inject_into_class 'config/application.rb',
|
33
49
|
'Application',
|
34
|
-
|
50
|
+
GENERAPP_GENERATORS
|
35
51
|
end
|
36
52
|
|
37
53
|
def generate_annotate
|
@@ -53,36 +69,6 @@ module Generapp
|
|
53
69
|
create_file '.rubocop_todo.yml'
|
54
70
|
copy_file 'rubocop.yml', '.rubocop.yml'
|
55
71
|
end
|
56
|
-
|
57
|
-
protected
|
58
|
-
|
59
|
-
def generapp_generators
|
60
|
-
<<-RUBY
|
61
|
-
|
62
|
-
config.generators do |g|
|
63
|
-
g.assets false
|
64
|
-
g.test_framework :rspec,
|
65
|
-
fixtures: true,
|
66
|
-
view_specs: false,
|
67
|
-
helper_specs: false,
|
68
|
-
routing_specs: false,
|
69
|
-
controller_specs: true,
|
70
|
-
request_specs: false
|
71
|
-
g.fixture_replacement :factory_girl, dir: 'spec/factories'
|
72
|
-
end
|
73
|
-
|
74
|
-
RUBY
|
75
|
-
end
|
76
|
-
|
77
|
-
def bullet_configuration
|
78
|
-
<<-RUBY
|
79
|
-
config.after_initialize do
|
80
|
-
Bullet.enable = true
|
81
|
-
Bullet.bullet_logger = true
|
82
|
-
Bullet.rails_logger = true
|
83
|
-
end
|
84
|
-
RUBY
|
85
|
-
end
|
86
72
|
end
|
87
73
|
end
|
88
74
|
end
|
data/lib/generapp/app_builder.rb
CHANGED
@@ -46,7 +46,7 @@ module Generapp
|
|
46
46
|
invoke :setup_git
|
47
47
|
invoke :setup_bundler_audit
|
48
48
|
invoke :setup_rubocop
|
49
|
-
invoke :
|
49
|
+
invoke :generate_spring_binstubs
|
50
50
|
invoke :outro
|
51
51
|
end
|
52
52
|
|
@@ -119,9 +119,9 @@ module Generapp
|
|
119
119
|
build :setup_rubocop
|
120
120
|
end
|
121
121
|
|
122
|
-
def
|
122
|
+
def generate_spring_binstubs
|
123
123
|
say 'Springifying executables'
|
124
|
-
build :
|
124
|
+
build :generate_spring_binstubs
|
125
125
|
end
|
126
126
|
|
127
127
|
def init_git
|
data/lib/generapp/version.rb
CHANGED
@@ -5,9 +5,9 @@
|
|
5
5
|
# with some of Koombea's standards and practices
|
6
6
|
module Generapp
|
7
7
|
# Default Rails Version
|
8
|
-
RAILS_VERSION = '~>
|
8
|
+
RAILS_VERSION = '~> 5.0.1'
|
9
9
|
# Default Ruby Version
|
10
10
|
RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
|
11
11
|
# Gem Version
|
12
|
-
VERSION = '0.
|
12
|
+
VERSION = '0.4.0'
|
13
13
|
end
|
data/templates/Gemfile.erb
CHANGED
@@ -2,15 +2,15 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
ruby '<%= Generapp::RUBY_VERSION %>'
|
4
4
|
|
5
|
-
gem 'devise' # User authentication
|
6
|
-
gem 'dalli' # Caching
|
7
5
|
gem 'honeybadger', '~> 2.0' # Error reporting
|
8
|
-
gem 'jquery-rails'
|
6
|
+
gem 'jquery-rails'
|
9
7
|
gem 'newrelic_rpm' # Performance reports
|
10
8
|
gem 'pg' # Postgres
|
11
9
|
gem 'puma' # Use Puma as the app server
|
12
10
|
gem 'rails', '<%= Generapp::RAILS_VERSION %>'
|
11
|
+
gem 'redis-rails'
|
13
12
|
gem 'sass-rails', '~>5.0'
|
13
|
+
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
|
14
14
|
gem 'uglifier'
|
15
15
|
|
16
16
|
group :development do
|
@@ -19,17 +19,18 @@ group :development do
|
|
19
19
|
gem 'binding_of_caller'
|
20
20
|
gem 'bullet' # N+1 queries reporter
|
21
21
|
gem 'lol_dba' # Missing index reporter
|
22
|
-
gem '
|
22
|
+
gem 'listen', '~> 3.0.5'
|
23
23
|
gem 'rails-erd' # ER Diagrams
|
24
24
|
gem 'rubocop', require: false
|
25
25
|
gem 'spring'
|
26
|
+
gem 'spring-watcher-listen', '~> 2.0.0'
|
27
|
+
gem 'yard', require: false
|
26
28
|
end
|
27
29
|
|
28
30
|
group :development, :test do
|
29
31
|
gem 'brakeman', require: false
|
30
32
|
gem 'bundler-audit', require: false
|
31
33
|
gem 'factory_girl_rails'
|
32
|
-
gem 'figaro' # Secrets
|
33
34
|
gem 'pry-rails'
|
34
35
|
gem 'pry-remote'
|
35
36
|
gem 'rspec-rails'
|
@@ -38,6 +39,7 @@ end
|
|
38
39
|
group :test do
|
39
40
|
gem 'database_cleaner'
|
40
41
|
gem 'faker'
|
42
|
+
gem 'rails-controller-testing'
|
41
43
|
gem 'rspec_junit_formatter', '~> 0.2.2'
|
42
44
|
gem 'shoulda-matchers'
|
43
45
|
gem 'simplecov', require: false
|
@@ -46,5 +48,4 @@ end
|
|
46
48
|
|
47
49
|
group :production do
|
48
50
|
gem 'rack-timeout'
|
49
|
-
gem 'rails_12factor'
|
50
51
|
end
|
@@ -12,7 +12,7 @@ test:
|
|
12
12
|
min_messages: warning #magic sauce
|
13
13
|
database: <%= app_name %>_test
|
14
14
|
|
15
|
-
production:
|
15
|
+
production:
|
16
16
|
url: <%%= ENV['DATABASE_URL'] %>
|
17
17
|
pool: <%%= ENV['DB_POOL'] || ENV['MAX_THREADS'] || 3 %>
|
18
18
|
reaping_frequency: <%%= ENV['REAPING_FREQUENCY'] || nil %>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: generapp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gustavo Bazan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-03-30 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:
|
33
|
+
version: 5.0.1
|
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:
|
40
|
+
version: 5.0.1
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -196,7 +196,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
196
196
|
requirements:
|
197
197
|
- - ">="
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
version: 2.
|
199
|
+
version: 2.4.0
|
200
200
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
201
201
|
requirements:
|
202
202
|
- - ">="
|
@@ -204,7 +204,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
204
|
version: '0'
|
205
205
|
requirements: []
|
206
206
|
rubyforge_project:
|
207
|
-
rubygems_version: 2.6.
|
207
|
+
rubygems_version: 2.6.8
|
208
208
|
signing_key:
|
209
209
|
specification_version: 4
|
210
210
|
summary: Koombea Rails app generator
|