onotole 1.0.16 → 1.0.17

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: cc781a10860d07bed424a430bdc93d800624f25c
4
- data.tar.gz: 4e8b9fdb3995a3c28c09adf84739cdae5eca5e30
3
+ metadata.gz: 29f7121f3678b16024d4c63c4c5d524a2dec2c9b
4
+ data.tar.gz: cb1ebda44477cfabce626e99e413814c44b3a95b
5
5
  SHA512:
6
- metadata.gz: e6c7305408cce856140377e8aabfaadf02b4512a3c234ec5d32d221cfc07707a0cfaba8b3ebc5c67ffb4e0ffee01acfefcb0497a81895bfdd0eda8739ee8a133
7
- data.tar.gz: b43eb3971f9182adf525c2fda46db4f3d5a9243fde18357c9eb1d81c3d8723c673cfa0965a80ef425ba0c44bf15e3ecd725e86fd2545d395cf951b7b251c14fb
6
+ metadata.gz: e888f6a97e17fb5cd78c436005d86c7b03ffd137ae05d255c1ce0f6757bf9fb2cc5bf7e3780a587fc4a78eafbb40ea652015b7beac2173e009b5d634b170b9c2
7
+ data.tar.gz: e2d5d94444b6316009574172ef63914c6eade8b5392c1a7f95ad9cb0f6d8f50cd0f97f1d322795a8f7a7527c7da7340b326592f4c9f7d56a0e9f42cfb53eb926
data/README.md CHANGED
@@ -95,6 +95,10 @@ creating elegant backends for website administration.
95
95
  Font-Awesome Sass gem for use in Ruby/Rails projects
96
96
  * [cyrillizer](https://github.com/dalibor/cyrillizer) Character conversion from
97
97
  latin to cyrillic and vice versa
98
+ * [ckeditor](https://github.com/galetahub/ckeditor) CKEditor is a WYSIWYG text
99
+ editor designed to simplify web content creation.
100
+ * [axlsx_rails](https://github.com/straydogstudio/axlsx_rails) A Rails plug-in
101
+ to provide templates for the axlsx gem for providing Excel files format support
98
102
 
99
103
 
100
104
  Mandatory installation gem list you will find in `Gemfile` section
@@ -222,6 +226,9 @@ Onotole also comes with:
222
226
  * The analytics adapter [Segment][segment] (and therefore config for Google
223
227
  Analytics, Intercom, Facebook Ads, Twitter Ads, etc.)
224
228
  * Check existing of app DB and ask about continuation if base persisted
229
+ * Added style flash messagaes for `bootstrap-sass` gem
230
+ * Auto add gem `devise_bootstrap_views` when `bootstrap-sass` and `devise`
231
+ selected for pretty view from the box
225
232
 
226
233
  ## Heroku
227
234
 
@@ -15,6 +15,7 @@ module Onotole
15
15
  :guard_rubocop,
16
16
  :bootstrap3_sass,
17
17
  :bootstrap3,
18
+ :devise_bootstrap_views,
18
19
  :active_admin_theme,
19
20
  :font_awesome_sass,
20
21
  :normalize,
@@ -83,6 +84,7 @@ end
83
84
  \n@import 'bootstrap';")
84
85
  inject_into_file(AppBuilder.js_file, "\n//= require bootstrap-sprockets",
85
86
  after: '//= require jquery_ujs')
87
+ copy_file 'bootstrap_flash_helper.rb', 'app/helpers/bootstrap_flash_helper.rb'
86
88
  return unless user_choose? :activeadmin
87
89
  if AppBuilder.active_admin_theme_selected
88
90
 
@@ -188,5 +190,10 @@ end
188
190
  append_file(AppBuilder.app_file_scss,
189
191
  "\n@import 'font-awesome-sprockets';\n@import 'font-awesome';")
190
192
  end
193
+
194
+ def after_install_devise_bootstrap_views
195
+ append_file(AppBuilder.app_file_scss, "\n@import 'devise_bootstrap_views'")
196
+ rails_generator 'devise:views:bootstrap_templates'
197
+ end
191
198
  end
192
199
  end
@@ -1,6 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
  module Onotole
3
3
  module BeforeBundlePatch
4
+ def add_user_gems
5
+ add_to_user_choise(:devise_bootstrap_views) if user_choose?(:bootstrap3_sass) && user_choose?(:devise)
6
+ GEMPROCLIST.each do |g|
7
+ send "add_#{g}_gem" if user_choose? g.to_sym
8
+ end
9
+ end
10
+
4
11
  def setup_default_gems
5
12
  add_to_user_choise(:normalize)
6
13
  end
@@ -233,5 +240,17 @@ module Onotole
233
240
  def add_cyrillizer_gem
234
241
  inject_into_file('Gemfile', "\ngem 'cyrillizer'", after: '# user_choice')
235
242
  end
243
+
244
+ def add_ckeditor_gem
245
+ inject_into_file('Gemfile', "\ngem 'ckeditor'", after: '# user_choice')
246
+ end
247
+
248
+ def add_devise_bootstrap_views_gem
249
+ inject_into_file('Gemfile', "\ngem 'devise-bootstrap-views'", after: '# user_choice')
250
+ end
251
+
252
+ def add_axlsx_rails_gem
253
+ inject_into_file('Gemfile', "\ngem 'axlsx_rails'", after: '# user_choice')
254
+ end
236
255
  end
237
256
  end
@@ -95,7 +95,9 @@ module Onotole
95
95
  paper_trail: 'Track changes to your models data. For auditing or versioning',
96
96
  cyrillizer: 'Character conversion from latin to cyrillic and vice versa',
97
97
  validates_timeliness: 'Date and time validation plugin for ActiveModel and Rails',
98
- font_awesome_sass: 'Font-Awesome Sass gem for use in Ruby/Rails projects'
98
+ font_awesome_sass: 'Font-Awesome Sass gem for use in Ruby/Rails projects',
99
+ ckeditor: 'CKEditor is a WYSIWYG text editor designed for web content creation.',
100
+ axlsx_rails: 'XLS support, cyrillic support, good support at all'
99
101
  }
100
102
  multiple_choice('Write numbers of all preferred gems.', variants).each do |gem|
101
103
  add_to_user_choise gem
@@ -142,12 +142,5 @@ module Onotole
142
142
  end
143
143
  add_user_gems
144
144
  end
145
-
146
- def add_user_gems
147
- GEMPROCLIST.each do |g|
148
- send "add_#{g}_gem" if user_choose? g.to_sym
149
- end
150
- # add_foo_bar_gem if user_choose?(:foo) && user_choose?(:bar)
151
- end
152
145
  end
153
146
  end
@@ -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.0.16'
5
+ VERSION = '1.0.17'
6
6
  end
@@ -29,13 +29,6 @@ group :development do
29
29
  gem "spring-commands-rspec"
30
30
  gem "web-console"
31
31
  gem "bullet"
32
- end
33
-
34
- group :development, :test do
35
- gem "hirb"
36
- gem "bundler-audit", require: false
37
- gem "dotenv-rails"
38
- gem "factory_girl_rails"
39
32
  gem "pry-byebug"
40
33
  gem "pry-rails"
41
34
  gem 'pry-doc'
@@ -43,11 +36,18 @@ group :development, :test do
43
36
  gem 'pry-state'
44
37
  gem 'better_errors'
45
38
  gem 'binding_of_caller'
39
+ gem "hirb"
40
+ end
41
+
42
+ group :development, :test do
43
+ gem "factory_girl_rails"
44
+ gem "bundler-audit", require: false
45
+ gem "dotenv-rails"
46
46
  gem "rspec-rails", "~> 3.4.0"
47
- gem 'fuubar'
48
47
  end
49
48
 
50
49
  group :test do
50
+ gem 'fuubar'
51
51
  gem "capybara-webkit"
52
52
  gem "database_cleaner"
53
53
  gem "formulaic"
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+ module BootstrapFlashHelper
3
+ ALERT_TYPES_MAP = {
4
+ notice: :success,
5
+ alert: :danger,
6
+ error: :danger,
7
+ info: :info,
8
+ warning: :warning
9
+ }.freeze
10
+
11
+ def bootstrap_flash
12
+ safe_join(flash.each_with_object([]) do |(type, message), messages|
13
+ next if message.blank? || !message.respond_to?(:to_str)
14
+ type = ALERT_TYPES_MAP.fetch(type.to_sym, type)
15
+ messages << flash_container(type, message)
16
+ end, "\n").presence
17
+ end
18
+
19
+ def flash_container(type, message)
20
+ content_tag :div, class: "alert alert-#{type} alert-dismissable" do
21
+ button_tag type: 'button', class: 'close', data: { dismiss: 'alert' } do
22
+ '&times;'.html_safe
23
+ end.safe_concat(message)
24
+ end
25
+ end
26
+ end
@@ -1,3 +1,3 @@
1
1
  --format Fuubar
2
- --require rails_helper
2
+ --require spec_helper
3
3
  --color
data/templates/puma.rb CHANGED
@@ -22,6 +22,8 @@ preload_app!
22
22
  rackup DefaultRackup
23
23
  environment ENV.fetch('RACK_ENV', 'development')
24
24
 
25
+ worker_timeout 36000 if ENV['RAILS_ENV'] == 'development'
26
+
25
27
  on_worker_boot do
26
28
  # Worker specific setup for Rails 4.1+
27
29
  # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
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.0.16
4
+ version: 1.0.17
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-02-24 00:00:00.000000000 Z
12
+ date: 2016-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -126,6 +126,7 @@ files:
126
126
  - templates/bin_deploy
127
127
  - templates/bin_setup
128
128
  - templates/bin_setup_review_app.erb
129
+ - templates/bootstrap_flash_helper.rb
129
130
  - templates/bootstrap_variables.scss
130
131
  - templates/browserslist
131
132
  - templates/bundler_audit.rake