onotole 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (81) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +6 -0
  3. data/.rubocop.yml +44 -0
  4. data/.ruby-version +1 -0
  5. data/.travis.yml +11 -0
  6. data/Gemfile +3 -0
  7. data/Guardfile +60 -0
  8. data/LICENSE +19 -0
  9. data/README.md +288 -0
  10. data/Rakefile +8 -0
  11. data/bin/onotole +35 -0
  12. data/bin/rake +16 -0
  13. data/bin/rspec +16 -0
  14. data/bin/setup +13 -0
  15. data/lib/onotole.rb +6 -0
  16. data/lib/onotole/actions.rb +33 -0
  17. data/lib/onotole/adapters/heroku.rb +125 -0
  18. data/lib/onotole/add_user_gems/after_install_patch.rb +119 -0
  19. data/lib/onotole/add_user_gems/before_bundle_patch.rb +137 -0
  20. data/lib/onotole/add_user_gems/edit_menu_questions.rb +80 -0
  21. data/lib/onotole/add_user_gems/user_gems_menu_questions.rb +17 -0
  22. data/lib/onotole/app_builder.rb +678 -0
  23. data/lib/onotole/colors.rb +20 -0
  24. data/lib/onotole/generators/app_generator.rb +299 -0
  25. data/lib/onotole/version.rb +6 -0
  26. data/onotole.gemspec +33 -0
  27. data/spec/adapters/heroku_spec.rb +52 -0
  28. data/spec/fakes/bin/heroku +5 -0
  29. data/spec/fakes/bin/hub +5 -0
  30. data/spec/features/github_spec.rb +15 -0
  31. data/spec/features/heroku_spec.rb +93 -0
  32. data/spec/features/new_project_spec.rb +204 -0
  33. data/spec/spec_helper.rb +20 -0
  34. data/spec/support/fake_github.rb +21 -0
  35. data/spec/support/fake_heroku.rb +51 -0
  36. data/spec/support/onotole.rb +59 -0
  37. data/templates/Gemfile.erb +61 -0
  38. data/templates/Procfile +2 -0
  39. data/templates/README.md.erb +30 -0
  40. data/templates/_analytics.html.erb +7 -0
  41. data/templates/_flashes.html.erb +7 -0
  42. data/templates/_javascript.html.erb +12 -0
  43. data/templates/action_mailer.rb +5 -0
  44. data/templates/app.json.erb +39 -0
  45. data/templates/application.scss +1 -0
  46. data/templates/bin_deploy +12 -0
  47. data/templates/bin_setup +21 -0
  48. data/templates/bin_setup_review_app.erb +19 -0
  49. data/templates/browserslist +4 -0
  50. data/templates/bundler_audit.rake +12 -0
  51. data/templates/capybara_webkit.rb +3 -0
  52. data/templates/circle.yml.erb +6 -0
  53. data/templates/config_locales_en.yml.erb +19 -0
  54. data/templates/database_cleaner_rspec.rb +22 -0
  55. data/templates/dev.rake +12 -0
  56. data/templates/devise_rspec.rb +3 -0
  57. data/templates/disable_xml_params.rb +1 -0
  58. data/templates/dotfiles/.ctags +2 -0
  59. data/templates/dotfiles/.env +13 -0
  60. data/templates/dotfiles/.rspec +3 -0
  61. data/templates/errors.rb +34 -0
  62. data/templates/factories.rb +2 -0
  63. data/templates/factory_girl_rspec.rb +3 -0
  64. data/templates/flashes_helper.rb +5 -0
  65. data/templates/gitignore_file +18 -0
  66. data/templates/hound.yml +17 -0
  67. data/templates/i18n.rb +3 -0
  68. data/templates/json_encoding.rb +1 -0
  69. data/templates/newrelic.yml.erb +34 -0
  70. data/templates/onotole_layout.html.erb.erb +21 -0
  71. data/templates/postgresql_database.yml.erb +22 -0
  72. data/templates/puma.rb +28 -0
  73. data/templates/rails_helper.rb +22 -0
  74. data/templates/rubocop.yml +44 -0
  75. data/templates/secrets.yml +14 -0
  76. data/templates/shoulda_matchers_config_rspec.rb +6 -0
  77. data/templates/smtp.rb +9 -0
  78. data/templates/spec_helper.rb +23 -0
  79. data/templates/staging.rb +5 -0
  80. data/templates/tinymce.yml +6 -0
  81. metadata +172 -0
@@ -0,0 +1,22 @@
1
+ ENV['RAILS_ENV'] = 'test'
2
+
3
+ require File.expand_path('../../config/environment', __FILE__)
4
+ abort('DATABASE_URL environment variable is set') if ENV['DATABASE_URL']
5
+
6
+ require 'rspec/rails'
7
+
8
+ Dir[Rails.root.join('spec/support/**/*.rb')].sort.each { |file| require file }
9
+
10
+ module Features
11
+ # Extend this module in spec/support/features/*.rb
12
+ include Formulaic::Dsl
13
+ end
14
+
15
+ RSpec.configure do |config|
16
+ config.include Features, type: :feature
17
+ config.infer_base_class_for_anonymous_controllers = false
18
+ config.infer_spec_type_from_file_location!
19
+ config.use_transactional_fixtures = false
20
+ end
21
+
22
+ ActiveRecord::Migration.maintain_test_schema!
@@ -0,0 +1,44 @@
1
+ Style/AlignHash:
2
+ EnforcedHashRocketStyle: table
3
+ EnforcedColonStyle: table
4
+ AutoCorrect: true
5
+ Style/IndentationConsistency:
6
+ EnforcedStyle: rails
7
+ Style/StringLiterals:
8
+ ConsistentQuotesInMultiline: true
9
+ Metrics/ClassLength:
10
+ CountComments: false
11
+ Max: 500
12
+ Metrics/ModuleLength:
13
+ CountComments: false
14
+ Max: 500
15
+ Lint/EndAlignment:
16
+ AutoCorrect: true
17
+ Lint/DefEndAlignment:
18
+ AutoCorrect: true
19
+ Rails:
20
+ Enabled: true
21
+ Style/AutoResourceCleanup:
22
+ Description: 'Suggests the usage of an auto resource cleanup version of a method (if available).'
23
+ Enabled: true
24
+ Metrics/MethodLength:
25
+ CountComments: false # count full line comments?
26
+ Max: 40
27
+ Style/StringLiterals:
28
+ EnforcedStyle: single_quotes
29
+ Style/StringLiteralsInInterpolation:
30
+ EnforcedStyle: single_quotes
31
+ NumericLiterals:
32
+ Enabled: false
33
+ Metrics/LineLength:
34
+ Max: 160
35
+ Documentation:
36
+ Enabled: false
37
+ Lint/Debugger: # Easy deletion of all debugger breakpoints. false for debug
38
+ Enabled: true
39
+ AllCops:
40
+ Exclude:
41
+ - 'bin/**/*'
42
+ TargetRubyVersion: 2.3
43
+ Metrics/AbcSize:
44
+ Max: 25
@@ -0,0 +1,14 @@
1
+ default: &default
2
+ secret_key_base: <%%= ENV["SECRET_KEY_BASE"] %>
3
+
4
+ development:
5
+ <<: *default
6
+
7
+ test:
8
+ <<: *default
9
+
10
+ staging:
11
+ <<: *default
12
+
13
+ production:
14
+ <<: *default
@@ -0,0 +1,6 @@
1
+ Shoulda::Matchers.configure do |config|
2
+ config.integrate do |with|
3
+ with.test_framework :rspec
4
+ with.library :rails
5
+ end
6
+ end
@@ -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: "heroku.com"
5
+ enable_starttls_auto: true,
6
+ password: ENV.fetch('SMTP_PASSWORD'),
7
+ port: '587',
8
+ user_name: ENV.fetch('SMTP_USERNAME')
9
+ }.freeze
@@ -0,0 +1,23 @@
1
+ if ENV.fetch('COVERAGE', false)
2
+ require 'simplecov'
3
+ SimpleCov.start 'rails'
4
+ end
5
+
6
+ require 'webmock/rspec'
7
+
8
+ # http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
9
+ RSpec.configure do |config|
10
+ config.expect_with :rspec do |expectations|
11
+ expectations.syntax = :expect
12
+ end
13
+
14
+ config.mock_with :rspec do |mocks|
15
+ mocks.syntax = :expect
16
+ mocks.verify_partial_doubles = true
17
+ end
18
+
19
+ config.example_status_persistence_file_path = 'tmp/rspec_examples.txt'
20
+ config.order = :random
21
+ end
22
+
23
+ WebMock.disable_net_connect!(allow_localhost: true)
@@ -0,0 +1,5 @@
1
+ require_relative 'production'
2
+
3
+ Mail.register_interceptor(
4
+ RecipientInterceptor.new(ENV.fetch('EMAIL_RECIPIENTS'))
5
+ )
@@ -0,0 +1,6 @@
1
+ toolbar:
2
+ - styleselect | bold italic | undo redo
3
+ - image | link
4
+ plugins:
5
+ - image
6
+ - link
metadata ADDED
@@ -0,0 +1,172 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: onotole
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - kvokka
8
+ - thoughtbot
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2016-02-06 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: bundler
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: '1.3'
21
+ type: :runtime
22
+ prerelease: false
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: '1.3'
28
+ - !ruby/object:Gem::Dependency
29
+ name: rails
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - "~>"
33
+ - !ruby/object:Gem::Version
34
+ version: 4.2.0
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - "~>"
40
+ - !ruby/object:Gem::Version
41
+ version: 4.2.0
42
+ - !ruby/object:Gem::Dependency
43
+ name: rspec
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '3.2'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - "~>"
54
+ - !ruby/object:Gem::Version
55
+ version: '3.2'
56
+ description: |
57
+ Onotole is a base Rails project that you can upgrade. Use Onotole if you're in a
58
+ rush to build something amazing, Onotole knows what to do and gives Intellect +1!
59
+ email: root_p@mail.ru
60
+ executables:
61
+ - onotole
62
+ extensions: []
63
+ extra_rdoc_files:
64
+ - README.md
65
+ - LICENSE
66
+ files:
67
+ - ".gitignore"
68
+ - ".rubocop.yml"
69
+ - ".ruby-version"
70
+ - ".travis.yml"
71
+ - Gemfile
72
+ - Guardfile
73
+ - LICENSE
74
+ - README.md
75
+ - Rakefile
76
+ - bin/onotole
77
+ - bin/rake
78
+ - bin/rspec
79
+ - bin/setup
80
+ - lib/onotole.rb
81
+ - lib/onotole/actions.rb
82
+ - lib/onotole/adapters/heroku.rb
83
+ - lib/onotole/add_user_gems/after_install_patch.rb
84
+ - lib/onotole/add_user_gems/before_bundle_patch.rb
85
+ - lib/onotole/add_user_gems/edit_menu_questions.rb
86
+ - lib/onotole/add_user_gems/user_gems_menu_questions.rb
87
+ - lib/onotole/app_builder.rb
88
+ - lib/onotole/colors.rb
89
+ - lib/onotole/generators/app_generator.rb
90
+ - lib/onotole/version.rb
91
+ - onotole.gemspec
92
+ - spec/adapters/heroku_spec.rb
93
+ - spec/fakes/bin/heroku
94
+ - spec/fakes/bin/hub
95
+ - spec/features/github_spec.rb
96
+ - spec/features/heroku_spec.rb
97
+ - spec/features/new_project_spec.rb
98
+ - spec/spec_helper.rb
99
+ - spec/support/fake_github.rb
100
+ - spec/support/fake_heroku.rb
101
+ - spec/support/onotole.rb
102
+ - templates/Gemfile.erb
103
+ - templates/Procfile
104
+ - templates/README.md.erb
105
+ - templates/_analytics.html.erb
106
+ - templates/_flashes.html.erb
107
+ - templates/_javascript.html.erb
108
+ - templates/action_mailer.rb
109
+ - templates/app.json.erb
110
+ - templates/application.scss
111
+ - templates/bin_deploy
112
+ - templates/bin_setup
113
+ - templates/bin_setup_review_app.erb
114
+ - templates/browserslist
115
+ - templates/bundler_audit.rake
116
+ - templates/capybara_webkit.rb
117
+ - templates/circle.yml.erb
118
+ - templates/config_locales_en.yml.erb
119
+ - templates/database_cleaner_rspec.rb
120
+ - templates/dev.rake
121
+ - templates/devise_rspec.rb
122
+ - templates/disable_xml_params.rb
123
+ - templates/dotfiles/.ctags
124
+ - templates/dotfiles/.env
125
+ - templates/dotfiles/.rspec
126
+ - templates/errors.rb
127
+ - templates/factories.rb
128
+ - templates/factory_girl_rspec.rb
129
+ - templates/flashes_helper.rb
130
+ - templates/gitignore_file
131
+ - templates/hound.yml
132
+ - templates/i18n.rb
133
+ - templates/json_encoding.rb
134
+ - templates/newrelic.yml.erb
135
+ - templates/onotole_layout.html.erb.erb
136
+ - templates/postgresql_database.yml.erb
137
+ - templates/puma.rb
138
+ - templates/rails_helper.rb
139
+ - templates/rubocop.yml
140
+ - templates/secrets.yml
141
+ - templates/shoulda_matchers_config_rspec.rb
142
+ - templates/smtp.rb
143
+ - templates/spec_helper.rb
144
+ - templates/staging.rb
145
+ - templates/tinymce.yml
146
+ homepage: http://github.com/kvokka/onotole
147
+ licenses:
148
+ - MIT
149
+ metadata: {}
150
+ post_install_message:
151
+ rdoc_options:
152
+ - "--charset=UTF-8"
153
+ require_paths:
154
+ - lib
155
+ required_ruby_version: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: 2.3.0
160
+ required_rubygems_version: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ">="
163
+ - !ruby/object:Gem::Version
164
+ version: '0'
165
+ requirements: []
166
+ rubyforge_project:
167
+ rubygems_version: 2.5.1
168
+ signing_key:
169
+ specification_version: 4
170
+ summary: Generate a Rails app using Onotole knowledge with kvokka fingers.
171
+ test_files: []
172
+ has_rdoc: