adminka 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +7 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.md +150 -0
  4. data/Rakefile +37 -0
  5. data/app/assets/config/adminka_manifest.js +2 -0
  6. data/app/assets/images/adminka/logo.png +0 -0
  7. data/app/assets/images/adminka/no-pic.jpg +0 -0
  8. data/app/assets/javascripts/adminka/application.js +28 -0
  9. data/app/assets/stylesheets/adminka/application.scss +21 -0
  10. data/app/controllers/adminka/admin_controller.rb +32 -0
  11. data/app/controllers/adminka/admins/registrations_controller.rb +61 -0
  12. data/app/controllers/adminka/admins/sessions_controller.rb +26 -0
  13. data/app/controllers/adminka/crud_controller.rb +60 -0
  14. data/app/helpers/adminka/application_helper.rb +10 -0
  15. data/app/jobs/adminka/application_job.rb +4 -0
  16. data/app/mailers/adminka/application_mailer.rb +6 -0
  17. data/app/models/adminka/admin.rb +14 -0
  18. data/app/models/adminka/application_record.rb +5 -0
  19. data/app/views/adminka/admin/index.html.haml +1 -0
  20. data/app/views/adminka/admins/confirmations/new.html.haml +10 -0
  21. data/app/views/adminka/admins/mailer/confirmation_instructions.html.haml +4 -0
  22. data/app/views/adminka/admins/mailer/password_change.html.haml +3 -0
  23. data/app/views/adminka/admins/mailer/reset_password_instructions.html.haml +6 -0
  24. data/app/views/adminka/admins/mailer/unlock_instructions.html.haml +5 -0
  25. data/app/views/adminka/admins/passwords/edit.html.haml +19 -0
  26. data/app/views/adminka/admins/passwords/new.html.haml +10 -0
  27. data/app/views/adminka/admins/registrations/edit.html.haml +44 -0
  28. data/app/views/adminka/admins/registrations/new.html.haml +29 -0
  29. data/app/views/adminka/admins/sessions/new.html.haml +17 -0
  30. data/app/views/adminka/admins/shared/_links.html.haml +19 -0
  31. data/app/views/adminka/admins/unlocks/new.html.haml +10 -0
  32. data/app/views/adminka/crud/edit.html.haml +17 -0
  33. data/app/views/adminka/crud/index.html.haml +36 -0
  34. data/app/views/adminka/crud/new.html.haml +17 -0
  35. data/app/views/adminka/crud/show.html.haml +18 -0
  36. data/app/views/adminka/form_fields/_check_box.html.haml +4 -0
  37. data/app/views/adminka/form_fields/_image.html.haml +6 -0
  38. data/app/views/adminka/form_fields/_radio.html.haml +11 -0
  39. data/app/views/adminka/form_fields/_select.html.haml +9 -0
  40. data/app/views/adminka/form_fields/_text.html.haml +4 -0
  41. data/app/views/adminka/form_fields/_textarea.html.haml +4 -0
  42. data/app/views/kaminari/bootstrap/_first_page.html.haml +2 -0
  43. data/app/views/kaminari/bootstrap/_gap.html.haml +2 -0
  44. data/app/views/kaminari/bootstrap/_last_page.html.haml +2 -0
  45. data/app/views/kaminari/bootstrap/_next_page.html.haml +2 -0
  46. data/app/views/kaminari/bootstrap/_page.html.haml +6 -0
  47. data/app/views/kaminari/bootstrap/_paginator.html.haml +11 -0
  48. data/app/views/kaminari/bootstrap/_prev_page.html.haml +2 -0
  49. data/app/views/layouts/adminka/admin.html.haml +57 -0
  50. data/app/views/layouts/adminka/auth.html.haml +28 -0
  51. data/config/initializers/devise.rb +276 -0
  52. data/config/locales/adminka.en.yml +14 -0
  53. data/config/locales/devise.en.yml +62 -0
  54. data/config/routes.rb +8 -0
  55. data/db/migrate/20161225073001_devise_create_adminka_admins.rb +45 -0
  56. data/lib/adminka.rb +11 -0
  57. data/lib/adminka/engine.rb +9 -0
  58. data/lib/adminka/staff.rb +11 -0
  59. data/lib/adminka/version.rb +3 -0
  60. data/lib/generators/adminka/controllers_generator.rb +12 -0
  61. data/lib/generators/adminka/locale_generator.rb +12 -0
  62. data/lib/generators/adminka/views_generator.rb +17 -0
  63. data/lib/tasks/adminka_tasks.rake +4 -0
  64. metadata +250 -0
@@ -0,0 +1,9 @@
1
+ module Adminka
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace Adminka
4
+ config.autoload_paths << File.expand_path("../../lib", __FILE__)
5
+ initializer :assets do |config|
6
+ Rails.application.config.assets.precompile += %w( adminka/no-pic.jpg adminka/logo.png )
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,11 @@
1
+ module Adminka::Staff
2
+
3
+ def select_fields(type)
4
+ if @config['attributes'][type].is_a?(Hash)
5
+ @config['attributes'][type].keys | ['id']
6
+ else
7
+ @config['attributes'][type] | ['id']
8
+ end
9
+ end
10
+
11
+ end
@@ -0,0 +1,3 @@
1
+ module Adminka
2
+ VERSION = '0.1.0'
3
+ end
@@ -0,0 +1,12 @@
1
+ module Adminka
2
+ class ControllersGenerator < Rails::Generators::Base
3
+ source_root File.expand_path("../../../../app/controllers", __FILE__)
4
+
5
+ desc 'copy engine controllers to app'
6
+
7
+ def copy_controllers
8
+ directory 'adminka', './app/controllers/adminka'
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1,12 @@
1
+ module Adminka
2
+ class LocaleGenerator < Rails::Generators::Base
3
+ source_root File.expand_path("../../../../config/locales", __FILE__)
4
+
5
+ desc 'copy engine locale to app'
6
+
7
+ def copy_locale
8
+ copy_file 'adminka.en.yml', './config/locales/adminka.en.yml'
9
+ end
10
+
11
+ end
12
+ end
@@ -0,0 +1,17 @@
1
+ module Adminka
2
+ class ViewsGenerator < Rails::Generators::Base
3
+ source_root File.expand_path("../../../../app/views", __FILE__)
4
+
5
+ desc 'copy engine views to app'
6
+
7
+ def copy_views
8
+ directory 'adminka', 'app/views/adminka'
9
+ end
10
+
11
+ desc 'copy engine layout to app'
12
+
13
+ def copy_layout
14
+ directory 'layouts/adminka', 'app/views/layouts/adminka'
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :adminka do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,250 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: adminka
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Igor
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-02-04 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.0
20
+ - - ">="
21
+ - !ruby/object:Gem::Version
22
+ version: 5.0.0.1
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - "~>"
28
+ - !ruby/object:Gem::Version
29
+ version: 5.0.0
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 5.0.0.1
33
+ - !ruby/object:Gem::Dependency
34
+ name: bootstrap-sass
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: '0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: jquery-rails
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '4.2'
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: 4.2.1
57
+ type: :runtime
58
+ prerelease: false
59
+ version_requirements: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '4.2'
64
+ - - ">="
65
+ - !ruby/object:Gem::Version
66
+ version: 4.2.1
67
+ - !ruby/object:Gem::Dependency
68
+ name: haml
69
+ requirement: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - "~>"
72
+ - !ruby/object:Gem::Version
73
+ version: '4.0'
74
+ - - ">="
75
+ - !ruby/object:Gem::Version
76
+ version: 4.0.7
77
+ type: :runtime
78
+ prerelease: false
79
+ version_requirements: !ruby/object:Gem::Requirement
80
+ requirements:
81
+ - - "~>"
82
+ - !ruby/object:Gem::Version
83
+ version: '4.0'
84
+ - - ">="
85
+ - !ruby/object:Gem::Version
86
+ version: 4.0.7
87
+ - !ruby/object:Gem::Dependency
88
+ name: kaminari
89
+ requirement: !ruby/object:Gem::Requirement
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ type: :runtime
95
+ prerelease: false
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ">="
99
+ - !ruby/object:Gem::Version
100
+ version: '0'
101
+ - !ruby/object:Gem::Dependency
102
+ name: ransack
103
+ requirement: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ type: :runtime
109
+ prerelease: false
110
+ version_requirements: !ruby/object:Gem::Requirement
111
+ requirements:
112
+ - - ">="
113
+ - !ruby/object:Gem::Version
114
+ version: '0'
115
+ - !ruby/object:Gem::Dependency
116
+ name: devise
117
+ requirement: !ruby/object:Gem::Requirement
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ version: '0'
122
+ type: :runtime
123
+ prerelease: false
124
+ version_requirements: !ruby/object:Gem::Requirement
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ version: '0'
129
+ - !ruby/object:Gem::Dependency
130
+ name: pg
131
+ requirement: !ruby/object:Gem::Requirement
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ version: '0'
136
+ type: :development
137
+ prerelease: false
138
+ version_requirements: !ruby/object:Gem::Requirement
139
+ requirements:
140
+ - - ">="
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
143
+ - !ruby/object:Gem::Dependency
144
+ name: erb2haml
145
+ requirement: !ruby/object:Gem::Requirement
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ requirements:
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: '0'
157
+ description: Description of Adminka.
158
+ email:
159
+ - dn240687pij@gmail.com
160
+ executables: []
161
+ extensions: []
162
+ extra_rdoc_files: []
163
+ files:
164
+ - MIT-LICENSE
165
+ - README.md
166
+ - Rakefile
167
+ - app/assets/config/adminka_manifest.js
168
+ - app/assets/images/adminka/logo.png
169
+ - app/assets/images/adminka/no-pic.jpg
170
+ - app/assets/javascripts/adminka/application.js
171
+ - app/assets/stylesheets/adminka/application.scss
172
+ - app/controllers/adminka/admin_controller.rb
173
+ - app/controllers/adminka/admins/registrations_controller.rb
174
+ - app/controllers/adminka/admins/sessions_controller.rb
175
+ - app/controllers/adminka/crud_controller.rb
176
+ - app/helpers/adminka/application_helper.rb
177
+ - app/jobs/adminka/application_job.rb
178
+ - app/mailers/adminka/application_mailer.rb
179
+ - app/models/adminka/admin.rb
180
+ - app/models/adminka/application_record.rb
181
+ - app/views/adminka/admin/index.html.haml
182
+ - app/views/adminka/admins/confirmations/new.html.haml
183
+ - app/views/adminka/admins/mailer/confirmation_instructions.html.haml
184
+ - app/views/adminka/admins/mailer/password_change.html.haml
185
+ - app/views/adminka/admins/mailer/reset_password_instructions.html.haml
186
+ - app/views/adminka/admins/mailer/unlock_instructions.html.haml
187
+ - app/views/adminka/admins/passwords/edit.html.haml
188
+ - app/views/adminka/admins/passwords/new.html.haml
189
+ - app/views/adminka/admins/registrations/edit.html.haml
190
+ - app/views/adminka/admins/registrations/new.html.haml
191
+ - app/views/adminka/admins/sessions/new.html.haml
192
+ - app/views/adminka/admins/shared/_links.html.haml
193
+ - app/views/adminka/admins/unlocks/new.html.haml
194
+ - app/views/adminka/crud/edit.html.haml
195
+ - app/views/adminka/crud/index.html.haml
196
+ - app/views/adminka/crud/new.html.haml
197
+ - app/views/adminka/crud/show.html.haml
198
+ - app/views/adminka/form_fields/_check_box.html.haml
199
+ - app/views/adminka/form_fields/_image.html.haml
200
+ - app/views/adminka/form_fields/_radio.html.haml
201
+ - app/views/adminka/form_fields/_select.html.haml
202
+ - app/views/adminka/form_fields/_text.html.haml
203
+ - app/views/adminka/form_fields/_textarea.html.haml
204
+ - app/views/kaminari/bootstrap/_first_page.html.haml
205
+ - app/views/kaminari/bootstrap/_gap.html.haml
206
+ - app/views/kaminari/bootstrap/_last_page.html.haml
207
+ - app/views/kaminari/bootstrap/_next_page.html.haml
208
+ - app/views/kaminari/bootstrap/_page.html.haml
209
+ - app/views/kaminari/bootstrap/_paginator.html.haml
210
+ - app/views/kaminari/bootstrap/_prev_page.html.haml
211
+ - app/views/layouts/adminka/admin.html.haml
212
+ - app/views/layouts/adminka/auth.html.haml
213
+ - config/initializers/devise.rb
214
+ - config/locales/adminka.en.yml
215
+ - config/locales/devise.en.yml
216
+ - config/routes.rb
217
+ - db/migrate/20161225073001_devise_create_adminka_admins.rb
218
+ - lib/adminka.rb
219
+ - lib/adminka/engine.rb
220
+ - lib/adminka/staff.rb
221
+ - lib/adminka/version.rb
222
+ - lib/generators/adminka/controllers_generator.rb
223
+ - lib/generators/adminka/locale_generator.rb
224
+ - lib/generators/adminka/views_generator.rb
225
+ - lib/tasks/adminka_tasks.rake
226
+ homepage: http://guides.rubyonrails.org/engines.html
227
+ licenses:
228
+ - MIT
229
+ metadata: {}
230
+ post_install_message:
231
+ rdoc_options: []
232
+ require_paths:
233
+ - lib
234
+ required_ruby_version: !ruby/object:Gem::Requirement
235
+ requirements:
236
+ - - ">="
237
+ - !ruby/object:Gem::Version
238
+ version: '0'
239
+ required_rubygems_version: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ">="
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
244
+ requirements: []
245
+ rubyforge_project:
246
+ rubygems_version: 2.6.10
247
+ signing_key:
248
+ specification_version: 4
249
+ summary: Summary of Adminka.
250
+ test_files: []