onotole 1.1.0 → 1.1.1

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: 68a3157ab702129ca0c8d08a375737a13438f9a9
4
- data.tar.gz: 0cd75e6d0032cdd98a9fef728f41de62c6f621a1
3
+ metadata.gz: 08a7392c01e8ebd00562b21c33132fe49465e53c
4
+ data.tar.gz: 69a1b4efe7fd922ed2709c6d96595b9c49116152
5
5
  SHA512:
6
- metadata.gz: 3c9447a725d61a612fb3e197a455a8f95438e24ec36a4765cb6e9f234f3fdaa839053d224daf14989bb7d76011f7b39178edc7c62c465779ebadbc8f07de133c
7
- data.tar.gz: e4d1fbd54f3c5da017a960cdcb80ff138d2079286475fed5d51cdc3495954c9531cd971a90bf140592d7da95d05d552b1bacbcebca612d7b63d1b7743dc828e7
6
+ metadata.gz: 92439b245ded6bba9120a66055718e51a82da194de97a0732502e78192380a4c47185dc37e49d65bebccf4308098bf2e418e48977a1d12f0affdcb91d85d8cf5
7
+ data.tar.gz: 87c5d12e56041d84f221f6fbf53f2de8a70e37878aedc581636023f82e60ae682c017ead237f6105bc0eee15ec2fa5dd8c960c3b3bc95edf7cc747fe4f875b83
data/Gemfile CHANGED
@@ -1,4 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  source 'https://rubygems.org'
3
3
 
4
+ gem 'rubycritic', require: false
5
+
4
6
  gemspec
data/README.md CHANGED
@@ -80,6 +80,8 @@ creating elegant backends for website administration.
80
80
  * [Active_skin](https://github.com/rstgroup/active_skin) Flat skin for active admin.
81
81
  * [flattened_active_admin](https://github.com/Papercloud/flattened_active_admin)
82
82
  Theme. Bring your Active Admin up-to-date with this customizable add on
83
+ * [Face_of_active_admin](https://github.com/kvokka/face_of_active_admin) Theme
84
+ for ActiveAdmin with glyphicons and flattens
83
85
  * `*`[rubycritic](https://github.com/whitesmith/rubycritic) A Ruby code quality
84
86
  reporter
85
87
  * [railroady](https://github.com/preston/railroady) Model and controller UML
@@ -10,6 +10,11 @@ module Onotole
10
10
  :annotate,
11
11
  :overcommit,
12
12
  :activeadmin,
13
+ :active_admin_theme,
14
+ :acive_skin,
15
+ :flattened_active_admin,
16
+ :face_of_active_admin,
17
+ :active_admin_bootstrap,
13
18
  :rails_admin,
14
19
  :guard,
15
20
  :guard_rubocop,
@@ -85,30 +90,6 @@ end
85
90
  inject_into_file(AppBuilder.js_file, "\n//= require bootstrap-sprockets",
86
91
  after: '//= require jquery_ujs')
87
92
  copy_file 'bootstrap_flash_helper.rb', 'app/helpers/bootstrap_flash_helper.rb'
88
- return unless user_choose? :activeadmin
89
- if AppBuilder.active_admin_theme_selected
90
-
91
- File.open('app/assets/stylesheets/active_admin.scss', 'a') do |f|
92
- f.write "\n@import 'wigu/active_admin_theme';"
93
- end if user_choose? :active_admin_theme
94
-
95
- File.open('app/assets/stylesheets/active_admin.scss', 'a') do |f|
96
- f.write "\n@import 'active_skin;'\n\\\\$skinLogo: url('admin_logo.png') no-repeat 0 0;"
97
- end if user_choose? :active_skin
98
- if user_choose? :flattened_active_admin
99
- File.open('app/assets/stylesheets/active_admin.scss', 'w') do |f|
100
- f.write "\n@import 'flattened_active_admin/variables;'
101
- \n@import 'flattened_active_admin/mixins;'
102
- \n@import 'flattened_active_admin/base;'"
103
- end
104
- rails_generator 'flattened_active_admin:variables'
105
- end
106
-
107
- else
108
- copy_file 'admin_bootstrap.scss', 'vendor/assets/stylesheets/active_admin/admin_bootstrap.scss'
109
- copy_file 'active_admin.scss', 'vendor/assets/stylesheets/active_admin.scss'
110
- remove_file 'app/assets/stylesheets/active_admin.scss'
111
- end
112
93
  end
113
94
 
114
95
  def after_install_bootstrap3
@@ -172,11 +153,6 @@ end
172
153
  rails_generator 'typus:views'
173
154
  end
174
155
 
175
- def after_install_active_admin_theme
176
- append_file('app/assets/stylesheets/active_admin.scss',
177
- "\n@import 'wigu/active_admin_theme';")
178
- end
179
-
180
156
  def after_install_paper_trail
181
157
  rails_generator 'paper_trail:install'
182
158
  end
@@ -195,5 +171,49 @@ end
195
171
  append_file(AppBuilder.app_file_scss, "\n@import 'devise_bootstrap_views'")
196
172
  rails_generator 'devise:views:bootstrap_templates'
197
173
  end
174
+
175
+ def after_install_active_admin_bootstrap
176
+ return unless user_choose?(:bootstrap3_sass) || user_choose?(:activeadmin)
177
+ AppBuilder.use_asset_pipelline = false
178
+ copy_file 'admin_bootstrap.scss', 'vendor/assets/stylesheets/active_admin/admin_bootstrap.scss'
179
+ copy_file 'active_admin.scss', 'vendor/assets/stylesheets/active_admin.scss'
180
+ remove_file 'app/assets/stylesheets/active_admin.scss'
181
+ end
182
+
183
+ def after_install_active_admin_theme
184
+ return unless user_choose? :activeadmin
185
+ File.open('app/assets/stylesheets/active_admin.scss', 'a') do |f|
186
+ f.write "\n@import 'wigu/active_admin_theme';"
187
+ end
188
+ end
189
+
190
+ def after_install_acive_skin
191
+ return unless user_choose? :activeadmin
192
+ File.open('app/assets/stylesheets/active_admin.scss', 'a') do |f|
193
+ f.write "\n@import 'active_skin;'\n\\\\$skinLogo: url('admin_logo.png') no-repeat 0 0;"
194
+ end
195
+ end
196
+
197
+ def after_install_flattened_active_admin
198
+ return unless user_choose? :activeadmin
199
+ File.open('app/assets/stylesheets/active_admin.scss', 'w') do |f|
200
+ f.write "\n@import 'flattened_active_admin/variables;'
201
+ \n@import 'flattened_active_admin/mixins;'
202
+ \n@import 'flattened_active_admin/base;'"
203
+ end
204
+ rails_generator 'flattened_active_admin:variables'
205
+ end
206
+
207
+ def after_install_face_of_active_admin
208
+ return unless user_choose? :activeadmin
209
+ File.open('app/assets/stylesheets/active_admin.scss', 'w') do |f|
210
+ f.write "\n@import 'face_of_active_admin/variables;'
211
+ \n@import 'face_of_active_admin/mixins;'
212
+ \n@import 'face_of_active_admin/base;'"
213
+ end
214
+ append_file 'app/assets/javascripts/active_admin.js.coffee',
215
+ "\n#= require face_of_active_admin/base"
216
+ rails_generator 'face_of_active_admin:variables'
217
+ end
198
218
  end
199
219
  end
@@ -252,5 +252,9 @@ module Onotole
252
252
  def add_axlsx_rails_gem
253
253
  inject_into_file('Gemfile', "\ngem 'axlsx_rails'", after: '# user_choice')
254
254
  end
255
+
256
+ def add_face_of_active_admin_gem
257
+ inject_into_file('Gemfile', "\ngem 'face_of_active_admin'", after: '# user_choice')
258
+ end
255
259
  end
256
260
  end
@@ -44,11 +44,16 @@ module Onotole
44
44
  active_admin_import: 'The most efficient way to import for ActiveAdmin',
45
45
  active_admin_theme: 'Theme, flat skin',
46
46
  active_skin: 'Theme, flat, nice, good maintenance',
47
- flattened_active_admin: 'Theme. Bring your Active Admin up-to-date with this customizable add on' }
47
+ flattened_active_admin: 'Theme, bring your Active Admin up-to-date with this customizable add on',
48
+ active_admin_bootstrap: 'Theme, simple bootstrap (sass) elements',
49
+ face_of_active_admin: 'Theme for ActiveAdmin with glyphicons and flattens' }
48
50
  themes = [:active_admin_theme, :active_skin, :flattened_active_admin]
49
- multiple_choice('Select activeadmin plug-ins.', variants).each do |gem|
51
+ multiple_choice('Select activeadmin plug-ins (Themes are SASS or SCSS only).', variants).each do |gem|
50
52
  add_to_user_choise gem
51
- AppBuilder.active_admin_theme_selected = true if themes.include? gem
53
+ if themes.include? gem
54
+ AppBuilder.use_asset_pipelline = false
55
+ AppBuilder.active_admin_theme_selected = true
56
+ end
52
57
  end
53
58
  end
54
59
 
@@ -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.0'
5
+ VERSION = '1.1.1'
6
6
  end
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.0
4
+ version: 1.1.1
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-07 00:00:00.000000000 Z
12
+ date: 2016-03-09 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler