onotole 1.1.1 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08a7392c01e8ebd00562b21c33132fe49465e53c
4
- data.tar.gz: 69a1b4efe7fd922ed2709c6d96595b9c49116152
3
+ metadata.gz: c5ea838d334c7fd268cb2c0b1b3eb9b3e7ef83e8
4
+ data.tar.gz: f71a350cfcd7c2e5bebec9e29a5e3d141155e033
5
5
  SHA512:
6
- metadata.gz: 92439b245ded6bba9120a66055718e51a82da194de97a0732502e78192380a4c47185dc37e49d65bebccf4308098bf2e418e48977a1d12f0affdcb91d85d8cf5
7
- data.tar.gz: 87c5d12e56041d84f221f6fbf53f2de8a70e37878aedc581636023f82e60ae682c017ead237f6105bc0eee15ec2fa5dd8c960c3b3bc95edf7cc747fe4f875b83
6
+ metadata.gz: 27f6cf1c85669532a15b33d18dd390eb66293b744d287b0c4590f29160a36a94e8f5e39331fed9d1b2873119c837edc3bc02fe342a3f424010aa79c03cbc5d3c
7
+ data.tar.gz: 07abb0223318ac2e99a68fa92f85d8b7e78704724f15002742cfa109c686cdfe3d509352ec133751796bfafb65d8e51b22aca09ed5c8d268d5be75588fe7f532
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Code Climate](https://codeclimate.com/github/kvokka/onotole/badges/gpa.svg)](https://codeclimate.com/github/kvokka/onotole)
2
+
1
3
  # Onotole
2
4
 
3
5
  New Rails project wizard. Onotole will help!
@@ -99,8 +101,16 @@ creating elegant backends for website administration.
99
101
  latin to cyrillic and vice versa
100
102
  * [ckeditor](https://github.com/galetahub/ckeditor) CKEditor is a WYSIWYG text
101
103
  editor designed to simplify web content creation.
104
+ * [axslx](https://github.com/randym/axlsx) Xlsx generation with charts, images,
105
+ automated column width, customizable styles and full schema validation.
102
106
  * [axlsx_rails](https://github.com/straydogstudio/axlsx_rails) A Rails plug-in
103
107
  to provide templates for the axlsx gem for providing Excel files format support
108
+ * [prawn](https://github.com/prawnpdf/prawn) Fast, Nimble PDF Writer for Ruby
109
+ http://prawnpdf.org
110
+ * [prawn-table](https://github.com/prawnpdf/prawn-table) Provides support for
111
+ tables in Prawn
112
+ * [fotoramajs](https://github.com/ai/fotoramajs) Fotorama JS gallery for Ruby
113
+ on Rails http://fotorama.io/
104
114
 
105
115
 
106
116
  Mandatory installation gem list you will find in `Gemfile` section
@@ -240,6 +250,7 @@ Onotole also comes with:
240
250
  * Added style flash messagaes for `bootstrap-sass` gem
241
251
  * Auto add gem `devise_bootstrap_views` when `bootstrap-sass` and `devise`
242
252
  selected for pretty view from the box
253
+ * Added autoload js and scss from `vendor/assets/javascripts` and `vendor/assets/stylesheets`
243
254
 
244
255
  ## Heroku
245
256
 
@@ -85,7 +85,7 @@ module Onotole
85
85
  def set_heroku_serve_static_files
86
86
  %w(staging production).each do |environment|
87
87
  run_toolbelt_command(
88
- 'config:add RAILS_SERVE_STATIC_FILES=true',
88
+ "config:add #{app_name.upcase}_RAILS_SERVE_STATIC_FILES=true",
89
89
  environment
90
90
  )
91
91
  end
@@ -2,31 +2,33 @@
2
2
  module Onotole
3
3
  module AfterInstallPatch
4
4
  def post_init
5
- install_queue = [:devise,
6
- :validates_timeliness,
7
- :paper_trail,
8
- :responders,
9
- :typus,
10
- :annotate,
11
- :overcommit,
12
- :activeadmin,
13
- :active_admin_theme,
14
- :acive_skin,
15
- :flattened_active_admin,
16
- :face_of_active_admin,
17
- :active_admin_bootstrap,
18
- :rails_admin,
19
- :guard,
20
- :guard_rubocop,
21
- :bootstrap3_sass,
22
- :bootstrap3,
23
- :devise_bootstrap_views,
24
- :active_admin_theme,
25
- :font_awesome_sass,
26
- :normalize,
27
- :tinymce,
28
- :rubocop,
29
- :create_github_repo]
5
+ install_queue = [
6
+ :fotoramajs,
7
+ :devise,
8
+ :validates_timeliness,
9
+ :paper_trail,
10
+ :responders,
11
+ :typus,
12
+ :annotate,
13
+ :overcommit,
14
+ :activeadmin,
15
+ :active_admin_theme,
16
+ :acive_skin,
17
+ :flattened_active_admin,
18
+ :face_of_active_admin,
19
+ :active_admin_bootstrap,
20
+ :rails_admin,
21
+ :guard,
22
+ :guard_rubocop,
23
+ :bootstrap3_sass,
24
+ :bootstrap3,
25
+ :devise_bootstrap_views,
26
+ :active_admin_theme,
27
+ :font_awesome_sass,
28
+ :normalize,
29
+ :tinymce,
30
+ :rubocop,
31
+ :create_github_repo]
30
32
  install_queue.each { |g| send "after_install_#{g}" if user_choose? g }
31
33
  delete_comments
32
34
  end
@@ -215,5 +217,11 @@ end
215
217
  "\n#= require face_of_active_admin/base"
216
218
  rails_generator 'face_of_active_admin:variables'
217
219
  end
220
+
221
+ def after_install_fotoramajs
222
+ return unless user_choose? :fotoramajs
223
+ inject_into_file(AppBuilder.js_file, "\n//= require fotorama",
224
+ after: '//= require jquery_ujs')
225
+ end
218
226
  end
219
227
  end
@@ -253,8 +253,21 @@ module Onotole
253
253
  inject_into_file('Gemfile', "\ngem 'axlsx_rails'", after: '# user_choice')
254
254
  end
255
255
 
256
+ def add_axlsx_gem
257
+ inject_into_file('Gemfile', "\ngem 'axlsx'", after: '# user_choice')
258
+ end
259
+
256
260
  def add_face_of_active_admin_gem
257
261
  inject_into_file('Gemfile', "\ngem 'face_of_active_admin'", after: '# user_choice')
258
262
  end
263
+
264
+ def add_prawn_gem
265
+ inject_into_file('Gemfile', "\ngem 'prawn'", after: '# user_choice')
266
+ inject_into_file('Gemfile', "\ngem 'prawn-table'", after: '# user_choice')
267
+ end
268
+
269
+ def add_fotoramajs_gem
270
+ inject_into_file('Gemfile', "\ngem 'fotoramajs'", after: '# user_choice')
271
+ end
259
272
  end
260
273
  end
@@ -102,6 +102,8 @@ module Onotole
102
102
  validates_timeliness: 'Date and time validation plugin for ActiveModel and Rails',
103
103
  font_awesome_sass: 'Font-Awesome Sass gem for use in Ruby/Rails projects',
104
104
  ckeditor: 'CKEditor is a WYSIWYG text editor designed for web content creation.',
105
+ fotoramajs: 'Fotorama JS gallery for Rails http://fotorama.io/',
106
+ prawn: 'Prawn gem for PDF support vs prawn-table for easy tables',
105
107
  axlsx_rails: 'XLS support, cyrillic support, good support at all'
106
108
  }
107
109
  multiple_choice('Write numbers of all preferred gems.', variants).each do |gem|
@@ -75,5 +75,10 @@ module Onotole
75
75
  def create_shared_javascripts
76
76
  copy_file '_javascript.html.erb', 'app/views/application/_javascript.html.erb'
77
77
  end
78
+
79
+ def add_vendor_css_path
80
+ vendor_css_path = "\nRails.application.config.assets.paths += Dir[(Rails.root.join('vendor/assets/stylesheets'))]"
81
+ append_file 'config/initializers/assets.rb', vendor_css_path
82
+ end
78
83
  end
79
84
  end
@@ -192,5 +192,9 @@ end
192
192
  config = "\n config.autoload_paths << Rails.root.join('app/support')\n"
193
193
  inject_into_class 'config/application.rb', 'Application', config
194
194
  end
195
+
196
+ def apply_vendorjs_folder
197
+ inject_into_file(AppBuilder.js_file, "//= require_tree ../../../vendor/assets/javascripts/.\n", before: '//= require_tree .')
198
+ end
195
199
  end
196
200
  end
@@ -175,6 +175,8 @@ module Onotole
175
175
  build :setup_default_rake_task
176
176
  build :configure_puma
177
177
  build :set_up_forego
178
+ build :apply_vendorjs_folder
179
+ build :add_vendor_css_path
178
180
  end
179
181
 
180
182
  # def setup_stylesheets
@@ -296,10 +298,6 @@ module Onotole
296
298
  build :clean_by_rubocop
297
299
  end
298
300
 
299
- def configure_support_path
300
- build :configure_support_path
301
- end
302
-
303
301
  protected
304
302
 
305
303
  def get_builder_class
@@ -54,7 +54,7 @@ module Onotole
54
54
  end
55
55
 
56
56
  def serve_static_files_line
57
- "config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?\n"
57
+ "config.serve_static_files = ENV.fetch('#{app_name.upcase}_RAILS_SERVE_STATIC_FILES',false)\n"
58
58
  end
59
59
 
60
60
  def add_gems_from_args
@@ -2,5 +2,5 @@
2
2
  module Onotole
3
3
  RAILS_VERSION = '~> 4.2.0'
4
4
  RUBY_VERSION = IO.read("#{File.dirname(__FILE__)}/../../.ruby-version").strip
5
- VERSION = '1.1.1'
5
+ VERSION = '1.1.3'
6
6
  end
File without changes
data/spec/fakes/bin/hub CHANGED
File without changes
data/templates/bin_deploy CHANGED
File without changes
data/templates/dotenv.erb CHANGED
@@ -11,3 +11,4 @@ EXECJS_RUNTIME=Node
11
11
  <%= "#{app_name.upcase}_SMTP_USERNAME=username" %>
12
12
  <%= "#{app_name.upcase}_WEB_CONCURRENCY=1" %>
13
13
  <%= "#{app_name.upcase}_MAX_THREADS=16" %>
14
+ <%= "#{app_name.upcase}_RAILS_SERVE_STATIC_FILES=true" %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onotole
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - kvokka
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-03-09 00:00:00.000000000 Z
12
+ date: 2016-03-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler