potassium 2.1.0 → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/README.md +0 -5
- data/lib/potassium/assets/config/database_mysql.yml.erb +0 -2
- data/lib/potassium/assets/config/database_postgresql.yml.erb +1 -3
- data/lib/potassium/assets/config/puma.rb +1 -1
- data/lib/potassium/assets/config/secrets.yml.erb +0 -3
- data/lib/potassium/assets/docker-compose.ci.yml +1 -1
- data/lib/potassium/assets/lib/tasks/auto_annotate_models.rake +44 -0
- data/lib/potassium/assets/testing/rails_helper.rb +8 -1
- data/lib/potassium/recipes/annotate.rb +10 -0
- data/lib/potassium/recipes/cleanup.rb +0 -1
- data/lib/potassium/recipes/heroku.rb +2 -2
- data/lib/potassium/recipes/puma.rb +1 -1
- data/lib/potassium/recipes/style.rb +3 -4
- data/lib/potassium/templates/application.rb +2 -2
- data/lib/potassium/version.rb +2 -2
- data/spec/features/heroku_spec.rb +0 -2
- data/spec/features/new_project_spec.rb +0 -18
- metadata +7 -14
- data/.hound.yml +0 -2
- data/.rubocop.yml +0 -3
- data/.ruby_style.yml +0 -6
- data/lib/potassium/assets/.hound.yml +0 -2
- data/lib/potassium/assets/.rubocop.yml +0 -3
- data/lib/potassium/assets/.ruby_style.yml +0 -0
- data/lib/potassium/assets/config/environments/staging.rb +0 -5
- data/lib/potassium/recipes/staging.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 61aa3d6c79b9fb3eabc4d1a6994ae6d48cdd858f
|
4
|
+
data.tar.gz: afc543181045764487eabbbbca082b4173e2ca11
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9b969ee9403a6366abbf0ccd7fec9def9db563571d7d4682c484805efb332bc1f3930211f703ebc81548e7fbe2d498f6b488aa2fca47d2d9cd5e0cc80076036
|
7
|
+
data.tar.gz: 018bc293d98cfd61589f9e2bb321d4d567e8c01843a51ed6be2856af6e4a86c8556ffcb88878a7ca82ba33792a73ae20c6b6341a011f8585ffd648c57cb2a87d
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.3
|
data/README.md
CHANGED
@@ -61,17 +61,12 @@ The following optional integrations are added too:
|
|
61
61
|
A few more things are added to the project:
|
62
62
|
|
63
63
|
- A [low database connection pool limit][pool]
|
64
|
-
- Setup [Rubocop][rubocop] configuration with Platanus [style guides][rubocop-platanus]
|
65
|
-
- Setup [Hound CI][platanus-hound] configuration, with Platanus flavour
|
66
64
|
- Setup continuous integration in [CircleCI](circle-ci) to run tests.
|
67
65
|
- Create the github repository for the project (it used `hub` under the hood)
|
68
66
|
- A `bin/setup` script to setup things on a newly cloned project
|
69
67
|
- A `bin/cibuild` script to run continuous integration build on CI
|
70
68
|
|
71
69
|
[pool]: https://devcenter.heroku.com/articles/concurrency-and-database-connections
|
72
|
-
[rubocop]: https://github.com/bbatsov/rubocop
|
73
|
-
[rubocop-platanus]: https://raw.githubusercontent.com/platanus/hound/platanus/config/style_guides/platanus/ruby.yml
|
74
|
-
[platanus-hound]: http://monkeyci.platan.us
|
75
70
|
|
76
71
|
### API support
|
77
72
|
|
@@ -15,11 +15,9 @@ test:
|
|
15
15
|
database: <%= get(:underscorized_app_name) %>_test
|
16
16
|
|
17
17
|
production: &deploy
|
18
|
-
adapter:
|
18
|
+
adapter: postgresql
|
19
19
|
encoding: utf8
|
20
20
|
min_messages: warning
|
21
21
|
pool: <%%= [Integer(ENV.fetch("MAX_THREADS", 5)), Integer(ENV.fetch("DB_POOL", 5))].max %>
|
22
22
|
timeout: 5000
|
23
23
|
url: <%%= ENV.fetch("DATABASE_URL", "") %>
|
24
|
-
|
25
|
-
staging: *deploy
|
@@ -0,0 +1,44 @@
|
|
1
|
+
if Rails.env.development?
|
2
|
+
task :set_annotation_options do
|
3
|
+
# You can override any of these by setting an environment variable of the
|
4
|
+
# same name.
|
5
|
+
Annotate.set_defaults(
|
6
|
+
'routes' => 'false',
|
7
|
+
'position_in_routes' => 'after',
|
8
|
+
'position_in_class' => 'after',
|
9
|
+
'position_in_test' => 'after',
|
10
|
+
'position_in_fixture' => 'after',
|
11
|
+
'position_in_factory' => 'after',
|
12
|
+
'position_in_serializer' => 'after',
|
13
|
+
'show_foreign_keys' => 'true',
|
14
|
+
'show_indexes' => 'true',
|
15
|
+
'simple_indexes' => 'false',
|
16
|
+
'model_dir' => 'app/models',
|
17
|
+
'root_dir' => '',
|
18
|
+
'include_version' => 'false',
|
19
|
+
'require' => '',
|
20
|
+
'exclude_tests' => 'true',
|
21
|
+
'exclude_fixtures' => 'true',
|
22
|
+
'exclude_factories' => 'true',
|
23
|
+
'exclude_serializers' => 'true',
|
24
|
+
'exclude_scaffolds' => 'true',
|
25
|
+
'exclude_controllers' => 'true',
|
26
|
+
'exclude_helpers' => 'false',
|
27
|
+
'ignore_model_sub_dir' => 'false',
|
28
|
+
'ignore_columns' => nil,
|
29
|
+
'ignore_unknown_models' => 'false',
|
30
|
+
'hide_limit_column_types' => 'integer,boolean',
|
31
|
+
'skip_on_db_migrate' => 'false',
|
32
|
+
'format_bare' => 'true',
|
33
|
+
'format_rdoc' => 'false',
|
34
|
+
'format_markdown' => 'false',
|
35
|
+
'sort' => 'false',
|
36
|
+
'force' => 'false',
|
37
|
+
'trace' => 'false',
|
38
|
+
'wrapper_open' => nil,
|
39
|
+
'wrapper_close' => nil
|
40
|
+
)
|
41
|
+
end
|
42
|
+
|
43
|
+
Annotate.load_tasks
|
44
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
2
|
-
ENV['
|
2
|
+
ENV['RACK_ENV'] ||= 'test'
|
3
3
|
require File.expand_path('../../config/environment', __FILE__)
|
4
4
|
require 'rspec/rails'
|
5
5
|
require 'spec_helper'
|
@@ -51,3 +51,10 @@ RSpec.configure do |config|
|
|
51
51
|
|
52
52
|
config.include FactoryGirl::Syntax::Methods
|
53
53
|
end
|
54
|
+
|
55
|
+
Shoulda::Matchers.configure do |config|
|
56
|
+
config.integrate do |with|
|
57
|
+
with.test_framework :rspec
|
58
|
+
with.library :rails
|
59
|
+
end
|
60
|
+
end
|
@@ -2,7 +2,6 @@ class Recipes::Cleanup < Rails::AppBuilder
|
|
2
2
|
def create
|
3
3
|
erase_comments "config/application.rb"
|
4
4
|
erase_comments "config/environments/production.rb"
|
5
|
-
erase_comments "config/environments/staging.rb"
|
6
5
|
erase_comments "config/environments/test.rb"
|
7
6
|
erase_comments "config/environments/development.rb"
|
8
7
|
cut_comments "config/initializers/backtrace_silencers.rb", limit: 100
|
@@ -34,7 +34,7 @@ class Recipes::Heroku < Rails::AppBuilder
|
|
34
34
|
private
|
35
35
|
|
36
36
|
def add_heroku
|
37
|
-
gather_gems(:production
|
37
|
+
gather_gems(:production) do
|
38
38
|
gather_gem('rails_stdout_logging')
|
39
39
|
end
|
40
40
|
|
@@ -80,7 +80,7 @@ class Recipes::Heroku < Rails::AppBuilder
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def create_app_on_heroku(environment)
|
83
|
-
rack_env = "RACK_ENV
|
83
|
+
rack_env = "RACK_ENV=production"
|
84
84
|
staged_app_name = app_name_for(environment)
|
85
85
|
|
86
86
|
run_toolbelt_command "create #{staged_app_name} --remote #{environment}"
|
@@ -1,9 +1,8 @@
|
|
1
1
|
class Recipes::Style < Rails::AppBuilder
|
2
2
|
def create
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
append_to_file '.gitignore', ".rubocop-http*\n"
|
3
|
+
append_to_file ".gitignore", ".rubocop.yml\n"
|
4
|
+
append_to_file ".gitignore", ".eslintrc.json\n"
|
5
|
+
append_to_file ".gitignore", ".sscs-lint.yml\n"
|
7
6
|
add_readme_header :style_guide
|
8
7
|
end
|
9
8
|
|
@@ -29,6 +29,7 @@ run_action(:recipe_loading) do
|
|
29
29
|
create :style
|
30
30
|
create :puma
|
31
31
|
create :database
|
32
|
+
create :annotate
|
32
33
|
create :ruby
|
33
34
|
create :env
|
34
35
|
create :bower
|
@@ -43,7 +44,6 @@ run_action(:recipe_loading) do
|
|
43
44
|
create :pundit
|
44
45
|
create :testing
|
45
46
|
create :production
|
46
|
-
create :staging
|
47
47
|
create :secrets
|
48
48
|
create :git
|
49
49
|
create :api
|
@@ -63,5 +63,5 @@ end
|
|
63
63
|
|
64
64
|
run_action(:database_creation) do
|
65
65
|
run "rake db:create db:migrate"
|
66
|
-
run "
|
66
|
+
run "RACK_ENV=test rake db:create db:migrate"
|
67
67
|
end
|
data/lib/potassium/version.rb
CHANGED
@@ -34,12 +34,10 @@ RSpec.describe "Heroku" do
|
|
34
34
|
|
35
35
|
expect(FakeHeroku).to have_configured_vars("staging", "SECRET_KEY_BASE")
|
36
36
|
expect(FakeHeroku).to have_configured_vars("staging", "RACK_ENV")
|
37
|
-
expect(FakeHeroku).to have_configured_vars("staging", "RAILS_ENV")
|
38
37
|
expect(FakeHeroku).to have_configured_vars("staging", "DEPLOY_TASKS")
|
39
38
|
|
40
39
|
expect(FakeHeroku).to have_configured_vars("production", "SECRET_KEY_BASE")
|
41
40
|
expect(FakeHeroku).to have_configured_vars("production", "RACK_ENV")
|
42
|
-
expect(FakeHeroku).to have_configured_vars("production", "RAILS_ENV")
|
43
41
|
expect(FakeHeroku).to have_configured_vars("production", "DEPLOY_TASKS")
|
44
42
|
|
45
43
|
expect(FakeHeroku).to have_created_pipeline_for("staging")
|
@@ -18,24 +18,6 @@ RSpec.describe "A new project" do
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
-
it "configures rubocop" do
|
22
|
-
rubocop_config_file = IO.read("#{project_path}/.rubocop.yml")
|
23
|
-
|
24
|
-
expect(rubocop_config_file).to include("inherit_from")
|
25
|
-
expect(rubocop_config_file).to include("style_guides/platanus/ruby.yml")
|
26
|
-
expect(rubocop_config_file).to include(".ruby_style.yml")
|
27
|
-
end
|
28
|
-
|
29
|
-
it "set custom ruby style file placeholder" do
|
30
|
-
expect(File).to exist("#{project_path}/.ruby_style.yml")
|
31
|
-
end
|
32
|
-
|
33
|
-
it "configures hound" do
|
34
|
-
hound_config_file = IO.read("#{project_path}/.hound.yml")
|
35
|
-
|
36
|
-
expect(hound_config_file).to include("config_file: .ruby_style.yml")
|
37
|
-
end
|
38
|
-
|
39
21
|
it "configures postgresql" do
|
40
22
|
database_config_file = IO.read("#{project_path}/config/database.yml")
|
41
23
|
gemfile = IO.read("#{project_path}/Gemfile")
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: potassium
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- juliogarciag
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.42.0
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.42.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: rails
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -174,11 +174,8 @@ extra_rdoc_files: []
|
|
174
174
|
files:
|
175
175
|
- ".editorconfig"
|
176
176
|
- ".gitignore"
|
177
|
-
- ".hound.yml"
|
178
177
|
- ".rspec"
|
179
|
-
- ".rubocop.yml"
|
180
178
|
- ".ruby-version"
|
181
|
-
- ".ruby_style.yml"
|
182
179
|
- CHANGELOG.md
|
183
180
|
- Gemfile
|
184
181
|
- LICENSE.txt
|
@@ -194,10 +191,7 @@ files:
|
|
194
191
|
- lib/potassium/assets/.dockerignore
|
195
192
|
- lib/potassium/assets/.editorconfig
|
196
193
|
- lib/potassium/assets/.env.development.erb
|
197
|
-
- lib/potassium/assets/.hound.yml
|
198
194
|
- lib/potassium/assets/.pryrc
|
199
|
-
- lib/potassium/assets/.rubocop.yml
|
200
|
-
- lib/potassium/assets/.ruby_style.yml
|
201
195
|
- lib/potassium/assets/Dockerfile.ci
|
202
196
|
- lib/potassium/assets/Procfile
|
203
197
|
- lib/potassium/assets/README.md.erb
|
@@ -217,11 +211,11 @@ files:
|
|
217
211
|
- lib/potassium/assets/circle.yml
|
218
212
|
- lib/potassium/assets/config/database_mysql.yml.erb
|
219
213
|
- lib/potassium/assets/config/database_postgresql.yml.erb
|
220
|
-
- lib/potassium/assets/config/environments/staging.rb
|
221
214
|
- lib/potassium/assets/config/puma.rb
|
222
215
|
- lib/potassium/assets/config/secrets.yml.erb
|
223
216
|
- lib/potassium/assets/docker-compose.ci.yml
|
224
217
|
- lib/potassium/assets/es.yml
|
218
|
+
- lib/potassium/assets/lib/tasks/auto_annotate_models.rake
|
225
219
|
- lib/potassium/assets/testing/.rspec
|
226
220
|
- lib/potassium/assets/testing/rails_helper.rb
|
227
221
|
- lib/potassium/cli.rb
|
@@ -243,6 +237,7 @@ files:
|
|
243
237
|
- lib/potassium/recipe.rb
|
244
238
|
- lib/potassium/recipes/admin.rb
|
245
239
|
- lib/potassium/recipes/angular_admin.rb
|
240
|
+
- lib/potassium/recipes/annotate.rb
|
246
241
|
- lib/potassium/recipes/api.rb
|
247
242
|
- lib/potassium/recipes/aws_sdk.rb
|
248
243
|
- lib/potassium/recipes/bower.rb
|
@@ -267,7 +262,6 @@ files:
|
|
267
262
|
- lib/potassium/recipes/ruby.rb
|
268
263
|
- lib/potassium/recipes/script.rb
|
269
264
|
- lib/potassium/recipes/secrets.rb
|
270
|
-
- lib/potassium/recipes/staging.rb
|
271
265
|
- lib/potassium/recipes/style.rb
|
272
266
|
- lib/potassium/recipes/testing.rb
|
273
267
|
- lib/potassium/template_finder.rb
|
@@ -306,7 +300,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
306
300
|
version: '0'
|
307
301
|
requirements: []
|
308
302
|
rubyforge_project:
|
309
|
-
rubygems_version: 2.5.
|
303
|
+
rubygems_version: 2.5.1
|
310
304
|
signing_key:
|
311
305
|
specification_version: 4
|
312
306
|
summary: An application generator from Platanus
|
@@ -321,4 +315,3 @@ test_files:
|
|
321
315
|
- spec/support/fake_github.rb
|
322
316
|
- spec/support/fake_heroku.rb
|
323
317
|
- spec/support/potassium_test_helpers.rb
|
324
|
-
has_rdoc:
|
data/.hound.yml
DELETED
data/.rubocop.yml
DELETED
data/.ruby_style.yml
DELETED
File without changes
|