diff --git a/Gemfile.lock b/Gemfile.lock index 86d029c9..d22d7a07 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,6 +1,6 @@ GIT remote: git://github.com/floehopper/mocha.git - revision: 6f18b724c50a89a1fad954dc32a8a590dbb877ca + revision: 2b4e868d1907859cd03f407078bd8b630f7d0dd6 specs: mocha (0.9.12.20110213002255) @@ -42,8 +42,8 @@ GEM autotest (4.4.6) ZenTest (>= 4.4.1) bcrypt-ruby (2.1.4) - bson (1.2.1) - bson_ext (1.2.1) + bson (1.2.2) + bson_ext (1.2.2) builder (2.1.2) capybara (0.4.1.2) celerity (>= 0.7.9) @@ -54,7 +54,7 @@ GEM rack-test (>= 0.5.4) selenium-webdriver (>= 0.0.27) xpath (~> 0.1.3) - celerity (0.8.7) + celerity (0.8.8) childprocess (0.1.7) ffi (~> 0.6.3) closure-compiler (1.0.0) @@ -88,7 +88,7 @@ GEM diff-lcs (1.1.2) erubis (2.6.6) abstract (>= 1.0.0) - excon (0.5.2) + excon (0.5.4) factory_girl (1.3.3) factory_girl_rails (1.0.1) factory_girl (~> 1.3) @@ -118,7 +118,7 @@ GEM json_pure (>= 1.2.0, < 1.5.0) launchy (~> 0.3.2) rest-client (>= 1.4.0, < 1.7.0) - httparty (0.7.3) + httparty (0.7.4) crack (= 0.1.8) i18n (0.5.0) inherited_resources (1.1.2) @@ -129,7 +129,7 @@ GEM yui-compressor (>= 0.9.1) json (1.5.1) json_pure (1.4.6) - kgio (2.3.0) + kgio (2.3.2) launchy (0.3.7) configuration (>= 0.0.5) rake (>= 0.8.1) @@ -153,8 +153,8 @@ GEM mime-types (1.16) mimemagic (0.1.8) mimetype-fu (0.1.2) - mongo (1.2.1) - bson (>= 1.2.1) + mongo (1.2.2) + bson (>= 1.2.2) mongoid (2.0.0.rc.7) activemodel (~> 3.0) mongo (~> 1.2) @@ -224,7 +224,7 @@ GEM rubyzip (0.9.4) s3 (0.3.7) proxies - selenium-webdriver (0.1.2) + selenium-webdriver (0.1.3) childprocess (~> 0.1.5) ffi (~> 0.6.3) json_pure diff --git a/app/models/asset.rb b/app/models/asset.rb index 4553e356..13224dfb 100644 --- a/app/models/asset.rb +++ b/app/models/asset.rb @@ -26,7 +26,7 @@ class Asset ## methods ## - %w{image stylesheet javascript pdf video audio}.each do |type| + %w{image stylesheet javascript pdf media}.each do |type| define_method("#{type}?") do self.content_type.to_s == type end diff --git a/app/models/asset_collection.rb b/app/models/asset_collection.rb index 7a90363a..b8134210 100644 --- a/app/models/asset_collection.rb +++ b/app/models/asset_collection.rb @@ -54,7 +54,7 @@ class AssetCollection end def store_asset_positions! - return if @assets_order.blank? + return if @assets_order.nil? ids = @assets_order.split(',').collect { |id| BSON::ObjectId(id) } diff --git a/app/models/theme_asset.rb b/app/models/theme_asset.rb index 3f7de948..dfa958f2 100644 --- a/app/models/theme_asset.rb +++ b/app/models/theme_asset.rb @@ -39,7 +39,7 @@ class ThemeAsset ## methods ## - %w{movie image stylesheet javascript font}.each do |type| + %w{media image stylesheet javascript font}.each do |type| define_method("#{type}?") do self.content_type.to_s == type end @@ -116,7 +116,7 @@ class ThemeAsset self.folder = ActiveSupport::Inflector.transliterate(self.folder).gsub(/(\s)+/, '_').gsub(/^\//, '').gsub(/\/$/, '').downcase # folder should begin by a root folder - if (self.folder =~ /^(stylesheets|javascripts|images|media|fonts)/).nil? + if (self.folder =~ /^(stylesheets|javascripts|images|medias|fonts)/).nil? self.folder = File.join(self.content_type.to_s.pluralize, self.folder) end end @@ -132,7 +132,7 @@ class ThemeAsset def escape_shortcut_urls(text) return if text.blank? - text.gsub(/[("'](\/(stylesheets|javascripts|images|media)\/((.+)\/)*([a-z_\-0-9]+)\.[a-z]{2,3})[)"']/) do |path| + text.gsub(/[("'](\/(stylesheets|javascripts|images|medias)\/((.+)\/)*([a-z_\-0-9]+)\.[a-z]{2,3})[)"']/) do |path| sanitized_path = path.gsub(/[("')]/, '').gsub(/^\//, '') diff --git a/app/uploaders/asset_uploader.rb b/app/uploaders/asset_uploader.rb index 3017806e..916ccb53 100644 --- a/app/uploaders/asset_uploader.rb +++ b/app/uploaders/asset_uploader.rb @@ -61,8 +61,7 @@ class AssetUploader < CarrierWave::Uploader::Base def self.content_types { :image => ['image/jpeg', 'image/pjpeg', 'image/gif', 'image/png', 'image/x-png', 'image/jpg', 'image/x-icon'], - :video => [/^video/, 'application/x-shockwave-flash', 'application/x-swf'], - :audio => [/^audio/, 'application/ogg', 'application/x-mp3'], + :media => [/^video/, 'application/x-shockwave-flash', 'application/x-swf', /^audio/, 'application/ogg', 'application/x-mp3'], :pdf => ['application/pdf', 'application/x-pdf'], :stylesheet => ['text/css'], :javascript => ['text/javascript', 'text/js', 'application/x-javascript', 'application/javascript'], diff --git a/app/views/admin/theme_assets/index.html.haml b/app/views/admin/theme_assets/index.html.haml index 7928fb1c..c6d955d7 100644 --- a/app/views/admin/theme_assets/index.html.haml +++ b/app/views/admin/theme_assets/index.html.haml @@ -42,10 +42,10 @@ %ul.list.theme-assets = render :partial => 'asset', :collection => @assets[:fonts] -- if @assets[:media] +- if @assets[:medias] %br - %h3!= t('.media') + %h3!= t('.medias') %ul.list.theme-assets - = render :partial => 'asset', :collection => @assets[:media] + = render :partial => 'asset', :collection => @assets[:medias] diff --git a/config/initializers/inflections.rb b/config/initializers/inflections.rb index 37e167a4..b684974c 100644 --- a/config/initializers/inflections.rb +++ b/config/initializers/inflections.rb @@ -10,6 +10,5 @@ # end ActiveSupport::Inflector.inflections do |inflect| - inflect.irregular 'media', 'media' end diff --git a/config/locales/admin_ui.en.yml b/config/locales/admin_ui.en.yml index bc9989cc..30b9dd6c 100644 --- a/config/locales/admin_ui.en.yml +++ b/config/locales/admin_ui.en.yml @@ -172,7 +172,7 @@ en: css_and_js: Style and javascript fonts: Fonts images: Images - media: Media + medias: Medias no_items: "There are no files for now. Just click here to create the first one." asset: updated_at: Updated at diff --git a/config/locales/admin_ui.fr.yml b/config/locales/admin_ui.fr.yml index 49b57131..205d03a8 100644 --- a/config/locales/admin_ui.fr.yml +++ b/config/locales/admin_ui.fr.yml @@ -171,7 +171,7 @@ fr: snippets: Snippets css_and_js: Style et javascript images: Images - media: Media + medias: Médias fonts: Polices no_items: "Il n'existe pas de fichiers. Vous pouvez commencer par créer un ici." asset: diff --git a/config/locales/admin_ui.pt-BR.yml b/config/locales/admin_ui.pt-BR.yml index f19de87d..d707031d 100644 --- a/config/locales/admin_ui.pt-BR.yml +++ b/config/locales/admin_ui.pt-BR.yml @@ -172,7 +172,7 @@ pt-BR: css_and_js: CSS e Javascript fonts: Fontes images: Imagens - media: Mídia + medias: Mídia no_items: "Ainda não existem arquivos. Clique aqui para criar o primeiro." asset: updated_at: Atualizado em diff --git a/doc/TODO b/doc/TODO index 3dedabb9..da86681c 100644 --- a/doc/TODO +++ b/doc/TODO @@ -1,13 +1,15 @@ BOARD: -x moving to mongoid 2.0.0 rc.6 - x accepts_nested_attributes (javascript part) - x check the theme uploader - x release new version of CustomFields, ActsAsTree gems +- duostack version +- bugs + - editable_elements slug becomes nil +- pull requests #31 et #32 +- editable_elements: inheritable: false (Mattias) +- 2 different sites on the same main domain (one in www, the other one in something else) (Raphael Costa) BACKLOG: -- add metadata to sites + - validation for custom fields - new custom field types: - belongs_to => association @@ -190,4 +192,9 @@ x notify accounts when new instance of models (opt): none, one or many accounts. x implementation x emails x tests -x fix bug issue about (custom fields) \ No newline at end of file +x fix bug issue about (custom fields) +x moving to mongoid 2.0.0 rc.6 + x accepts_nested_attributes (javascript part) + x check the theme uploader + x release new version of CustomFields, ActsAsTree gems +x add metadata to sites \ No newline at end of file diff --git a/lib/locomotive/liquid/tags/seo_metadata.rb b/lib/locomotive/liquid/tags/seo_metadata.rb index eb776117..c170729b 100644 --- a/lib/locomotive/liquid/tags/seo_metadata.rb +++ b/lib/locomotive/liquid/tags/seo_metadata.rb @@ -10,7 +10,7 @@ module Locomotive } end - # Removees whitespace and quote charactets from the input + # Removes whitespace and quote charactets from the input def sanitized_string(string) string.strip.gsub(/"/, '') end