generapp 0.3.2 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 44bf2ca700ef0262a92a223d864a388386e1a396
4
- data.tar.gz: 9c1c05a14abb5f1ee74b546c24229df15070f162
3
+ metadata.gz: '01877679c8c617fff4b625604e0d79675646521e'
4
+ data.tar.gz: 717552062545ba3a03f1528ecdac56fdfb27a742
5
5
  SHA512:
6
- metadata.gz: 73e7a430a15b259814bf0989c847c42c10a436875116ca90073c7ec24fa514dfb5be06de68ff721df82b12d33bc1feb54d60ae45d684e1faa39bd3528b65ba38
7
- data.tar.gz: cf0b169b57babd78b32b19701a301d680192a84f3cbac7f1250727f511aba7be1963b12cdf87d3d24eb13b5aee2ef79555e082c3c0c09193ae33e36f58704692
6
+ metadata.gz: 2f14eec1fe10724b82b887ac57c57c2f24e3d0777e47df88d1706976f78546a1283c3be5b67d338799abee90817fb2e55e710bcd5d8f245aac622d9b9acdfcda
7
+ data.tar.gz: d2f3024084abb0fc0b4c86d2f6a3622bb37e1622ac49550f5d3fd92ab67a390e5286b394f5ca295d43320cd3ebbb333308562ed657ba0a205c161216eb0d27b4
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2016-05-11 16:12:08 -0500 using RuboCop version 0.40.0.
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: 6
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: 2
20
+ # Offense count: 1
21
21
  # Configuration parameters: CountComments.
22
22
  Metrics/MethodLength:
23
23
  Max: 13
@@ -1 +1 @@
1
- 2.3.1
1
+ 2.4.0
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.1
3
+ - 2.4.0
4
4
  - ruby-head
5
5
 
6
6
  sudo: false
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
- rspec_task
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
- bullet_configuration,
16
- after: "config.action_mailer.raise_delivery_errors = true\n"
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
- generapp_generators
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
@@ -51,7 +51,8 @@ module Generapp
51
51
  append_file 'Rakefile', "\ntask default: 'rubocop'\n"
52
52
  end
53
53
 
54
- def setup_spring
54
+ def generate_spring_binstubs
55
+ return unless spring_install?
55
56
  bundle_command 'exec spring binstub --all'
56
57
  end
57
58
  end
@@ -46,7 +46,7 @@ module Generapp
46
46
  invoke :setup_git
47
47
  invoke :setup_bundler_audit
48
48
  invoke :setup_rubocop
49
- invoke :setup_spring
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 setup_spring
122
+ def generate_spring_binstubs
123
123
  say 'Springifying executables'
124
- build :setup_spring
124
+ build :generate_spring_binstubs
125
125
  end
126
126
 
127
127
  def init_git
@@ -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 = '~> 4.2.0'
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.3.2'
12
+ VERSION = '0.4.0'
13
13
  end
@@ -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' # jQuery
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 'quiet_assets'
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: &defaults
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.3.2
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: 2016-05-11 00:00:00.000000000 Z
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: 4.2.0
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: 4.2.0
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.3.1
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.4
207
+ rubygems_version: 2.6.8
208
208
  signing_key:
209
209
  specification_version: 4
210
210
  summary: Koombea Rails app generator