goldencobra 1.2.0 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/assets/images/goldencobra/chosen-sprite.png +0 -0
- data/app/assets/javascripts/goldencobra/active_admin.js +14 -23
- data/app/assets/javascripts/goldencobra/chosen.jquery.min.js +2 -10
- data/app/assets/stylesheets/goldencobra/chosen.css +312 -274
- data/app/controllers/goldencobra/application_controller.rb +8 -1
- data/app/controllers/goldencobra/articles_controller.rb +2 -20
- data/app/controllers/goldencobra/manage_controller.rb +6 -2
- data/app/helpers/goldencobra/articles_helper.rb +20 -0
- data/app/helpers/goldencobra/navigation_helper.rb +39 -13
- data/app/models/ability.rb +2 -0
- data/app/models/goldencobra/article.rb +5 -6
- data/app/models/goldencobra/article_image.rb +2 -0
- data/app/models/goldencobra/article_widget.rb +2 -0
- data/app/models/goldencobra/author.rb +2 -0
- data/app/models/goldencobra/comment.rb +2 -0
- data/app/models/goldencobra/domain.rb +16 -0
- data/app/models/goldencobra/help.rb +2 -0
- data/app/models/goldencobra/import_metadata.rb +2 -0
- data/app/models/goldencobra/location.rb +3 -1
- data/app/models/goldencobra/menue.rb +2 -2
- data/app/models/goldencobra/metatag.rb +2 -0
- data/app/models/goldencobra/permission.rb +2 -0
- data/app/models/goldencobra/role.rb +2 -0
- data/app/models/goldencobra/role_user.rb +2 -0
- data/app/models/goldencobra/setting.rb +2 -0
- data/app/models/goldencobra/tracking.rb +2 -0
- data/app/models/goldencobra/upload.rb +4 -2
- data/app/models/goldencobra/vita.rb +2 -0
- data/app/models/translation.rb +2 -0
- data/app/models/user.rb +2 -0
- data/app/models/visitor.rb +2 -0
- data/app/views/goldencobra/admin/articles/_articles_index.html.erb +3 -3
- data/app/views/goldencobra/admin/articles/_image_module_sidebar.html.erb +2 -4
- data/app/views/goldencobra/admin/articles/_link_checker.html.erb +2 -1
- data/app/views/goldencobra/admin/articles/_link_checker_index.html.erb +1 -0
- data/app/views/goldencobra/admin/articles/_select_article_type.html.erb +12 -13
- data/app/views/goldencobra/admin/articles/_widgets_sidebar.html.erb +3 -2
- data/app/views/goldencobra/admin/shared/_help.html.erb +15 -0
- data/app/views/goldencobra/admin/shared/_item.html.erb +3 -3
- data/app/views/goldencobra/articles/_headers.html.erb +6 -1
- data/app/views/goldencobra/articles/_navigation_menue.html.erb +6 -0
- data/app/views/goldencobra/articles/_show.html.erb +5 -5
- data/app/worker/articles_cache_worker.rb +1 -1
- data/config/initializers/liquid_tags.rb +47 -4
- data/config/initializers/papertrail_versions.rb +1 -0
- data/config/locales/active_admin.de.yml +8 -8
- data/config/locales/active_admin.en.yml +0 -4
- data/config/locales/activerecord.de.yml +1 -1
- data/config/locales/activerecord.en.yml +5 -2
- data/config/locales/article_types.de.yml +3 -16
- data/config/locales/article_types.en.yml +23 -0
- data/config/locales/devise.de.yml +0 -1
- data/config/locales/devise.en.yml +0 -1
- data/config/locales/en.yml +7 -0
- data/config/locales/goldencobra.de.yml +37 -1
- data/config/settings.yml +2 -0
- data/db/migrate/20131129143509_add_remote_to_goldencobra_menues.rb +5 -0
- data/db/migrate/20131216110750_add_main_to_goldencobra_domains.rb +7 -0
- data/lib/generators/goldencobra/articletype/templates/edit_index.html.erb +7 -7
- data/lib/goldencobra/select_current_client.rb +1 -0
- data/lib/goldencobra/version.rb +3 -1
- data/lib/tasks/cap_info.rb +30 -0
- data/lib/tasks/goldencobra_tasks.rake +2 -0
- data/lib/tasks/i18n.rake +2 -0
- data/lib/tasks/import.rake +47 -9
- metadata +17 -10
data/config/settings.yml
CHANGED
@@ -1,9 +1,9 @@
|
|
1
|
-
<% f.inputs "
|
2
|
-
<% f.input :index_of_articles_tagged_with, :hint => "Auf der
|
3
|
-
<% f.input :not_tagged_with, :
|
4
|
-
<% f.input :
|
1
|
+
<% f.inputs "Artikelübersicht einschränken" do %>
|
2
|
+
<% f.input :index_of_articles_tagged_with, :label => "Artikel mit folgenden Tags", :hint => "Auf der Übersichtsseite werden alle Artikel des gleichen Artikeltyps mit diesen Tags ausgegeben. Sind keine Tags angegeben, werden alle Artikel des gleichen Artikeltyps ausgegeben."%>
|
3
|
+
<% f.input :not_tagged_with, :label => "Artikel ohne folgende Tags", :hint => "Artikel mit diesen Tags nicht anzeigen!" %>
|
4
|
+
<% f.input :sorter_limit, :label => "Anzahl anzuzeigender Artikel", :hint => "Wieviel Artikel sollen maximal auf der Übersichtsseite erscheinen?" %>
|
5
5
|
<% sort_options = Goldencobra::Article::SortOptions %>
|
6
|
-
<% f.input :sort_order, as: :select, collection: sort_options, include_blank: false %>
|
7
|
-
<% f.input :
|
8
|
-
<% f.input :
|
6
|
+
<% f.input :sort_order, :hint => "Created_at - Reihenfolge nach Erstellungsdatum | Updated_at - Reihenfolge nach Aktualisierungsdatum | Random - Reihenfolge zufällig | Alphabetically - Reihenfolge alphabetisch", as: :select, collection: sort_options, include_blank: false %>
|
7
|
+
<% f.input :reverse_sort, hint: "Soll absteigend sortiert werden? Standard: aufsteigend" %>
|
8
|
+
<% f.input :use_frontend_tags, :label => "Filterauswahl einblenden?", hint: "Soll eine Möglichkeit zur Filterung nach vorhandenen Tags eingeblendet werden?" %>
|
9
9
|
<% end %>
|
@@ -21,6 +21,7 @@ module Goldencobra
|
|
21
21
|
def determine_client
|
22
22
|
@current_client = Goldencobra::Domain.find_by_hostname(request.host) || Goldencobra::Domain.first
|
23
23
|
Goldencobra::Domain.current = @current_client
|
24
|
+
Goldencobra::Article::LiquidParser["current_client"] = @current_client
|
24
25
|
end
|
25
26
|
|
26
27
|
def add_view_path_for_client
|
data/lib/goldencobra/version.rb
CHANGED
@@ -0,0 +1,30 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# run in a cap-managed project to get pertinent variable info
|
4
|
+
# output in YAML
|
5
|
+
|
6
|
+
require 'rubygems'
|
7
|
+
require 'capistrano/configuration'
|
8
|
+
require 'pp'
|
9
|
+
|
10
|
+
config = Capistrano::Configuration.new
|
11
|
+
config.load("Capfile")
|
12
|
+
config.logger.level = 1 # -v
|
13
|
+
|
14
|
+
for stage in config.stages do
|
15
|
+
stage_config = Capistrano::Configuration.new
|
16
|
+
stage_config.load("Capfile")
|
17
|
+
stage_config.logger.level = 1 # -v
|
18
|
+
stage_config.find_and_execute_task(stage)
|
19
|
+
puts "#{stage}:"
|
20
|
+
puts " gateway: #{stage_config[:gateway]}"
|
21
|
+
puts " user: #{stage_config[:ssh_options][:user]}"
|
22
|
+
puts " deploy_to: #{stage_config[:deploy_to]}"
|
23
|
+
puts " roles:"
|
24
|
+
for role in stage_config.roles do
|
25
|
+
puts " #{role[0]}:"
|
26
|
+
for server in role[1].servers do
|
27
|
+
puts " - #{server}"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
data/lib/tasks/i18n.rake
CHANGED
data/lib/tasks/import.rake
CHANGED
@@ -1,16 +1,54 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
namespace :db do
|
4
|
+
desc 'Dump DB to backup.sql'
|
5
|
+
task :dump => :environment do
|
6
|
+
server_config = ActiveRecord::Base.configurations["production"]
|
7
|
+
remote_db = server_config["database"]
|
8
|
+
user_name = server_config["username"]
|
9
|
+
password = server_config["password"]
|
10
|
+
system("mysqldump --opt --add-drop-table -hlocalhost -u#{user_name} -p#{password} #{remote_db} > backup.sql")
|
11
|
+
end
|
12
|
+
|
13
|
+
|
2
14
|
desc 'Import Production Database to local Database'
|
3
15
|
task :import => :environment do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
16
|
+
puts "Your lokal database will be overwritten by server db! Are you sure? (yes)"
|
17
|
+
input = STDIN.gets.strip
|
18
|
+
if ["yes", "Yes", "Y", "y", "YES"].include?(input)
|
19
|
+
local_config = ActiveRecord::Base.configurations["development"]
|
20
|
+
if defined?(Capistrano) == "constant"
|
21
|
+
puts "Loading remote configuration..."
|
22
|
+
config = Capistrano::Configuration.new
|
23
|
+
config.load("Capfile")
|
24
|
+
config.logger.level = 1
|
25
|
+
ssh_user = config[:user]
|
26
|
+
ssh_server = config[:ip_address]
|
27
|
+
deploy_to = config[:deploy_to]
|
28
|
+
puts "Connecting to #{ssh_user}@#{ssh_server} and generating db dump..."
|
29
|
+
system("cap invoke COMMAND='cd #{deploy_to}/current && RAILS_ENV=production bundle exec rake db:dump'")
|
30
|
+
puts "MysqlDump created on server as 'backup.sql'. Transfering data..."
|
31
|
+
local_db_password = ""
|
32
|
+
if local_config['password'].present?
|
33
|
+
local_db_password = "-p#{local_config['password']}"
|
34
|
+
end
|
35
|
+
system("ssh -C #{ssh_user}@#{ssh_server} less #{deploy_to}/current/backup.sql |mysql -u#{local_config['username']} #{local_db_password} #{local_config['database']}")
|
36
|
+
puts "Dumpfile copied and transfered to local DB: #{local_config['username']}@#{local_config['database']}"
|
37
|
+
else
|
38
|
+
remote_db = ENV['REMOTE']
|
39
|
+
user_name = ENV['USER']
|
40
|
+
password = ENV['PASSWORD']
|
41
|
+
server = ENV['SERVER']
|
42
|
+
if server.present? &&
|
43
|
+
system("ssh -C #{server} mysqldump --opt --add-drop-table -hlocalhost -u#{user_name} -p#{password} #{remote_db} |mysql -u#{local_config['username']} -p#{local_config['password']} #{local_config['database']}")
|
44
|
+
else
|
45
|
+
puts "Missing Attributes! e.g.:"
|
46
|
+
puts "rake db:import SERVER=taurus REMOTE=db_qvnia USER=user_qvnia PASSWORD=yq1rx5qiHIz"
|
47
|
+
end
|
48
|
+
end
|
11
49
|
else
|
12
|
-
puts "
|
13
|
-
puts "rake db:import SERVER=taurus LOCAL=qvnia_development REMOTE=db_qvnia USER=user_qvnia PASSWORD=yq1rx5qiHIz"
|
50
|
+
puts "Import-Task aborted"
|
14
51
|
end
|
52
|
+
|
15
53
|
end
|
16
54
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: goldencobra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-
|
13
|
+
date: 2013-12-16 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: coffee-script-source
|
@@ -161,33 +161,33 @@ dependencies:
|
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
162
162
|
none: false
|
163
163
|
requirements:
|
164
|
-
- -
|
164
|
+
- - '='
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 2.0.0
|
167
167
|
type: :runtime
|
168
168
|
prerelease: false
|
169
169
|
version_requirements: !ruby/object:Gem::Requirement
|
170
170
|
none: false
|
171
171
|
requirements:
|
172
|
-
- -
|
172
|
+
- - '='
|
173
173
|
- !ruby/object:Gem::Version
|
174
|
-
version:
|
174
|
+
version: 2.0.0
|
175
175
|
- !ruby/object:Gem::Dependency
|
176
176
|
name: sunspot_solr
|
177
177
|
requirement: !ruby/object:Gem::Requirement
|
178
178
|
none: false
|
179
179
|
requirements:
|
180
|
-
- -
|
180
|
+
- - '='
|
181
181
|
- !ruby/object:Gem::Version
|
182
|
-
version:
|
182
|
+
version: 2.0.0
|
183
183
|
type: :runtime
|
184
184
|
prerelease: false
|
185
185
|
version_requirements: !ruby/object:Gem::Requirement
|
186
186
|
none: false
|
187
187
|
requirements:
|
188
|
-
- -
|
188
|
+
- - '='
|
189
189
|
- !ruby/object:Gem::Version
|
190
|
-
version:
|
190
|
+
version: 2.0.0
|
191
191
|
- !ruby/object:Gem::Dependency
|
192
192
|
name: sprockets
|
193
193
|
requirement: !ruby/object:Gem::Requirement
|
@@ -2216,6 +2216,7 @@ files:
|
|
2216
2216
|
- app/views/goldencobra/admin/articles/_widgets_sidebar.html.erb
|
2217
2217
|
- app/views/goldencobra/admin/articles/toggle_expert_mode.js.erb
|
2218
2218
|
- app/views/goldencobra/admin/helps/_index.html.erb
|
2219
|
+
- app/views/goldencobra/admin/shared/_help.html.erb
|
2219
2220
|
- app/views/goldencobra/admin/shared/_item.html.erb
|
2220
2221
|
- app/views/goldencobra/admin/shared/_next_item.html.erb
|
2221
2222
|
- app/views/goldencobra/admin/shared/_overview.html.erb
|
@@ -2224,6 +2225,7 @@ files:
|
|
2224
2225
|
- app/views/goldencobra/articles/_bugherd.html.erb
|
2225
2226
|
- app/views/goldencobra/articles/_edit_article_link.html.erb
|
2226
2227
|
- app/views/goldencobra/articles/_headers.html.erb
|
2228
|
+
- app/views/goldencobra/articles/_navigation_menue.html.erb
|
2227
2229
|
- app/views/goldencobra/articles/_show.html.erb
|
2228
2230
|
- app/views/goldencobra/articles/show.html.erb
|
2229
2231
|
- app/views/goldencobra/articles/show.rss.builder
|
@@ -2254,12 +2256,14 @@ files:
|
|
2254
2256
|
- config/initializers/liquid_tags.rb
|
2255
2257
|
- config/initializers/locale.rb
|
2256
2258
|
- config/initializers/notification.rb
|
2259
|
+
- config/initializers/papertrail_versions.rb
|
2257
2260
|
- config/initializers/settings.rb
|
2258
2261
|
- config/locales/active_admin.de.yml
|
2259
2262
|
- config/locales/active_admin.en.yml
|
2260
2263
|
- config/locales/activerecord.de.yml
|
2261
2264
|
- config/locales/activerecord.en.yml
|
2262
2265
|
- config/locales/article_types.de.yml
|
2266
|
+
- config/locales/article_types.en.yml
|
2263
2267
|
- config/locales/de.yml
|
2264
2268
|
- config/locales/devise.de.yml
|
2265
2269
|
- config/locales/devise.en.yml
|
@@ -2379,6 +2383,8 @@ files:
|
|
2379
2383
|
- db/migrate/20130909143144_create_goldencobra_domains.rb
|
2380
2384
|
- db/migrate/20130925133203_add_prefix_to_goldencobra_domains.rb
|
2381
2385
|
- db/migrate/20131018111343_add_cache_to_goldencobra_menues.rb
|
2386
|
+
- db/migrate/20131129143509_add_remote_to_goldencobra_menues.rb
|
2387
|
+
- db/migrate/20131216110750_add_main_to_goldencobra_domains.rb
|
2382
2388
|
- db/seeds.rb
|
2383
2389
|
- lib/generators/goldencobra/articletype/articletype_generator.rb
|
2384
2390
|
- lib/generators/goldencobra/articletype/templates/edit_index.html.erb
|
@@ -2424,6 +2430,7 @@ files:
|
|
2424
2430
|
- lib/goldencobra/select_current_client.rb
|
2425
2431
|
- lib/goldencobra/version.rb
|
2426
2432
|
- lib/goldencobra.rb
|
2433
|
+
- lib/tasks/cap_info.rb
|
2427
2434
|
- lib/tasks/goldencobra_tasks.rake
|
2428
2435
|
- lib/tasks/i18n.rake
|
2429
2436
|
- lib/tasks/import.rake
|