refinerycms-core 1.0.8 → 1.0.9

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.
@@ -1,6 +1,6 @@
1
1
  <head>
2
2
  <meta charset='<%= ::Refinery::Application.config.encoding %>' />
3
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
3
+ <!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><![endif]-->
4
4
  <title><%= browser_title(yield(:title)) %></title>
5
5
  <%= raw "<meta name=\"description\" content=\"#{@meta.meta_description}\" />" if @meta.meta_description.present? -%>
6
6
  <%= raw "<meta name=\"keywords\" content=\"#{@meta.meta_keywords}\">" if @meta.meta_keywords.present? -%>
@@ -0,0 +1,78 @@
1
+ bg:
2
+ js:
3
+ admin:
4
+ confirm_changes: Всички промени, които сте направили ще бъдат загубени. Сигурни ли сте, че искате да продължите без запис?
5
+ plugins:
6
+ refinery_core:
7
+ title: Refinery
8
+ description: Основна добавка за Refinery
9
+ refinery_dialogs:
10
+ title: Dialogs
11
+ description: Добавка за диалози за Refinery
12
+ welcome:
13
+ there_are_no_users: "Все още няма потребители, затова ще създадем първо Вашия."
14
+ remember_admin_location: "Запомнете, че административната зона на Refinery се намира в:"
15
+ lets_start: Добре, нека да направим настройките Ви за вход...
16
+ continue: Продължение...
17
+ admin:
18
+ menu:
19
+ reorder_menu: Пренареждане на менюто
20
+ reorder_menu_done: Запис на текущото подреждане на менюто
21
+ dialogs:
22
+ show:
23
+ save: Запис
24
+ cancel: Отказ
25
+ refinery:
26
+ crudify:
27
+ created: 'Елемента "%{what}" бе създаден успешно.'
28
+ updated: 'Елемента "%{what}" бе актуализиран успешно.'
29
+ destroyed: 'Елемента "%{what}" бе премахнат успешно.'
30
+ shared:
31
+ site_bar:
32
+ log_out: Изход
33
+ switch_to_your_website: Превключване към Вашия сайт
34
+ switch_to_your_website_editor: Превключване към редактора на Вашия сайт
35
+ admin:
36
+ continue_editing:
37
+ save_and_continue_editing: 'Запис и продължение'
38
+ form_actions:
39
+ save: Запис
40
+ cancel: Отказ
41
+ cancel_lose_changes: При отказ, ще загубите всички промени, които сте направили тук
42
+ delete: Изтриване
43
+ close: Затваряне
44
+ image_picker:
45
+ none_selected: 'Все още няма избран(а) %(what). Моля, цъкнете тук, за да добавите един(а).'
46
+ remove_current: 'Премахване на текущия(ата) %{what}'
47
+ change: Цъкнете тук, за да изберете изображение
48
+ show: Показване
49
+ resource_picker:
50
+ download_current: Изтегляне на текущия файл
51
+ opens_in_new_window: Отваряне в нов прозорец
52
+ remove_current: "Премахване на текущия файл"
53
+ no_resource_selected: 'В момента няма избран файл. Моля, цъкнете тук за да добавите един.'
54
+ name: Добавяне на файл
55
+ current: Текущ файл
56
+ search:
57
+ button_text: Търсене
58
+ results_for: 'Резултати от търсене на "%{query}"'
59
+ no_results: 'За съжаление нищо не бе намерено'
60
+ delete:
61
+ message: 'Сигурни ли сте, че искате да изтриете "%{title}"?'
62
+ error_messages:
63
+ problems_in_following_fields: Има проблем със следните полета
64
+ help: помощ
65
+ message:
66
+ close: Затваряне
67
+ close_this_message: Затваряне на това съобщение
68
+ draft_page_message:
69
+ not_live: Тази страница все още е чернова и не е готова за публично преглеждане.
70
+ footer:
71
+ copyright: "© %{year} %{site_name} Всички права запазени."
72
+ no_script:
73
+ enable_javascript_html: За да работи напълно тази страница е необходим JavaScript.
74
+ here_are: Ето
75
+ instructions_enable_javascript_html: инструкции, как да разрешите използването на JavaScript във Вашия уеб браузър.
76
+ time:
77
+ formats:
78
+ short: "%A, %d %B %Y"
data/lib/gemspec.rb CHANGED
@@ -34,7 +34,7 @@ Gem::Specification.new do |s|
34
34
 
35
35
  s.files = [
36
36
  '#{%w( **/{*,.rspec,.gitignore,.yardopts} ).map { |file| Pathname.glob(gempath.join(file)) }.flatten.reject{|f|
37
- !f.exist? or f.to_s =~ /\.gem$/ or (f.directory? and f.children.empty?)
37
+ !f.exist? or f.to_s =~ /(\.(gem|rbc)|tmp(\/.*)?|spec\/lib\/tmp(\/.*)?)$/ or (f.directory? and f.children.empty?)
38
38
  }.map{|d| d.relative_path_from(gempath)}.uniq.sort.join("',\n '")}'
39
39
  ]
40
40
  end
@@ -25,7 +25,7 @@ module Refinery
25
25
 
26
26
  c.protect_from_forgery # See ActionController::RequestForgeryProtection
27
27
 
28
- c.send :include, Crud # basic create, read, update and delete methods
28
+ c.send :include, ::Refinery::Crud # basic create, read, update and delete methods
29
29
 
30
30
  c.send :before_filter, :find_pages_for_menu,
31
31
  :show_welcome_page?
@@ -61,7 +61,7 @@ module Refinery
61
61
  end
62
62
 
63
63
  def home_page?
64
- root_path == request.path
64
+ root_path =~ /^#{request.path}\/?/
65
65
  end
66
66
 
67
67
  def just_installed?
@@ -67,7 +67,7 @@ module Refinery
67
67
  end
68
68
 
69
69
  def siblings
70
- @siblings ||= ((has_parent? ? children : menu.roots) - [self])
70
+ @siblings ||= ((has_parent? ? parent.children : menu.roots) - [self])
71
71
  end
72
72
  alias_method :shown_siblings, :siblings
73
73
 
@@ -27,6 +27,9 @@ module Refinery
27
27
  def self.called_from; "#{new_called_from}"; end
28
28
  RUBY
29
29
  Object.const_set(plugin.class_name.to_sym, klass)
30
+
31
+ # add the new plugin to the collection of registered plugins
32
+ ::Refinery::Plugins.registered << plugin
30
33
  end
31
34
 
32
35
  # Returns the class name of the plugin
@@ -101,7 +104,6 @@ module Refinery
101
104
  # provide a default pathname to where this plugin is using its lib directory.
102
105
  depth = RUBY_VERSION >= "1.9.2" ? 4 : 3
103
106
  self.pathname ||= Pathname.new(caller(depth).first.match("(.*)#{File::SEPARATOR}lib")[1])
104
- ::Refinery::Plugins.registered << self # add me to the collection of registered plugins
105
107
  end
106
108
  end
107
109
  end
@@ -1,57 +1,47 @@
1
1
  module Refinery
2
2
  class Plugins < Array
3
3
 
4
- def initialize
5
- @plugins = []
6
- end
7
-
8
- def find_activity_by_model(model)
9
- unless (plugin = find_by_model(model)).nil?
10
- plugin.activity.detect {|activity| activity.class == model}
11
- end
12
- end
13
-
14
4
  def find_by_model(model)
15
5
  model = model.constantize if model.is_a? String
16
- self.detect { |plugin| plugin.activity.any? {|activity| activity.class == model } }
6
+ detect { |plugin| plugin.activity.any? {|activity| activity.class == model } }
17
7
  end
18
8
 
19
9
  def find_by_name(name)
20
- self.detect { |plugin| plugin.name == name }
10
+ detect { |plugin| plugin.name == name }
21
11
  end
22
12
  alias :[] :find_by_name
23
13
 
24
14
  def find_by_title(title)
25
- self.detect { |plugin| plugin.title == title }
15
+ detect { |plugin| plugin.title == title }
26
16
  end
27
17
 
28
18
  def in_menu
29
- self.reject{ |p| p.hide_from_menu }
19
+ self.class.new(reject(&:hide_from_menu))
30
20
  end
31
21
 
32
22
  def names
33
- self.map(&:name)
23
+ map(&:name)
34
24
  end
35
25
 
36
26
  def pathnames
37
- self.map(&:pathname).compact.uniq
27
+ map(&:pathname).compact.uniq
38
28
  end
39
29
 
40
30
  def titles
41
- self.map(&:title)
31
+ map(&:title)
42
32
  end
43
33
 
44
34
  class << self
45
35
  def active
46
- @active_plugins ||= self.new
36
+ @active_plugins ||= new
47
37
  end
48
38
 
49
39
  def always_allowed
50
- registered.reject { |p| !p.always_allow_access? }
40
+ new registered.select(&:always_allow_access?)
51
41
  end
52
42
 
53
43
  def registered
54
- @registered_plugins ||= self.new
44
+ @registered_plugins ||= new
55
45
  end
56
46
 
57
47
  def activate(name)
@@ -63,7 +53,7 @@ module Refinery
63
53
  end
64
54
 
65
55
  def set_active(names)
66
- @active_plugins = self.new
56
+ @active_plugins = new
67
57
 
68
58
  names.each do |name|
69
59
  activate(name)
@@ -116,7 +116,7 @@ module Refinery
116
116
  plugin.version = ::Refinery.version
117
117
  plugin.hide_from_menu = true
118
118
  plugin.always_allow_access = true
119
- plugin.menu_match = /(refinery|admin)\/(refinery_)?dialogs/
119
+ plugin.menu_match = /(refinery|admin)\/(refinery_|pages_)?dialogs/
120
120
  end
121
121
  end
122
122
 
@@ -0,0 +1,57 @@
1
+ WYMeditor.STRINGS['bg'] = {
2
+ Strong: 'Получер',
3
+ Bold: 'Получер',
4
+ Emphasis: 'Курсив',
5
+ Superscript: 'Горен индекс',
6
+ Subscript: 'Долен индекс',
7
+ Ordered_List: 'Подреден списък',
8
+ Unordered_List: 'Списък',
9
+ Indent: 'Блок навътре',
10
+ Outdent: 'Блок навън',
11
+ Undo: 'Отмяна',
12
+ Redo: 'Повторение',
13
+ Link: 'Връзка',
14
+ Unlink: 'Премахване на връзка',
15
+ Image: 'Изображение',
16
+ Table: 'Таблица',
17
+ HTML: 'HTML',
18
+ Paragraph: 'Параграф',
19
+ Heading_1: 'Заглавие 1',
20
+ Heading_2: 'Заглавие 2',
21
+ Heading_3: 'Заглавие 3',
22
+ Heading_4: 'Заглавие 4',
23
+ Heading_5: 'Заглавие 5',
24
+ Heading_6: 'Заглавие 6',
25
+ Preformatted: 'Форматиран предварително',
26
+ Blockquote: 'Цитат',
27
+ Table_Header: 'Заглавие на таблицата',
28
+ URL: 'Уеб адрес',
29
+ Title: 'Заглавие',
30
+ Alternative_Text: 'Алтернативен текст',
31
+ Caption: 'Заглавие',
32
+ Summary: 'Общо',
33
+ Number_Of_Rows: 'Брой редове',
34
+ Number_Of_Cols: 'Брой колони',
35
+ Insert: 'Вмъкване',
36
+ Submit: 'Изпращане',
37
+ Cancel: 'Отказ',
38
+ Choose: 'Избор',
39
+ Preview: 'Преглед',
40
+ Paste_From_Word: 'Вмъкнете Вашия текст по-долу',
41
+ Tools: 'Инструменти',
42
+ Containers: 'Контейнери',
43
+ Classes: 'Класове',
44
+ Status: 'Статус',
45
+ Source_Code: 'Изходен код',
46
+ Text_Align: 'На текст',
47
+ Image_Align: 'На изображение',
48
+ Font_Size: 'На шрифт',
49
+ Left: 'Отляво',
50
+ Right: 'Отдясно',
51
+ Center: 'Центрирано',
52
+ Justify: 'Двустранно',
53
+ Small: 'Малък',
54
+ Normal: 'Нормален',
55
+ Large: 'Голям',
56
+ Apply_Style: 'Стил'
57
+ };
@@ -1,7 +1,7 @@
1
1
  body {
2
2
  margin: 0px;
3
3
  }
4
- #page, #site_bar_content, footer, header {
4
+ #page, #site_bar_content, #page_container > footer, #page_container > header {
5
5
  width: 1000px;
6
6
  margin: 0px auto;
7
7
  }
@@ -73,4 +73,4 @@ body {
73
73
  padding:3px 9px;
74
74
  font-weight:bold;
75
75
  width:auto;
76
- }
76
+ }
@@ -43,6 +43,7 @@ Clearfix docs
43
43
  content: ".";
44
44
  display: block;
45
45
  height: 0;
46
+ overflow: hidden; /* for height 0, it's necessary to force overflow hidden */
46
47
  clear: both;
47
48
  visibility: hidden;
48
49
  }
@@ -54,4 +55,4 @@ Clearfix docs
54
55
  .clearfix, section {
55
56
  display:block;
56
57
  }
57
- /* End hide from IE Mac */
58
+ /* End hide from IE Mac */
@@ -481,6 +481,7 @@ a.wym_wymeditor_link {
481
481
  }
482
482
  .wym_tools_class.activated {
483
483
  position: relative;
484
+ padding-bottom: 5px;
484
485
  }
485
486
  .wym_skin_refinery .wym_buttons .wym_tools_class .wym_classes li {
486
487
  float: left;
@@ -3,10 +3,10 @@
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = %q{refinerycms-core}
6
- s.version = %q{1.0.8}
6
+ s.version = %q{1.0.9}
7
7
  s.summary = %q{Core engine for Refinery CMS}
8
8
  s.description = %q{The core of Refinery CMS. This handles the common functionality and is required by most engines}
9
- s.date = %q{2011-09-01}
9
+ s.date = %q{2011-11-05}
10
10
  s.email = %q{info@refinerycms.com}
11
11
  s.homepage = %q{http://refinerycms.com}
12
12
  s.rubyforge_project = %q{refinerycms}
@@ -15,8 +15,8 @@ Gem::Specification.new do |s|
15
15
  s.require_paths = %w(lib)
16
16
  s.executables = %w()
17
17
 
18
- s.add_dependency 'refinerycms-base', '= 1.0.8'
19
- s.add_dependency 'refinerycms-settings', '= 1.0.8'
18
+ s.add_dependency 'refinerycms-base', '= 1.0.9'
19
+ s.add_dependency 'refinerycms-settings', '= 1.0.9'
20
20
  s.add_dependency 'refinerycms-generators', '~> 1.0'
21
21
  s.add_dependency 'acts_as_indexed', '~> 0.7'
22
22
  s.add_dependency 'friendly_id_globalize3', '~> 3.2.1'
@@ -79,6 +79,7 @@ Gem::Specification.new do |s|
79
79
  'app/views/wymiframe.html.erb',
80
80
  'config',
81
81
  'config/locales',
82
+ 'config/locales/bg.yml',
82
83
  'config/locales/cs.yml',
83
84
  'config/locales/da.yml',
84
85
  'config/locales/de.yml',
@@ -362,6 +363,7 @@ Gem::Specification.new do |s|
362
363
  'public/javascripts/wymeditor',
363
364
  'public/javascripts/wymeditor/jquery.refinery.wymeditor.js',
364
365
  'public/javascripts/wymeditor/lang',
366
+ 'public/javascripts/wymeditor/lang/bg.js',
365
367
  'public/javascripts/wymeditor/lang/ca.js',
366
368
  'public/javascripts/wymeditor/lang/cs.js',
367
369
  'public/javascripts/wymeditor/lang/da.js',
@@ -5,6 +5,7 @@ module Refinery
5
5
  class Engine < ::Rails::Engine
6
6
  ::Refinery::Plugin.register do |plugin|
7
7
  plugin.name = 'refinery_rspec'
8
+ plugin.hide_from_menu = true
8
9
  end
9
10
  end
10
11
  end
@@ -5,6 +5,7 @@ module Refinery
5
5
  class Engine < ::Rails::Engine
6
6
  ::Refinery::Plugin.register do |plugin|
7
7
  plugin.name = "my_plugin"
8
+ plugin.hide_from_menu = true
8
9
  end
9
10
  end
10
11
  end
@@ -13,6 +14,7 @@ module Refinery
13
14
  class Engine < ::Rails::Engine
14
15
  ::Refinery::Plugin.register do |plugin|
15
16
  plugin.name = "my_other_plugin"
17
+ plugin.hide_from_menu = true
16
18
  end
17
19
  end
18
20
  end
@@ -26,48 +28,47 @@ module Refinery
26
28
  Plugins.set_active([])
27
29
  end
28
30
 
29
- describe "self.activate" do
30
- it "should activate a plugin" do
31
- Plugins.activate("my_plugin")
31
+ describe '#activate' do
32
+ it "activates a plugin" do
33
+ subject.class.activate("my_plugin")
32
34
 
33
35
  Plugins.active.names.should include("my_plugin")
34
36
  end
35
37
 
36
- it "should only active the same plugin once" do
37
- Plugins.activate("my_other_plugin")
38
- Plugins.activate("my_other_plugin")
38
+ it "only activates the same plugin once" do
39
+ subject.class.activate("my_other_plugin")
40
+ subject.class.activate("my_other_plugin")
39
41
 
40
42
  Plugins.active.names.count("my_other_plugin").should == 1
41
43
  end
42
44
 
43
- it "should not deactivate the first plugin when another is activated" do
44
- Plugins.activate("my_plugin")
45
- Plugins.activate("my_other_plugin")
45
+ it "doesn't deactivate the first plugin when another is activated" do
46
+ subject.class.activate("my_plugin")
47
+ subject.class.activate("my_other_plugin")
46
48
 
47
49
  Plugins.active.names.should include("my_plugin")
48
50
  Plugins.active.names.should include("my_other_plugin")
49
51
  end
50
52
  end
51
53
 
52
- describe "self.deactivate" do
53
- it "should deactivate a plugin" do
54
- Plugins.activate("my_plugin")
55
- Plugins.deactivate("my_plugin")
54
+ describe '#deactivate' do
55
+ it "deactivates a plugin" do
56
+ subject.class.activate("my_plugin")
57
+ subject.class.deactivate("my_plugin")
56
58
 
57
59
  Plugins.active.count.should == 0
58
60
  end
59
61
  end
60
62
 
61
- describe "self.set_active" do
62
-
63
- it "should activate a single plugin" do
64
- Plugins.set_active(%w(my_plugin))
63
+ describe '#set_active' do
64
+ it "activates a single plugin" do
65
+ subject.class.set_active(%w(my_plugin))
65
66
 
66
67
  Plugins.active.names.should include("my_plugin")
67
68
  end
68
69
 
69
- it "should activate a list of plugins" do
70
- Plugins.set_active(%w(my_plugin my_other_plugin))
70
+ it "activates a list of plugins" do
71
+ subject.class.set_active(%w(my_plugin my_other_plugin))
71
72
 
72
73
  Plugins.active.names.should include("my_plugin")
73
74
  Plugins.active.names.should include("my_plugin")
@@ -75,9 +76,9 @@ module Refinery
75
76
  Plugins.active.count.should == 2
76
77
  end
77
78
 
78
- it "should deactivate the initial plugins when another set is set_active" do
79
- Plugins.set_active(%w(my_plugin))
80
- Plugins.set_active(%w(my_other_plugin))
79
+ it "deactivates the initial plugins when another set is set_active" do
80
+ subject.class.set_active(%w(my_plugin))
81
+ subject.class.set_active(%w(my_other_plugin))
81
82
 
82
83
  Plugins.active.names.should_not include("my_plugin")
83
84
  Plugins.active.names.should include("my_other_plugin")
@@ -86,5 +87,45 @@ module Refinery
86
87
 
87
88
  end
88
89
 
90
+ describe '#registered' do
91
+ it 'identifies as Refinery::Plugins' do
92
+ subject.class.registered.class.should == subject.class
93
+ end
94
+ end
95
+
96
+ describe '#active' do
97
+ it 'identifies as Refinery::Plugins' do
98
+ subject.class.active.class.should == subject.class
99
+ end
100
+
101
+ it 'only contains items that are registered' do
102
+ subject.class.set_active(%w(my_plugin))
103
+ subject.class.active.any?.should be_true
104
+ subject.class.active.all?{|p| subject.class.registered.include?(p)}.should be_true
105
+ end
106
+ end
107
+
108
+ describe '#always_allowed' do
109
+ it 'should identify as Refinery::Plugins' do
110
+ subject.class.always_allowed.class.should == subject.class
111
+ end
112
+
113
+ it 'only contains items that are always allowed' do
114
+ subject.class.always_allowed.any?.should be_true
115
+ subject.class.always_allowed.all? { |p| p.always_allow_access? }.should be_true
116
+ end
117
+ end
118
+
119
+ describe '#in_menu' do
120
+ it 'identifies as Refinery::Plugins' do
121
+ subject.class.registered.in_menu.class.should == subject.class
122
+ end
123
+
124
+ it 'only contains items that are in the menu' do
125
+ subject.class.registered.in_menu.any?.should be_true
126
+ subject.class.registered.in_menu.all? { |p| !p.hide_from_menu }.should be_true
127
+ end
128
+ end
129
+
89
130
  end
90
131
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: refinerycms-core
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 8
10
- version: 1.0.8
9
+ - 9
10
+ version: 1.0.9
11
11
  platform: ruby
12
12
  authors:
13
13
  - Resolve Digital
@@ -19,7 +19,7 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2011-09-01 00:00:00 Z
22
+ date: 2011-11-05 00:00:00 Z
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
25
25
  name: refinerycms-base
@@ -29,12 +29,12 @@ dependencies:
29
29
  requirements:
30
30
  - - "="
31
31
  - !ruby/object:Gem::Version
32
- hash: 7
32
+ hash: 5
33
33
  segments:
34
34
  - 1
35
35
  - 0
36
- - 8
37
- version: 1.0.8
36
+ - 9
37
+ version: 1.0.9
38
38
  type: :runtime
39
39
  version_requirements: *id001
40
40
  - !ruby/object:Gem::Dependency
@@ -45,12 +45,12 @@ dependencies:
45
45
  requirements:
46
46
  - - "="
47
47
  - !ruby/object:Gem::Version
48
- hash: 7
48
+ hash: 5
49
49
  segments:
50
50
  - 1
51
51
  - 0
52
- - 8
53
- version: 1.0.8
52
+ - 9
53
+ version: 1.0.9
54
54
  type: :runtime
55
55
  version_requirements: *id002
56
56
  - !ruby/object:Gem::Dependency
@@ -224,6 +224,7 @@ files:
224
224
  - app/views/shared/admin/_tabbed_fields.html.erb
225
225
  - app/views/welcome.html.erb
226
226
  - app/views/wymiframe.html.erb
227
+ - config/locales/bg.yml
227
228
  - config/locales/cs.yml
228
229
  - config/locales/da.yml
229
230
  - config/locales/de.yml
@@ -474,6 +475,7 @@ files:
474
475
  - public/javascripts/refinery/site_bar.js
475
476
  - public/javascripts/refinery/submenu.js
476
477
  - public/javascripts/wymeditor/jquery.refinery.wymeditor.js
478
+ - public/javascripts/wymeditor/lang/bg.js
477
479
  - public/javascripts/wymeditor/lang/ca.js
478
480
  - public/javascripts/wymeditor/lang/cs.js
479
481
  - public/javascripts/wymeditor/lang/da.js