odania 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/{LICENSE.txt → MIT-LICENSE} +1 -3
- data/README.md +3 -3
- data/Rakefile +33 -3
- data/app/assets/config/odania_manifest.js +0 -0
- data/app/assets/javascripts/application.js +13 -0
- data/app/assets/javascripts/textAngular.js +15 -0
- data/app/assets/javascripts/textAngular/textAngular-rangy.min.js +478 -0
- data/app/assets/javascripts/textAngular/textAngular-sanitize.min.js +322 -0
- data/app/assets/javascripts/textAngular/textAngular.min.js +1481 -0
- data/app/assets/stylesheets/scaffold.css +80 -0
- data/app/assets/stylesheets/textAngular/application.css +15 -0
- data/app/assets/stylesheets/textAngular/textAngular.css +204 -0
- data/app/controllers/admin/home_controller.rb +2 -0
- data/app/controllers/admin/languages_controller.rb +74 -0
- data/app/controllers/admin_controller.rb +4 -0
- data/app/controllers/application_controller.rb +3 -0
- data/app/controllers/categories_controller.rb +34 -0
- data/app/controllers/home_controller.rb +11 -0
- data/app/controllers/protected/home_controller.rb +2 -0
- data/app/controllers/protected_controller.rb +22 -0
- data/app/controllers/registration_controller.rb +12 -0
- data/app/helpers/standard_form_builder.rb +71 -0
- data/app/helpers/standard_form_helper.rb +13 -0
- data/app/models/admin.rb +37 -0
- data/app/models/language.rb +5 -0
- data/app/models/user.rb +47 -0
- data/app/views/admin/home/index.html.erb +1 -0
- data/app/views/admin/languages/_form.html.erb +16 -0
- data/app/views/admin/languages/_language.json.jbuilder +2 -0
- data/app/views/admin/languages/edit.html.erb +6 -0
- data/app/views/admin/languages/index.html.erb +27 -0
- data/app/views/admin/languages/index.json.jbuilder +1 -0
- data/app/views/admin/languages/new.html.erb +5 -0
- data/app/views/admin/languages/show.html.erb +9 -0
- data/app/views/admin/languages/show.json.jbuilder +1 -0
- data/app/views/categories/index.html.erb +9 -0
- data/app/views/categories/show.html.erb +16 -0
- data/app/views/devise/confirmations/new.html.erb +11 -0
- data/app/views/devise/mailer/confirmation_instructions.html.erb +5 -0
- data/app/views/devise/mailer/email_changed.html.erb +7 -0
- data/app/views/devise/mailer/password_change.html.erb +4 -0
- data/app/views/devise/mailer/reset_password_instructions.html.erb +9 -0
- data/app/views/devise/mailer/unlock_instructions.html.erb +8 -0
- data/app/views/devise/passwords/edit.html.erb +13 -0
- data/app/views/devise/passwords/new.html.erb +11 -0
- data/app/views/devise/registrations/edit.html.erb +39 -0
- data/app/views/devise/registrations/new.html.erb +15 -0
- data/app/views/devise/sessions/new.html.erb +14 -0
- data/app/views/devise/shared/_links.html.erb +25 -0
- data/app/views/devise/unlocks/new.html.erb +11 -0
- data/app/views/home/index.html.erb +11 -0
- data/app/views/languages/_form.html.erb +20 -0
- data/app/views/languages/edit.html.erb +6 -0
- data/app/views/languages/index.html.erb +27 -0
- data/app/views/languages/new.html.erb +5 -0
- data/app/views/languages/show.html.erb +9 -0
- data/app/views/protected/home/index.html.erb +1 -0
- data/config/initializers/elasticsearch.rb +5 -0
- data/config/locales/devise.en.yml +64 -0
- data/config/routes.rb +23 -0
- data/db/seeds.rb +5 -0
- data/lib/odania.rb +7 -56
- data/lib/odania/engine.rb +14 -0
- data/lib/odania/version.rb +1 -1
- data/lib/tasks/odania_tasks.rake +4 -0
- data/lib/templates/erb/scaffold/_form.html.erb +27 -0
- data/lib/templates/erb/scaffold/edit.html.erb +6 -0
- data/lib/templates/erb/scaffold/index.html.erb +31 -0
- data/lib/templates/erb/scaffold/new.html.erb +5 -0
- data/lib/templates/erb/scaffold/show.html.erb +11 -0
- metadata +129 -84
- data/.codeclimate.yml +0 -30
- data/.gitignore +0 -17
- data/.rspec +0 -2
- data/.rubocop.yml +0 -1156
- data/.travis.yml +0 -20
- data/Gemfile +0 -4
- data/Gemfile.lock +0 -113
- data/Guardfile +0 -31
- data/features/plugin.feature +0 -35
- data/features/step_definitions/plugin_steps.rb +0 -75
- data/features/support/env.rb +0 -1
- data/lib/odania/config.rb +0 -17
- data/lib/odania/config/backend.rb +0 -31
- data/lib/odania/config/backend_group.rb +0 -43
- data/lib/odania/config/domain.rb +0 -59
- data/lib/odania/config/duplicates.rb +0 -28
- data/lib/odania/config/global_config.rb +0 -210
- data/lib/odania/config/layout.rb +0 -30
- data/lib/odania/config/page.rb +0 -29
- data/lib/odania/config/page_base.rb +0 -47
- data/lib/odania/config/plugin_config.rb +0 -58
- data/lib/odania/config/style.rb +0 -36
- data/lib/odania/config/sub_domain.rb +0 -113
- data/lib/odania/config/subdomain_config.rb +0 -124
- data/lib/odania/consul.rb +0 -138
- data/lib/odania/plugin.rb +0 -103
- data/odania.gemspec +0 -34
- data/spec/fixtures/global_config.json +0 -135
- data/spec/fixtures/plugin_config_1.json +0 -102
- data/spec/lib/odania/config/global_config_spec.rb +0 -69
- data/spec/lib/odania/config/plugin_config_spec.rb +0 -31
- data/spec/lib/odania/plugin_spec.rb +0 -25
- data/spec/lib/odania_spec.rb +0 -10
- data/spec/spec_helper.rb +0 -19
- data/spec/support/consul_mock.rb +0 -123
- data/tasks/odania.rake +0 -8
- data/tasks/rspec.rake +0 -7
@@ -0,0 +1,14 @@
|
|
1
|
+
<h2><%= t('.sign_in') %></h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, as: resource_name, url: session_path(resource_name), builder: StandardFormBuilder) do |f| %>
|
4
|
+
<%= f.email_field :email, autofocus: true %>
|
5
|
+
<%= f.password_field :password, autocomplete: 'off' %>
|
6
|
+
|
7
|
+
<% if devise_mapping.rememberable? %>
|
8
|
+
<%= f.check_box :remember_me %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= f.submit t('.sign_in') %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<%= render 'devise/shared/links' %>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<%- if controller_name != 'sessions' %>
|
2
|
+
<%= link_to t(".sign_in"), new_session_path(resource_name) %><br/>
|
3
|
+
<% end -%>
|
4
|
+
|
5
|
+
<%- if devise_mapping.registerable? && controller_name != 'registrations' %>
|
6
|
+
<%= link_to t(".sign_up"), new_registration_path(resource_name) %><br/>
|
7
|
+
<% end -%>
|
8
|
+
|
9
|
+
<%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
|
10
|
+
<%= link_to t(".forgot_your_password"), new_password_path(resource_name) %><br/>
|
11
|
+
<% end -%>
|
12
|
+
|
13
|
+
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
|
14
|
+
<%= link_to t('.didn_t_receive_confirmation_instructions'), new_confirmation_path(resource_name) %><br/>
|
15
|
+
<% end -%>
|
16
|
+
|
17
|
+
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
|
18
|
+
<%= link_to t('.didn_t_receive_unlock_instructions'), new_unlock_path(resource_name) %><br/>
|
19
|
+
<% end -%>
|
20
|
+
|
21
|
+
<%- if devise_mapping.omniauthable? %>
|
22
|
+
<%- resource_class.omniauth_providers.each do |provider| %>
|
23
|
+
<%= link_to t('.sign_in_with_provider', provider: provider.to_s.titleize), omniauth_authorize_path(resource_name, provider) %><br/>
|
24
|
+
<% end -%>
|
25
|
+
<% end -%>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<h2><%= t('.resend_unlock_instructions') %></h2>
|
2
|
+
|
3
|
+
<%= form_for(resource, as: resource_name, url: unlock_path(resource_name), builder: StandardFormBuilder, html: {method: :post}) do |f| %>
|
4
|
+
<%= devise_error_messages! %>
|
5
|
+
|
6
|
+
<%= f.email_field :email, autofocus: true %>
|
7
|
+
|
8
|
+
<%= f.submit t('.resend_unlock_instructions') %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<%= render 'devise/shared/links' %>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<%= form_with(model: language, local: true, builder: StandardFormBuilder) do |form| %>
|
2
|
+
<% if language.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%= pluralize(language.errors.count, "error") %> prohibited this language
|
5
|
+
from being saved:</h2>
|
6
|
+
|
7
|
+
<ul>
|
8
|
+
<% language.errors.full_messages.each do |message| %>
|
9
|
+
<li><%= message %></li>
|
10
|
+
<% end %>
|
11
|
+
</ul>
|
12
|
+
</div>
|
13
|
+
<% end %>
|
14
|
+
|
15
|
+
<%= form.text_field :name, id: :language_name %>
|
16
|
+
|
17
|
+
|
18
|
+
<%= form.submit t('form.send') %>
|
19
|
+
|
20
|
+
<% end %>
|
@@ -0,0 +1,27 @@
|
|
1
|
+
<p id="notice"><%= notice %></p>
|
2
|
+
|
3
|
+
<h1>Languages</h1>
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<th>Name</th>
|
9
|
+
<th colspan="3"></th>
|
10
|
+
</tr>
|
11
|
+
</thead>
|
12
|
+
|
13
|
+
<tbody>
|
14
|
+
<% @languages.each do |language| %>
|
15
|
+
<tr>
|
16
|
+
<td><%= language.name %></td>
|
17
|
+
<td><%= link_to 'Show', language %></td>
|
18
|
+
<td><%= link_to 'Edit', edit_language_path(language) %></td>
|
19
|
+
<td><%= link_to 'Destroy', language, method: :delete, data: {confirm: 'Are you sure?'} %></td>
|
20
|
+
</tr>
|
21
|
+
<% end %>
|
22
|
+
</tbody>
|
23
|
+
</table>
|
24
|
+
|
25
|
+
<br>
|
26
|
+
|
27
|
+
<%= link_to 'New Language', new_language_path %>
|
@@ -0,0 +1 @@
|
|
1
|
+
<h1>Protected Home</h1>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
require 'elasticsearch'
|
2
|
+
|
3
|
+
config = YAML.load(ERB.new(File.read(File.join(Rails.root, 'config', 'elasticsearch.yml'))).result)
|
4
|
+
el_config = config[Rails.env]
|
5
|
+
$elasticsearch = Elasticsearch::Client.new log: true, hosts: el_config['hosts'], user: el_config['user'], password: el_config['password'], scheme: el_config['scheme']
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
+
|
3
|
+
en:
|
4
|
+
devise:
|
5
|
+
confirmations:
|
6
|
+
confirmed: "Your email address has been successfully confirmed."
|
7
|
+
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
|
8
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
|
9
|
+
failure:
|
10
|
+
already_authenticated: "You are already signed in."
|
11
|
+
inactive: "Your account is not activated yet."
|
12
|
+
invalid: "Invalid %{authentication_keys} or password."
|
13
|
+
locked: "Your account is locked."
|
14
|
+
last_attempt: "You have one more attempt before your account is locked."
|
15
|
+
not_found_in_database: "Invalid %{authentication_keys} or password."
|
16
|
+
timeout: "Your session expired. Please sign in again to continue."
|
17
|
+
unauthenticated: "You need to sign in or sign up before continuing."
|
18
|
+
unconfirmed: "You have to confirm your email address before continuing."
|
19
|
+
mailer:
|
20
|
+
confirmation_instructions:
|
21
|
+
subject: "Confirmation instructions"
|
22
|
+
reset_password_instructions:
|
23
|
+
subject: "Reset password instructions"
|
24
|
+
unlock_instructions:
|
25
|
+
subject: "Unlock instructions"
|
26
|
+
email_changed:
|
27
|
+
subject: "Email Changed"
|
28
|
+
password_change:
|
29
|
+
subject: "Password Changed"
|
30
|
+
omniauth_callbacks:
|
31
|
+
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
32
|
+
success: "Successfully authenticated from %{kind} account."
|
33
|
+
passwords:
|
34
|
+
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
35
|
+
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
|
36
|
+
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
37
|
+
updated: "Your password has been changed successfully. You are now signed in."
|
38
|
+
updated_not_active: "Your password has been changed successfully."
|
39
|
+
registrations:
|
40
|
+
destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
|
41
|
+
signed_up: "Welcome! You have signed up successfully."
|
42
|
+
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
43
|
+
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
44
|
+
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
|
45
|
+
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
|
46
|
+
updated: "Your account has been updated successfully."
|
47
|
+
sessions:
|
48
|
+
signed_in: "Signed in successfully."
|
49
|
+
signed_out: "Signed out successfully."
|
50
|
+
already_signed_out: "Signed out successfully."
|
51
|
+
unlocks:
|
52
|
+
send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
|
53
|
+
send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
|
54
|
+
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
55
|
+
errors:
|
56
|
+
messages:
|
57
|
+
already_confirmed: "was already confirmed, please try signing in"
|
58
|
+
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
59
|
+
expired: "has expired, please request a new one"
|
60
|
+
not_found: "not found"
|
61
|
+
not_locked: "was not locked"
|
62
|
+
not_saved:
|
63
|
+
one: "1 error prohibited this %{resource} from being saved:"
|
64
|
+
other: "%{count} errors prohibited this %{resource} from being saved:"
|
data/config/routes.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
namespace :admin do
|
3
|
+
resources :languages
|
4
|
+
|
5
|
+
root to: 'home#index'
|
6
|
+
end
|
7
|
+
|
8
|
+
namespace :protected do
|
9
|
+
root to: 'home#index'
|
10
|
+
end
|
11
|
+
|
12
|
+
scope '/:locale', constraints: {locale: /[a-z][a-z]/} do
|
13
|
+
get 'categories' => 'categories#index'
|
14
|
+
get 'categories/:id' => 'categories#show'
|
15
|
+
|
16
|
+
root to: 'home#index', as: :locale_root
|
17
|
+
end
|
18
|
+
|
19
|
+
devise_for :users, controllers: {registrations: 'registration'}
|
20
|
+
devise_for :admins
|
21
|
+
|
22
|
+
root to: 'home#redirect_to_locale'
|
23
|
+
end
|
data/db/seeds.rb
ADDED
data/lib/odania.rb
CHANGED
@@ -1,60 +1,11 @@
|
|
1
|
-
require '
|
2
|
-
require '
|
3
|
-
require '
|
4
|
-
require '
|
5
|
-
require '
|
6
|
-
require '
|
7
|
-
require 'deep_merge'
|
8
|
-
require 'json'
|
9
|
-
require 'socket'
|
10
|
-
require 'logger'
|
1
|
+
require 'devise'
|
2
|
+
require 'devise-i18n'
|
3
|
+
require 'http_accept_language'
|
4
|
+
require 'mongoid'
|
5
|
+
require 'kaminari/mongoid'
|
6
|
+
require 'simple_enum/mongoid'
|
11
7
|
|
12
|
-
|
13
|
-
ENVIRONMENT = ENV['ENVIRONMENT'].nil? ? 'development' : ENV['ENVIRONMENT']
|
14
|
-
LOCAL_TEST_MODE = 'development'.eql?(ENVIRONMENT) unless defined? LOCAL_TEST_MODE
|
15
|
-
$logger = Logger.new(STDOUT)
|
8
|
+
require_relative 'odania/engine'
|
16
9
|
|
17
10
|
module Odania
|
18
|
-
autoload :Config, 'odania/config'
|
19
|
-
autoload :Consul, 'odania/consul'
|
20
|
-
autoload :Plugin, 'odania/plugin'
|
21
|
-
|
22
|
-
def self.plugin
|
23
|
-
Odania.configure
|
24
|
-
@plugin = Plugin.new(@consul) if @plugin.nil?
|
25
|
-
@plugin
|
26
|
-
end
|
27
|
-
|
28
|
-
def self.consul
|
29
|
-
Odania.configure
|
30
|
-
@consul
|
31
|
-
end
|
32
|
-
|
33
|
-
def self.configure(consul_url=nil)
|
34
|
-
@consul = Consul.new(consul_url) if @consul.nil?
|
35
|
-
$debug = false
|
36
|
-
end
|
37
|
-
|
38
|
-
def self.ips
|
39
|
-
ips = []
|
40
|
-
Socket.ip_address_list.each do |address|
|
41
|
-
ip = address.ip_address
|
42
|
-
ips << ip unless %w(127.0.0.1 ::1).include? ip
|
43
|
-
end
|
44
|
-
ips
|
45
|
-
end
|
46
|
-
|
47
|
-
# Rancher assigns two ip's the ip starting with 10. is routed through the hosts
|
48
|
-
def self.primary_ip(ips)
|
49
|
-
ips.each do |ip|
|
50
|
-
return ip if ip.start_with? '10.'
|
51
|
-
end
|
52
|
-
|
53
|
-
ips.first
|
54
|
-
end
|
55
|
-
|
56
|
-
def self.varnish_sanitize(name)
|
57
|
-
raise 'Could not sanitize varnish name!!' if name.nil?
|
58
|
-
name.gsub(/[^0-9a-zA-Z_]/, '_')
|
59
|
-
end
|
60
11
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'rack/cors'
|
2
|
+
|
3
|
+
module Odania
|
4
|
+
class Engine < ::Rails::Engine
|
5
|
+
initializer 'odania.middleware' do |app|
|
6
|
+
app.config.app_middleware.insert_before 0, Rack::Cors do
|
7
|
+
allow do
|
8
|
+
origins '*'
|
9
|
+
resource '*/api/*', :headers => :any, :methods => [:get, :post, :put, :options, :delete, :patch]
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
data/lib/odania/version.rb
CHANGED
@@ -0,0 +1,27 @@
|
|
1
|
+
<%%= form_with(model: <%= singular_table_name %>, local: true, builder: StandardFormBuilder) do |form| %>
|
2
|
+
<%% if <%= singular_table_name %>.errors.any? %>
|
3
|
+
<div id="error_explanation">
|
4
|
+
<h2><%%= pluralize(<%= singular_table_name %>.errors.count, "error") %> prohibited this <%= singular_table_name %>
|
5
|
+
from being saved:</h2>
|
6
|
+
|
7
|
+
<ul>
|
8
|
+
<%% <%= singular_table_name %>.errors.full_messages.each do |message| %>
|
9
|
+
<li><%%= message %></li>
|
10
|
+
<%% end %>
|
11
|
+
</ul>
|
12
|
+
</div>
|
13
|
+
<%% end %>
|
14
|
+
|
15
|
+
<% attributes.each do |attribute| -%>
|
16
|
+
<% if attribute.password_digest? -%>
|
17
|
+
<%%= form.password_field :password, id: :<%= field_id(:password) %> %>
|
18
|
+
<%%= form.password_field :password_confirmation, id: :<%= field_id(:password_confirmation) %> %>
|
19
|
+
<% else -%>
|
20
|
+
<%%= form.<%= attribute.field_type %> :<%= attribute.column_name %>, id: :<%= field_id(attribute.column_name) %> %>
|
21
|
+
<% end -%>
|
22
|
+
|
23
|
+
<% end -%>
|
24
|
+
|
25
|
+
<%%= form.submit t('form.send') %>
|
26
|
+
|
27
|
+
<%% end %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<p id="notice"><%%= notice %></p>
|
2
|
+
|
3
|
+
<h1><%= plural_table_name.titleize %></h1>
|
4
|
+
|
5
|
+
<table>
|
6
|
+
<thead>
|
7
|
+
<tr>
|
8
|
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
9
|
+
<th><%= attribute.human_name %></th>
|
10
|
+
<% end -%>
|
11
|
+
<th colspan="3"></th>
|
12
|
+
</tr>
|
13
|
+
</thead>
|
14
|
+
|
15
|
+
<tbody>
|
16
|
+
<%% @<%= plural_table_name %>.each do |<%= singular_table_name %>| %>
|
17
|
+
<tr>
|
18
|
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
19
|
+
<td><%%= <%= singular_table_name %>.<%= attribute.name %> %></td>
|
20
|
+
<% end -%>
|
21
|
+
<td><%%= link_to 'Show', <%= singular_table_name %> %></td>
|
22
|
+
<td><%%= link_to 'Edit', edit_<%= singular_table_name %>_path(<%= singular_table_name %>) %></td>
|
23
|
+
<td><%%= link_to 'Destroy', <%= singular_table_name %>, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
24
|
+
</tr>
|
25
|
+
<%% end %>
|
26
|
+
</tbody>
|
27
|
+
</table>
|
28
|
+
|
29
|
+
<br>
|
30
|
+
|
31
|
+
<%%= link_to 'New <%= singular_table_name.titleize %>', new_<%= singular_table_name %>_path %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<p id="notice"><%%= notice %></p>
|
2
|
+
|
3
|
+
<% attributes.reject(&:password_digest?).each do |attribute| -%>
|
4
|
+
<p>
|
5
|
+
<strong><%= attribute.human_name %>:</strong>
|
6
|
+
<%%= @<%= singular_table_name %>.<%= attribute.name %> %>
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<% end -%>
|
10
|
+
<%%= link_to 'Edit', edit_<%= singular_table_name %>_path(@<%= singular_table_name %>) %> |
|
11
|
+
<%%= link_to 'Back', <%= index_helper %>_path %>
|
metadata
CHANGED
@@ -1,51 +1,51 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: odania
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Petersen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
-
type: :
|
19
|
+
version: 5.1.1
|
20
|
+
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 5.1.1
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: mongoid
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
34
|
-
type: :
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: mongoid-paperclip
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
|
-
type: :
|
48
|
+
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
@@ -53,13 +53,27 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: simple_enum
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 2.3.0
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 2.3.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: elasticsearch
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
58
72
|
requirements:
|
59
73
|
- - ">="
|
60
74
|
- !ruby/object:Gem::Version
|
61
75
|
version: '0'
|
62
|
-
type: :
|
76
|
+
type: :runtime
|
63
77
|
prerelease: false
|
64
78
|
version_requirements: !ruby/object:Gem::Requirement
|
65
79
|
requirements:
|
@@ -67,13 +81,13 @@ dependencies:
|
|
67
81
|
- !ruby/object:Gem::Version
|
68
82
|
version: '0'
|
69
83
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
84
|
+
name: http_accept_language
|
71
85
|
requirement: !ruby/object:Gem::Requirement
|
72
86
|
requirements:
|
73
87
|
- - ">="
|
74
88
|
- !ruby/object:Gem::Version
|
75
89
|
version: '0'
|
76
|
-
type: :
|
90
|
+
type: :runtime
|
77
91
|
prerelease: false
|
78
92
|
version_requirements: !ruby/object:Gem::Requirement
|
79
93
|
requirements:
|
@@ -81,13 +95,13 @@ dependencies:
|
|
81
95
|
- !ruby/object:Gem::Version
|
82
96
|
version: '0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
98
|
+
name: rack-cors
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
86
100
|
requirements:
|
87
101
|
- - ">="
|
88
102
|
- !ruby/object:Gem::Version
|
89
103
|
version: '0'
|
90
|
-
type: :
|
104
|
+
type: :runtime
|
91
105
|
prerelease: false
|
92
106
|
version_requirements: !ruby/object:Gem::Requirement
|
93
107
|
requirements:
|
@@ -95,13 +109,13 @@ dependencies:
|
|
95
109
|
- !ruby/object:Gem::Version
|
96
110
|
version: '0'
|
97
111
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
112
|
+
name: devise
|
99
113
|
requirement: !ruby/object:Gem::Requirement
|
100
114
|
requirements:
|
101
115
|
- - ">="
|
102
116
|
- !ruby/object:Gem::Version
|
103
117
|
version: '0'
|
104
|
-
type: :
|
118
|
+
type: :runtime
|
105
119
|
prerelease: false
|
106
120
|
version_requirements: !ruby/object:Gem::Requirement
|
107
121
|
requirements:
|
@@ -109,13 +123,13 @@ dependencies:
|
|
109
123
|
- !ruby/object:Gem::Version
|
110
124
|
version: '0'
|
111
125
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
126
|
+
name: devise-i18n
|
113
127
|
requirement: !ruby/object:Gem::Requirement
|
114
128
|
requirements:
|
115
129
|
- - ">="
|
116
130
|
- !ruby/object:Gem::Version
|
117
131
|
version: '0'
|
118
|
-
type: :
|
132
|
+
type: :runtime
|
119
133
|
prerelease: false
|
120
134
|
version_requirements: !ruby/object:Gem::Requirement
|
121
135
|
requirements:
|
@@ -123,7 +137,7 @@ dependencies:
|
|
123
137
|
- !ruby/object:Gem::Version
|
124
138
|
version: '0'
|
125
139
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
140
|
+
name: kaminari
|
127
141
|
requirement: !ruby/object:Gem::Requirement
|
128
142
|
requirements:
|
129
143
|
- - ">="
|
@@ -137,7 +151,7 @@ dependencies:
|
|
137
151
|
- !ruby/object:Gem::Version
|
138
152
|
version: '0'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
154
|
+
name: kaminari-mongoid
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|
142
156
|
requirements:
|
143
157
|
- - ">="
|
@@ -151,13 +165,13 @@ dependencies:
|
|
151
165
|
- !ruby/object:Gem::Version
|
152
166
|
version: '0'
|
153
167
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
168
|
+
name: guard
|
155
169
|
requirement: !ruby/object:Gem::Requirement
|
156
170
|
requirements:
|
157
171
|
- - ">="
|
158
172
|
- !ruby/object:Gem::Version
|
159
173
|
version: '0'
|
160
|
-
type: :
|
174
|
+
type: :development
|
161
175
|
prerelease: false
|
162
176
|
version_requirements: !ruby/object:Gem::Requirement
|
163
177
|
requirements:
|
@@ -165,69 +179,111 @@ dependencies:
|
|
165
179
|
- !ruby/object:Gem::Version
|
166
180
|
version: '0'
|
167
181
|
- !ruby/object:Gem::Dependency
|
168
|
-
name:
|
182
|
+
name: guard-test
|
169
183
|
requirement: !ruby/object:Gem::Requirement
|
170
184
|
requirements:
|
171
185
|
- - ">="
|
172
186
|
- !ruby/object:Gem::Version
|
173
187
|
version: '0'
|
174
|
-
type: :
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: factory_girl
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
175
203
|
prerelease: false
|
176
204
|
version_requirements: !ruby/object:Gem::Requirement
|
177
205
|
requirements:
|
178
206
|
- - ">="
|
179
207
|
- !ruby/object:Gem::Version
|
180
208
|
version: '0'
|
181
|
-
description:
|
209
|
+
description: Odania Base Helper
|
182
210
|
email:
|
183
211
|
- mike@odania-it.de
|
184
212
|
executables: []
|
185
213
|
extensions: []
|
186
214
|
extra_rdoc_files: []
|
187
215
|
files:
|
188
|
-
-
|
189
|
-
- ".gitignore"
|
190
|
-
- ".rspec"
|
191
|
-
- ".rubocop.yml"
|
192
|
-
- ".travis.yml"
|
193
|
-
- Gemfile
|
194
|
-
- Gemfile.lock
|
195
|
-
- Guardfile
|
196
|
-
- LICENSE.txt
|
216
|
+
- MIT-LICENSE
|
197
217
|
- README.md
|
198
218
|
- Rakefile
|
199
|
-
-
|
200
|
-
-
|
201
|
-
-
|
219
|
+
- app/assets/config/odania_manifest.js
|
220
|
+
- app/assets/javascripts/application.js
|
221
|
+
- app/assets/javascripts/textAngular.js
|
222
|
+
- app/assets/javascripts/textAngular/textAngular-rangy.min.js
|
223
|
+
- app/assets/javascripts/textAngular/textAngular-sanitize.min.js
|
224
|
+
- app/assets/javascripts/textAngular/textAngular.min.js
|
225
|
+
- app/assets/stylesheets/scaffold.css
|
226
|
+
- app/assets/stylesheets/textAngular/application.css
|
227
|
+
- app/assets/stylesheets/textAngular/textAngular.css
|
228
|
+
- app/controllers/admin/home_controller.rb
|
229
|
+
- app/controllers/admin/languages_controller.rb
|
230
|
+
- app/controllers/admin_controller.rb
|
231
|
+
- app/controllers/application_controller.rb
|
232
|
+
- app/controllers/categories_controller.rb
|
233
|
+
- app/controllers/home_controller.rb
|
234
|
+
- app/controllers/protected/home_controller.rb
|
235
|
+
- app/controllers/protected_controller.rb
|
236
|
+
- app/controllers/registration_controller.rb
|
237
|
+
- app/helpers/standard_form_builder.rb
|
238
|
+
- app/helpers/standard_form_helper.rb
|
239
|
+
- app/models/admin.rb
|
240
|
+
- app/models/language.rb
|
241
|
+
- app/models/user.rb
|
242
|
+
- app/views/admin/home/index.html.erb
|
243
|
+
- app/views/admin/languages/_form.html.erb
|
244
|
+
- app/views/admin/languages/_language.json.jbuilder
|
245
|
+
- app/views/admin/languages/edit.html.erb
|
246
|
+
- app/views/admin/languages/index.html.erb
|
247
|
+
- app/views/admin/languages/index.json.jbuilder
|
248
|
+
- app/views/admin/languages/new.html.erb
|
249
|
+
- app/views/admin/languages/show.html.erb
|
250
|
+
- app/views/admin/languages/show.json.jbuilder
|
251
|
+
- app/views/categories/index.html.erb
|
252
|
+
- app/views/categories/show.html.erb
|
253
|
+
- app/views/devise/confirmations/new.html.erb
|
254
|
+
- app/views/devise/mailer/confirmation_instructions.html.erb
|
255
|
+
- app/views/devise/mailer/email_changed.html.erb
|
256
|
+
- app/views/devise/mailer/password_change.html.erb
|
257
|
+
- app/views/devise/mailer/reset_password_instructions.html.erb
|
258
|
+
- app/views/devise/mailer/unlock_instructions.html.erb
|
259
|
+
- app/views/devise/passwords/edit.html.erb
|
260
|
+
- app/views/devise/passwords/new.html.erb
|
261
|
+
- app/views/devise/registrations/edit.html.erb
|
262
|
+
- app/views/devise/registrations/new.html.erb
|
263
|
+
- app/views/devise/sessions/new.html.erb
|
264
|
+
- app/views/devise/shared/_links.html.erb
|
265
|
+
- app/views/devise/unlocks/new.html.erb
|
266
|
+
- app/views/home/index.html.erb
|
267
|
+
- app/views/languages/_form.html.erb
|
268
|
+
- app/views/languages/edit.html.erb
|
269
|
+
- app/views/languages/index.html.erb
|
270
|
+
- app/views/languages/new.html.erb
|
271
|
+
- app/views/languages/show.html.erb
|
272
|
+
- app/views/protected/home/index.html.erb
|
273
|
+
- config/initializers/elasticsearch.rb
|
274
|
+
- config/locales/devise.en.yml
|
275
|
+
- config/routes.rb
|
276
|
+
- db/seeds.rb
|
202
277
|
- lib/odania.rb
|
203
|
-
- lib/odania/
|
204
|
-
- lib/odania/config/backend.rb
|
205
|
-
- lib/odania/config/backend_group.rb
|
206
|
-
- lib/odania/config/domain.rb
|
207
|
-
- lib/odania/config/duplicates.rb
|
208
|
-
- lib/odania/config/global_config.rb
|
209
|
-
- lib/odania/config/layout.rb
|
210
|
-
- lib/odania/config/page.rb
|
211
|
-
- lib/odania/config/page_base.rb
|
212
|
-
- lib/odania/config/plugin_config.rb
|
213
|
-
- lib/odania/config/style.rb
|
214
|
-
- lib/odania/config/sub_domain.rb
|
215
|
-
- lib/odania/config/subdomain_config.rb
|
216
|
-
- lib/odania/consul.rb
|
217
|
-
- lib/odania/plugin.rb
|
278
|
+
- lib/odania/engine.rb
|
218
279
|
- lib/odania/version.rb
|
219
|
-
-
|
220
|
-
-
|
221
|
-
-
|
222
|
-
-
|
223
|
-
-
|
224
|
-
-
|
225
|
-
|
226
|
-
- spec/spec_helper.rb
|
227
|
-
- spec/support/consul_mock.rb
|
228
|
-
- tasks/odania.rake
|
229
|
-
- tasks/rspec.rake
|
230
|
-
homepage: http://www.odania.com
|
280
|
+
- lib/tasks/odania_tasks.rake
|
281
|
+
- lib/templates/erb/scaffold/_form.html.erb
|
282
|
+
- lib/templates/erb/scaffold/edit.html.erb
|
283
|
+
- lib/templates/erb/scaffold/index.html.erb
|
284
|
+
- lib/templates/erb/scaffold/new.html.erb
|
285
|
+
- lib/templates/erb/scaffold/show.html.erb
|
286
|
+
homepage: https://www.odania.com
|
231
287
|
licenses:
|
232
288
|
- MIT
|
233
289
|
metadata: {}
|
@@ -247,19 +303,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
247
303
|
version: '0'
|
248
304
|
requirements: []
|
249
305
|
rubyforge_project:
|
250
|
-
rubygems_version: 2.
|
306
|
+
rubygems_version: 2.6.8
|
251
307
|
signing_key:
|
252
308
|
specification_version: 4
|
253
|
-
summary:
|
254
|
-
test_files:
|
255
|
-
- features/plugin.feature
|
256
|
-
- features/step_definitions/plugin_steps.rb
|
257
|
-
- features/support/env.rb
|
258
|
-
- spec/fixtures/global_config.json
|
259
|
-
- spec/fixtures/plugin_config_1.json
|
260
|
-
- spec/lib/odania/config/global_config_spec.rb
|
261
|
-
- spec/lib/odania/config/plugin_config_spec.rb
|
262
|
-
- spec/lib/odania/plugin_spec.rb
|
263
|
-
- spec/lib/odania_spec.rb
|
264
|
-
- spec/spec_helper.rb
|
265
|
-
- spec/support/consul_mock.rb
|
309
|
+
summary: Base for a Odania Web Application
|
310
|
+
test_files: []
|