bretelline 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (90) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +12 -0
  3. data/Gemfile +4 -0
  4. data/README.md +36 -0
  5. data/Rakefile +1 -0
  6. data/blog/.gitignore +23 -0
  7. data/blog/Gemfile +54 -0
  8. data/blog/Gemfile.lock +191 -0
  9. data/blog/README.md +1 -0
  10. data/blog/Rakefile +6 -0
  11. data/blog/app/assets/config/manifest.js +3 -0
  12. data/blog/app/assets/images/.keep +0 -0
  13. data/blog/app/assets/javascripts/application.js +15 -0
  14. data/blog/app/assets/javascripts/cable.js +13 -0
  15. data/blog/app/assets/javascripts/channels/.keep +0 -0
  16. data/blog/app/assets/stylesheets/application.css +15 -0
  17. data/blog/app/channels/application_cable/channel.rb +4 -0
  18. data/blog/app/channels/application_cable/connection.rb +4 -0
  19. data/blog/app/controllers/application_controller.rb +3 -0
  20. data/blog/app/controllers/concerns/.keep +0 -0
  21. data/blog/app/helpers/application_helper.rb +2 -0
  22. data/blog/app/jobs/application_job.rb +2 -0
  23. data/blog/app/mailers/application_mailer.rb +4 -0
  24. data/blog/app/models/application_record.rb +3 -0
  25. data/blog/app/models/concerns/.keep +0 -0
  26. data/blog/app/views/layouts/application.html.erb +14 -0
  27. data/blog/app/views/layouts/mailer.html.erb +13 -0
  28. data/blog/app/views/layouts/mailer.text.erb +1 -0
  29. data/blog/bin/bundle +3 -0
  30. data/blog/bin/rails +9 -0
  31. data/blog/bin/rake +9 -0
  32. data/blog/bin/setup +38 -0
  33. data/blog/bin/spring +17 -0
  34. data/blog/bin/update +29 -0
  35. data/blog/bin/yarn +11 -0
  36. data/blog/config/application.rb +18 -0
  37. data/blog/config/boot.rb +3 -0
  38. data/blog/config/cable.yml +10 -0
  39. data/blog/config/database.yml +25 -0
  40. data/blog/config/environment.rb +5 -0
  41. data/blog/config/environments/development.rb +54 -0
  42. data/blog/config/environments/production.rb +91 -0
  43. data/blog/config/environments/test.rb +42 -0
  44. data/blog/config/initializers/application_controller_renderer.rb +6 -0
  45. data/blog/config/initializers/assets.rb +14 -0
  46. data/blog/config/initializers/backtrace_silencers.rb +7 -0
  47. data/blog/config/initializers/cookies_serializer.rb +5 -0
  48. data/blog/config/initializers/filter_parameter_logging.rb +4 -0
  49. data/blog/config/initializers/inflections.rb +16 -0
  50. data/blog/config/initializers/mime_types.rb +4 -0
  51. data/blog/config/initializers/wrap_parameters.rb +14 -0
  52. data/blog/config/locales/en.yml +33 -0
  53. data/blog/config/puma.rb +56 -0
  54. data/blog/config/routes.rb +3 -0
  55. data/blog/config/secrets.yml +32 -0
  56. data/blog/config/spring.rb +6 -0
  57. data/blog/config.ru +5 -0
  58. data/blog/db/seeds.rb +7 -0
  59. data/blog/lib/assets/.keep +0 -0
  60. data/blog/lib/tasks/.keep +0 -0
  61. data/blog/log/.keep +0 -0
  62. data/blog/package.json +5 -0
  63. data/blog/public/404.html +67 -0
  64. data/blog/public/422.html +67 -0
  65. data/blog/public/500.html +66 -0
  66. data/blog/public/apple-touch-icon-precomposed.png +0 -0
  67. data/blog/public/apple-touch-icon.png +0 -0
  68. data/blog/public/favicon.ico +0 -0
  69. data/blog/public/robots.txt +1 -0
  70. data/blog/test/application_system_test_case.rb +5 -0
  71. data/blog/test/controllers/.keep +0 -0
  72. data/blog/test/fixtures/.keep +0 -0
  73. data/blog/test/fixtures/files/.keep +0 -0
  74. data/blog/test/helpers/.keep +0 -0
  75. data/blog/test/integration/.keep +0 -0
  76. data/blog/test/mailers/.keep +0 -0
  77. data/blog/test/models/.keep +0 -0
  78. data/blog/test/system/.keep +0 -0
  79. data/blog/test/test_helper.rb +9 -0
  80. data/blog/tmp/.keep +0 -0
  81. data/blog/vendor/.keep +0 -0
  82. data/bretelline.gemspec +28 -0
  83. data/exe/bretelline +5 -0
  84. data/lib/bretelline/app_generator.rb +55 -0
  85. data/lib/bretelline/builders/solidus.rb +19 -0
  86. data/lib/bretelline/templates/README.md.erb +1 -0
  87. data/lib/bretelline/templates/solidus_gemfile.erb +69 -0
  88. data/lib/bretelline/version.rb +4 -0
  89. data/lib/bretelline.rb +5 -0
  90. metadata +174 -0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -0,0 +1,9 @@
1
+ require File.expand_path('../../config/environment', __FILE__)
2
+ require 'rails/test_help'
3
+
4
+ class ActiveSupport::TestCase
5
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
6
+ fixtures :all
7
+
8
+ # Add more helper methods to be used by all tests here...
9
+ end
data/blog/tmp/.keep ADDED
File without changes
data/blog/vendor/.keep ADDED
File without changes
@@ -0,0 +1,28 @@
1
+ # coding: utf-8
2
+
3
+ lib = File.expand_path("../lib", __FILE__)
4
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
+ require "bretelline/version"
6
+
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "bretelline"
9
+ spec.version = Bretelline::VERSION
10
+ spec.authors = ["Matteo Latini"]
11
+ spec.email = ["matteolatini@nebulab.it"]
12
+
13
+ spec.summary = 'A Rails::AppBuilder gem for Nebulab.'
14
+ spec.description = 'This is a gem that stores all the templates for Nebulab Rails applications.'
15
+ spec.homepage = 'https://github.com/nebulab/bretelline'
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ f.match(%r{^(test|spec|features)/})
19
+ end
20
+ spec.bindir = "exe"
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.add_dependency 'rails', Bretelline::RAILS_VERSION
25
+
26
+ spec.add_development_dependency "bundler", "~> 1.15"
27
+ spec.add_development_dependency "rake", "~> 10.0"
28
+ end
data/exe/bretelline ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ $LOAD_PATH.unshift File.expand_path("../lib", File.dirname(__FILE__))
3
+ require "bretelline"
4
+
5
+ Bretelline::AppGenerator.start
@@ -0,0 +1,55 @@
1
+ module Bretelline
2
+ class AppGenerator < Rails::Generators::AppGenerator
3
+ class_option :database, type: :string, aliases: "-d", default: "postgresql",
4
+ desc: "Configure for selected database (options: #{DATABASES.join('/')})"
5
+
6
+ class_option :skip_test, type: :boolean, default: true,
7
+ desc: "Skip Test Unit"
8
+
9
+ class_option :skip_system_test, type: :boolean, default: true,
10
+ desc: "Skip system test files"
11
+
12
+ class_option :skip_turbolinks, type: :boolean, default: true,
13
+ desc: "Skip turbolinks gem"
14
+
15
+ class_option :skip_action_cable, type: :boolean, aliases: "-C", default: true,
16
+ desc: "Skip Action Cable files"
17
+
18
+ def source_paths
19
+ [
20
+ Rails::Generators::AppGenerator.source_root,
21
+ File.expand_path("templates", File.dirname(__FILE__))
22
+ ]
23
+ end
24
+
25
+ def finish_template
26
+ invoke :bretelline
27
+ super
28
+ end
29
+
30
+ def run_bundle
31
+ # Do nothing, it will be run by the bretelline command
32
+ end
33
+
34
+ def bretelline
35
+ bundle_command 'install'
36
+ invoke :create_database
37
+ build :install_engine
38
+ invoke :migrate_database
39
+ end
40
+
41
+ def create_database
42
+ bundle_command "exec rails db:create"
43
+ end
44
+
45
+ def migrate_database
46
+ bundle_command "exec rails db:migrate"
47
+ end
48
+
49
+ protected
50
+
51
+ def get_builder_class
52
+ Bretelline::Builders::Solidus
53
+ end
54
+ end
55
+ end
@@ -0,0 +1,19 @@
1
+ module Bretelline
2
+ module Builders
3
+ class Solidus < Rails::AppBuilder
4
+ def gemfile
5
+ template "solidus_gemfile.erb", "Gemfile"
6
+ end
7
+
8
+ def install_engine
9
+ bundle_command "exec rails g spree:install"
10
+ bundle_command "exec rails g solidus:auth:install"
11
+ bundle_command "exec rake railties:install:migrations"
12
+ end
13
+
14
+ def readme
15
+ template 'README.md.erb', 'README.md'
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1 @@
1
+ # <%= app_name.humanize %>
@@ -0,0 +1,69 @@
1
+ source 'https://rubygems.org'
2
+
3
+ git_source(:github) do |repo_name|
4
+ repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
5
+ "https://github.com/#{repo_name}.git"
6
+ end
7
+
8
+ #
9
+ # Main gems
10
+ #
11
+ gem 'pg', '~> 0.19.0'
12
+ gem 'rails', '<%= Bretelline::RAILS_VERSION %>'
13
+
14
+ #
15
+ # Logging
16
+ #
17
+ gem 'awesome_print', '~> 1.0'
18
+ gem 'rails_semantic_logger', '~> 4.0'
19
+
20
+ #
21
+ # Webservers
22
+ #
23
+ gem 'puma', '~> 3.0'
24
+
25
+ #
26
+ # Assets
27
+ #
28
+ gem 'coffee-rails', '~> 4.2.1'
29
+ gem 'jquery-rails'
30
+ gem 'sass-rails', '~> 5.0'
31
+ gem 'uglifier', '>= 1.3.0'
32
+
33
+ #
34
+ # Various tools
35
+ #
36
+ gem 'seedbank', '~> 0.4'
37
+
38
+ group :development, :test do
39
+ gem 'dev_tools', github: 'nebulab/dev_tools'
40
+ gem 'rspec-rails', '~> 3.6.0'
41
+ gem 'spring'
42
+ gem 'spring-watcher-listen', '~> 2.0.0'
43
+ gem 'web-console', '>= 3.3.0'
44
+ end
45
+
46
+ group :test do
47
+ gem 'capybara', '~> 2.12.1'
48
+ gem 'chromedriver-helper', '~> 1.0.0'
49
+ gem 'database_cleaner', '~> 1.5.3'
50
+ gem 'factory_girl', '~> 4.8.0'
51
+ gem 'shoulda-matchers', '~> 3.1.1'
52
+ gem 'site_prism', '~> 2.9'
53
+ gem 'timecop', '~> 0.8.1'
54
+ gem 'vcr', '~> 3.0.3'
55
+ gem 'webmock', '~> 2.3.2'
56
+ end
57
+
58
+ group :analyzers do
59
+ gem 'brakeman', '~> 3.4.1'
60
+ gem 'rubocop', '~> 0.46.0'
61
+ gem 'simplecov', '~> 0.12.0'
62
+ end
63
+
64
+ #
65
+ # Solidus
66
+ #
67
+ gem 'solidus'
68
+ gem 'solidus_auth_devise'
69
+ gem 'solidus_i18n', github: 'solidusio-contrib/solidus_i18n'
@@ -0,0 +1,4 @@
1
+ module Bretelline
2
+ RAILS_VERSION = "~> 5.0.4".freeze
3
+ VERSION = "0.1.0".freeze
4
+ end
data/lib/bretelline.rb ADDED
@@ -0,0 +1,5 @@
1
+ require "rails/generators/rails/app/app_generator"
2
+
3
+ require "bretelline/version"
4
+ require "bretelline/app_generator"
5
+ require "bretelline/builders/solidus"
metadata ADDED
@@ -0,0 +1,174 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bretelline
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Matteo Latini
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-07-10 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 5.0.4
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 5.0.4
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.15'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.15'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ description: This is a gem that stores all the templates for Nebulab Rails applications.
56
+ email:
57
+ - matteolatini@nebulab.it
58
+ executables:
59
+ - bretelline
60
+ extensions: []
61
+ extra_rdoc_files: []
62
+ files:
63
+ - ".gitignore"
64
+ - Gemfile
65
+ - README.md
66
+ - Rakefile
67
+ - blog/.gitignore
68
+ - blog/Gemfile
69
+ - blog/Gemfile.lock
70
+ - blog/README.md
71
+ - blog/Rakefile
72
+ - blog/app/assets/config/manifest.js
73
+ - blog/app/assets/images/.keep
74
+ - blog/app/assets/javascripts/application.js
75
+ - blog/app/assets/javascripts/cable.js
76
+ - blog/app/assets/javascripts/channels/.keep
77
+ - blog/app/assets/stylesheets/application.css
78
+ - blog/app/channels/application_cable/channel.rb
79
+ - blog/app/channels/application_cable/connection.rb
80
+ - blog/app/controllers/application_controller.rb
81
+ - blog/app/controllers/concerns/.keep
82
+ - blog/app/helpers/application_helper.rb
83
+ - blog/app/jobs/application_job.rb
84
+ - blog/app/mailers/application_mailer.rb
85
+ - blog/app/models/application_record.rb
86
+ - blog/app/models/concerns/.keep
87
+ - blog/app/views/layouts/application.html.erb
88
+ - blog/app/views/layouts/mailer.html.erb
89
+ - blog/app/views/layouts/mailer.text.erb
90
+ - blog/bin/bundle
91
+ - blog/bin/rails
92
+ - blog/bin/rake
93
+ - blog/bin/setup
94
+ - blog/bin/spring
95
+ - blog/bin/update
96
+ - blog/bin/yarn
97
+ - blog/config.ru
98
+ - blog/config/application.rb
99
+ - blog/config/boot.rb
100
+ - blog/config/cable.yml
101
+ - blog/config/database.yml
102
+ - blog/config/environment.rb
103
+ - blog/config/environments/development.rb
104
+ - blog/config/environments/production.rb
105
+ - blog/config/environments/test.rb
106
+ - blog/config/initializers/application_controller_renderer.rb
107
+ - blog/config/initializers/assets.rb
108
+ - blog/config/initializers/backtrace_silencers.rb
109
+ - blog/config/initializers/cookies_serializer.rb
110
+ - blog/config/initializers/filter_parameter_logging.rb
111
+ - blog/config/initializers/inflections.rb
112
+ - blog/config/initializers/mime_types.rb
113
+ - blog/config/initializers/wrap_parameters.rb
114
+ - blog/config/locales/en.yml
115
+ - blog/config/puma.rb
116
+ - blog/config/routes.rb
117
+ - blog/config/secrets.yml
118
+ - blog/config/spring.rb
119
+ - blog/db/seeds.rb
120
+ - blog/lib/assets/.keep
121
+ - blog/lib/tasks/.keep
122
+ - blog/log/.keep
123
+ - blog/package.json
124
+ - blog/public/404.html
125
+ - blog/public/422.html
126
+ - blog/public/500.html
127
+ - blog/public/apple-touch-icon-precomposed.png
128
+ - blog/public/apple-touch-icon.png
129
+ - blog/public/favicon.ico
130
+ - blog/public/robots.txt
131
+ - blog/test/application_system_test_case.rb
132
+ - blog/test/controllers/.keep
133
+ - blog/test/fixtures/.keep
134
+ - blog/test/fixtures/files/.keep
135
+ - blog/test/helpers/.keep
136
+ - blog/test/integration/.keep
137
+ - blog/test/mailers/.keep
138
+ - blog/test/models/.keep
139
+ - blog/test/system/.keep
140
+ - blog/test/test_helper.rb
141
+ - blog/tmp/.keep
142
+ - blog/vendor/.keep
143
+ - bretelline.gemspec
144
+ - exe/bretelline
145
+ - lib/bretelline.rb
146
+ - lib/bretelline/app_generator.rb
147
+ - lib/bretelline/builders/solidus.rb
148
+ - lib/bretelline/templates/README.md.erb
149
+ - lib/bretelline/templates/solidus_gemfile.erb
150
+ - lib/bretelline/version.rb
151
+ homepage: https://github.com/nebulab/bretelline
152
+ licenses: []
153
+ metadata: {}
154
+ post_install_message:
155
+ rdoc_options: []
156
+ require_paths:
157
+ - lib
158
+ required_ruby_version: !ruby/object:Gem::Requirement
159
+ requirements:
160
+ - - ">="
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ required_rubygems_version: !ruby/object:Gem::Requirement
164
+ requirements:
165
+ - - ">="
166
+ - !ruby/object:Gem::Version
167
+ version: '0'
168
+ requirements: []
169
+ rubyforge_project:
170
+ rubygems_version: 2.6.12
171
+ signing_key:
172
+ specification_version: 4
173
+ summary: A Rails::AppBuilder gem for Nebulab.
174
+ test_files: []