typo 5.4.1 → 5.4.2
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/CHANGELOG +10 -24
- data/app/controllers/accounts_controller.rb +18 -1
- data/app/controllers/admin/content_controller.rb +1 -0
- data/app/controllers/admin/resources_controller.rb +17 -3
- data/app/controllers/application_controller.rb +2 -5
- data/app/helpers/admin/base_helper.rb +16 -6
- data/app/helpers/admin/resources_helper.rb +6 -0
- data/app/helpers/application_helper.rb +7 -8
- data/app/models/article.rb +8 -10
- data/app/models/blog.rb +26 -24
- data/app/models/content.rb +17 -10
- data/app/models/feedback.rb +1 -1
- data/app/models/page.rb +1 -1
- data/app/models/resource.rb +14 -0
- data/app/models/user.rb +1 -0
- data/app/views/accounts/login.html.erb +2 -1
- data/app/views/accounts/recover_password.html.erb +18 -0
- data/app/views/admin/content/_form.html.erb +8 -5
- data/app/views/admin/content/_images.html.erb +14 -0
- data/app/views/admin/content/_visual_editor.html.erb +5 -0
- data/app/views/admin/pages/_visual_editor.html.erb +9 -5
- data/app/views/admin/resources/_upload.html.erb +10 -0
- data/app/views/admin/resources/get_thumbnails.html.erb +5 -0
- data/app/views/admin/resources/images.html.erb +28 -0
- data/app/views/admin/resources/index.html.erb +42 -11
- data/app/views/layouts/administration.html.erb +1 -1
- data/app/views/notification_mailer/notif_user.html.erb +1 -1
- data/config/environment.rb +1 -1
- data/config/initializers/access_rules.rb +2 -1
- data/config/initializers/inflector.rb +4 -1
- data/db/schema.rb +26 -32
- data/lib/tasks/release.rake +1 -1
- data/lib/typo_version.rb +1 -1
- data/public/images/thumb_blank.jpg +0 -0
- data/public/javascripts/base_packaged.js +377 -0
- data/public/javascripts/ckeditor/config.bak +27 -11
- data/public/javascripts/quicktags.js +11 -0
- data/public/javascripts/typo_carousel.js +340 -0
- data/public/stylesheets/administration.css +16 -0
- data/public/stylesheets/base_packaged.css +100 -0
- data/script/about +3 -2
- data/script/console +1 -1
- data/script/dbconsole +1 -1
- data/script/destroy +1 -1
- data/script/generate +1 -1
- data/script/performance/benchmarker +1 -1
- data/script/performance/profiler +1 -1
- data/script/plugin +2 -2
- data/script/runner +2 -2
- data/script/server +2 -2
- data/spec/controllers/accounts_controller_spec.rb +47 -0
- data/spec/controllers/admin/content_controller_spec.rb +4 -0
- data/spec/controllers/admin/resources_controller_spec.rb +8 -0
- data/spec/controllers/xml_controller_spec.rb +13 -16
- data/spec/factories.rb +14 -1
- data/spec/models/article_spec.rb +57 -14
- data/spec/models/blog_spec.rb +50 -3
- data/spec/models/trackback_spec.rb +1 -1
- data/spec/models/user_spec.rb +7 -12
- data/spec/spec_helper.rb +1 -1
- data/test/fixtures/users.yml +15 -8
- data/themes/true-blue-3/images/background.gif +0 -0
- data/vendor/plugins/easy-ckeditor/lib/ckeditor.rb +1 -2
- data/vendor/plugins/easy-ckeditor/lib/ckeditor_file_utils.rb +2 -2
- metadata +11 -11
- data/app/views/admin/resources/_resources.html.erb +0 -41
- data/script/benchmarker +0 -19
- data/script/performance/request +0 -3
- data/script/process/inspector +0 -3
- data/script/process/reaper +0 -3
- data/script/process/spawner +0 -3
- data/script/process/spinner +0 -3
- data/script/profiler +0 -34
- data/script/spec_server +0 -9
@@ -1,6 +1,6 @@
|
|
1
1
|
require File.dirname(__FILE__) + '/../spec_helper'
|
2
2
|
|
3
|
-
describe 'With the various trackback filters loaded and DNS mocked out appropriately' do
|
3
|
+
describe Trackback, 'With the various trackback filters loaded and DNS mocked out appropriately' do
|
4
4
|
before(:each) do
|
5
5
|
IPSocket.stub!(:getaddress).and_return { raise SocketError.new("getaddrinfo: Name or service not known") }
|
6
6
|
@blog = Blog.default
|
data/spec/models/user_spec.rb
CHANGED
@@ -106,17 +106,14 @@ describe 'With a new user' do
|
|
106
106
|
end
|
107
107
|
end
|
108
108
|
|
109
|
-
describe 'With a user
|
109
|
+
describe 'With a user in the database' do
|
110
110
|
before(:each) do
|
111
|
-
|
112
|
-
u = User.new(:login => 'bob')
|
113
|
-
u.password = u.password_confirmation = 'secure password'
|
114
|
-
u.email = 'typo@typo.com' #Email needed
|
115
|
-
u.save!
|
111
|
+
@olduser = Factory.create(:user)
|
116
112
|
end
|
117
113
|
|
118
114
|
it 'should not be able to create another user with the same login' do
|
119
|
-
|
115
|
+
login = @olduser.login
|
116
|
+
u = User.new(:login => login) {|u| u.password = u.password_confirmation = 'secure password'}
|
120
117
|
|
121
118
|
u.should_not be_valid
|
122
119
|
u.errors.should be_invalid('login')
|
@@ -125,9 +122,7 @@ end
|
|
125
122
|
|
126
123
|
describe 'Updating an existing user' do
|
127
124
|
before(:each) do
|
128
|
-
|
129
|
-
@user = User.new :login => 'bob'
|
130
|
-
@user.email = 'typo@typo.com'
|
125
|
+
@user = Factory.create(:user)
|
131
126
|
set_password 'a secure password'
|
132
127
|
@user.save!
|
133
128
|
end
|
@@ -162,8 +157,8 @@ describe 'Updating an existing user' do
|
|
162
157
|
it "is not actually changed when set to empty" do
|
163
158
|
set_password ''
|
164
159
|
@user.save!
|
165
|
-
User.authenticate(
|
166
|
-
User.authenticate(
|
160
|
+
User.authenticate(@user.login, '').should be_nil
|
161
|
+
User.authenticate(@user.login, 'a secure password').should == @user
|
167
162
|
end
|
168
163
|
end
|
169
164
|
|
data/spec/spec_helper.rb
CHANGED
@@ -92,7 +92,7 @@ end
|
|
92
92
|
|
93
93
|
def assert_feedvalidator(rss, todo=nil)
|
94
94
|
unless $validator_installed
|
95
|
-
puts '
|
95
|
+
puts 'Not validating feed because no validator (feedvalidator in python) is installed'
|
96
96
|
return
|
97
97
|
end
|
98
98
|
|
data/test/fixtures/users.yml
CHANGED
@@ -5,9 +5,10 @@ tobi:
|
|
5
5
|
password: ea0f5fd4398054c1c7aa0fbc7aaea30914a14441 # whatever
|
6
6
|
name: Tobi
|
7
7
|
email: tobi@example.com
|
8
|
-
notify_via_email:
|
8
|
+
notify_via_email: false
|
9
9
|
notify_on_new_articles: false
|
10
|
-
notify_on_comments:
|
10
|
+
notify_on_comments: false
|
11
|
+
notify_watch_my_articles: false
|
11
12
|
profile: admin
|
12
13
|
text_filter: markdown_filter
|
13
14
|
state: active
|
@@ -19,8 +20,9 @@ bob:
|
|
19
20
|
name: Bob
|
20
21
|
email: bob@example.com
|
21
22
|
notify_via_email: false
|
22
|
-
notify_on_new_articles:
|
23
|
+
notify_on_new_articles: false
|
23
24
|
notify_on_comments: false
|
25
|
+
notify_watch_my_articles: false
|
24
26
|
profile: admin
|
25
27
|
text_filter: none_filter
|
26
28
|
state: active
|
@@ -31,9 +33,10 @@ existingbob:
|
|
31
33
|
password: 9a91e1d8d95b6315991a88121bb0aa9f03ba0dfc # test
|
32
34
|
name: Also Bob
|
33
35
|
email: alsobob@example.com
|
34
|
-
notify_via_email:
|
36
|
+
notify_via_email: false
|
35
37
|
notify_on_new_articles: false
|
36
38
|
notify_on_comments: false
|
39
|
+
notify_watch_my_articles: false
|
37
40
|
profile: admin
|
38
41
|
text_filter: markdown_filter
|
39
42
|
state: active
|
@@ -47,6 +50,7 @@ longbob:
|
|
47
50
|
notify_via_email: false
|
48
51
|
notify_on_new_articles: false
|
49
52
|
notify_on_comments: false
|
53
|
+
notify_watch_my_articles: false
|
50
54
|
profile: admin
|
51
55
|
text_filter: markdown_filter
|
52
56
|
state: active
|
@@ -57,9 +61,10 @@ randomuser:
|
|
57
61
|
password: 8e9b1a9a38e66ca572a5e8fdac8e256848842dfa # longtest
|
58
62
|
name: Random User
|
59
63
|
email: randomuser@example.com
|
60
|
-
notify_via_email:
|
61
|
-
notify_on_new_articles:
|
62
|
-
notify_on_comments:
|
64
|
+
notify_via_email: false
|
65
|
+
notify_on_new_articles: false
|
66
|
+
notify_on_comments: false
|
67
|
+
notify_watch_my_articles: false
|
63
68
|
profile: admin
|
64
69
|
text_filter: none_filter
|
65
70
|
state: active
|
@@ -73,6 +78,7 @@ user_publisher:
|
|
73
78
|
notify_via_email: false
|
74
79
|
notify_on_new_articles: false
|
75
80
|
notify_on_comments: false
|
81
|
+
notify_watch_my_articles: false
|
76
82
|
profile: publisher
|
77
83
|
text_filter: markdown_filter
|
78
84
|
state: active
|
@@ -86,8 +92,9 @@ inactive_user:
|
|
86
92
|
notify_via_email: false
|
87
93
|
notify_on_new_articles: false
|
88
94
|
notify_on_comments: false
|
95
|
+
notify_watch_my_articles: false
|
89
96
|
profile: publisher
|
90
97
|
text_filter: markdown_filter
|
91
98
|
state: inactive
|
92
99
|
last_connection: 2009-11-21 12:15:58
|
93
|
-
|
100
|
+
|
Binary file
|
@@ -76,8 +76,7 @@ module Ckeditor
|
|
76
76
|
alias_method :ckeditor_form_remote_for, :ckeditor_remote_form_for
|
77
77
|
|
78
78
|
def ckeditor_element_id(object, field)
|
79
|
-
|
80
|
-
"#{object}_#{id}_#{field}_editor"
|
79
|
+
"#{object}__#{field}_editor"
|
81
80
|
end
|
82
81
|
|
83
82
|
def ckeditor_div_id(object, field)
|
@@ -49,10 +49,10 @@ module CkeditorFileUtils
|
|
49
49
|
unless File.symlink?(config_symlink)
|
50
50
|
FileUtils.rm(backup_config) if File.exist?(backup_config)
|
51
51
|
FileUtils.mv(config_symlink,backup_config)
|
52
|
-
FileUtils.
|
52
|
+
FileUtils.cp(dest, config_symlink)
|
53
53
|
end
|
54
54
|
else
|
55
|
-
FileUtils.
|
55
|
+
FileUtils.cp(dest, config_symlink)
|
56
56
|
end
|
57
57
|
end
|
58
58
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: typo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.4.
|
4
|
+
version: 5.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Fr\xC3\xA9d\xC3\xA9ric de Villamil"
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-23 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -231,6 +231,7 @@ files:
|
|
231
231
|
- app/models/web_notifier.rb
|
232
232
|
- app/views/accounts/confirm.html.erb
|
233
233
|
- app/views/accounts/login.html.erb
|
234
|
+
- app/views/accounts/recover_password.html.erb
|
234
235
|
- app/views/accounts/signup.html.erb
|
235
236
|
- app/views/admin/base/_recent_comments.html.erb
|
236
237
|
- app/views/admin/base/_recent_trackbacks.html.erb
|
@@ -250,6 +251,7 @@ files:
|
|
250
251
|
- app/views/admin/content/_attachment.html.erb
|
251
252
|
- app/views/admin/content/_drafts.html.erb
|
252
253
|
- app/views/admin/content/_form.html.erb
|
254
|
+
- app/views/admin/content/_images.html.erb
|
253
255
|
- app/views/admin/content/_show_resources.html.erb
|
254
256
|
- app/views/admin/content/_simple_editor.html.erb
|
255
257
|
- app/views/admin/content/_visual_editor.html.erb
|
@@ -287,8 +289,10 @@ files:
|
|
287
289
|
- app/views/admin/resources/_metadata_edit.html.erb
|
288
290
|
- app/views/admin/resources/_mime_edit.html.erb
|
289
291
|
- app/views/admin/resources/_pages.html.erb
|
290
|
-
- app/views/admin/resources/
|
292
|
+
- app/views/admin/resources/_upload.html.erb
|
291
293
|
- app/views/admin/resources/destroy.html.erb
|
294
|
+
- app/views/admin/resources/get_thumbnails.html.erb
|
295
|
+
- app/views/admin/resources/images.html.erb
|
292
296
|
- app/views/admin/resources/index.html.erb
|
293
297
|
- app/views/admin/settings/_submit.html.erb
|
294
298
|
- app/views/admin/settings/feedback.html.erb
|
@@ -576,8 +580,10 @@ files:
|
|
576
580
|
- public/images/prevlabel.gif
|
577
581
|
- public/images/spinner-blue.gif
|
578
582
|
- public/images/spinner.gif
|
583
|
+
- public/images/thumb_blank.jpg
|
579
584
|
- public/javascripts/administration.js
|
580
585
|
- public/javascripts/application.js
|
586
|
+
- public/javascripts/base_packaged.js
|
581
587
|
- public/javascripts/builder.js
|
582
588
|
- public/javascripts/calendar_date_select/calendar_date_select.js
|
583
589
|
- public/javascripts/calendar_date_select/format_db.js
|
@@ -857,9 +863,11 @@ files:
|
|
857
863
|
- public/javascripts/scriptaculous.js
|
858
864
|
- public/javascripts/slider.js
|
859
865
|
- public/javascripts/typo.js
|
866
|
+
- public/javascripts/typo_carousel.js
|
860
867
|
- public/robots.txt
|
861
868
|
- public/stylesheets/administration.css
|
862
869
|
- public/stylesheets/administration_rtl.css
|
870
|
+
- public/stylesheets/base_packaged.css
|
863
871
|
- public/stylesheets/border-radius-ie8.htc
|
864
872
|
- public/stylesheets/calendar_date_select/default.css
|
865
873
|
- public/stylesheets/codecollapse.css
|
@@ -877,7 +885,6 @@ files:
|
|
877
885
|
- README
|
878
886
|
- script/about
|
879
887
|
- script/autospec
|
880
|
-
- script/benchmarker
|
881
888
|
- script/breakpointer
|
882
889
|
- script/console
|
883
890
|
- script/dbconsole
|
@@ -888,18 +895,11 @@ files:
|
|
888
895
|
- script/migrate
|
889
896
|
- script/performance/benchmarker
|
890
897
|
- script/performance/profiler
|
891
|
-
- script/performance/request
|
892
898
|
- script/plugin
|
893
|
-
- script/process/inspector
|
894
|
-
- script/process/reaper
|
895
|
-
- script/process/spawner
|
896
|
-
- script/process/spinner
|
897
|
-
- script/profiler
|
898
899
|
- script/runner
|
899
900
|
- script/server
|
900
901
|
- script/spacecheck
|
901
902
|
- script/spec
|
902
|
-
- script/spec_server
|
903
903
|
- spec/controllers/accounts_controller_spec.rb
|
904
904
|
- spec/controllers/admin/blacklist_controller_spec.rb
|
905
905
|
- spec/controllers/admin/cache_controller_spec.rb
|
@@ -1,41 +0,0 @@
|
|
1
|
-
<table>
|
2
|
-
<tr>
|
3
|
-
<th><%= _("Filename")%> <small>(<%= _('right-click for link')%>)</small></th>
|
4
|
-
<th><%= _("Content Type")%></th>
|
5
|
-
<th><%= _("MetaData")%></th>
|
6
|
-
<th><%= _("File Size")%></th>
|
7
|
-
<th><%= _("Date")%></th>
|
8
|
-
<th><%= _("Delete")%></th>
|
9
|
-
</tr>
|
10
|
-
<%= render_void_table(@resources.size, 6) %>
|
11
|
-
<% for upload in resources -%>
|
12
|
-
<tr <%= alternate_class -%>>
|
13
|
-
<td><%= link_to ("#{upload.filename}", "#{this_blog.base_url}/files/#{upload.filename}", {:rel => 'lightbox'}) -%></td>
|
14
|
-
<td>
|
15
|
-
<%= task_edit_resource_mime(upload.mime, upload.id) %>
|
16
|
-
<div id="edit-resource-mime-<%= upload.id %>" style="display:none;position:absolute;">
|
17
|
-
<%= render :partial => "mime_edit", :locals => {:id => upload.id, :mime => upload.mime} %>
|
18
|
-
</div>
|
19
|
-
</td>
|
20
|
-
<% if upload.itunes_metadata? %>
|
21
|
-
<td>
|
22
|
-
<%= task_edit_resource_metadata(_("Edit MetaData") + ' (+/-)', upload.id) %>
|
23
|
-
<div id="edit-resource-metadata-<%= upload.id%>" style="display:none;position:absolute;">
|
24
|
-
<%= render :partial => "metadata_edit" , :locals => {:id => upload.id, :resource => upload}%>
|
25
|
-
</div>
|
26
|
-
</td>
|
27
|
-
<% else -%>
|
28
|
-
<td>
|
29
|
-
<%= task_add_resource_metadata(_("Add MetaData") + ' (+/-)', upload.id) %>
|
30
|
-
<div id="add-resource-metadata-<%= upload.id%>" style="display:none;position:absolute;">
|
31
|
-
<%= render :partial => "metadata_add", :locals => {:id => upload.id} %>
|
32
|
-
</div>
|
33
|
-
</td>
|
34
|
-
<% end -%>
|
35
|
-
<td><%=h upload.size rescue 0 -%> bytes</td>
|
36
|
-
<td><%=h upload.created_at.strftime('%Y-%m-%d %H:%M:%S') -%></td>
|
37
|
-
<td class="operation"><%= link_to _("delete"), {:action => 'destroy', :id => upload.id, :search => params[:search], :page => params[:page] }, :confirm => _("Are you sure?"), :method => :post %></td>
|
38
|
-
</tr>
|
39
|
-
<% end -%>
|
40
|
-
<%= display_pagination(resources, 6)%>
|
41
|
-
</table>
|
data/script/benchmarker
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
if ARGV.empty?
|
4
|
-
puts "Usage: benchmarker times 'Person.expensive_way' 'Person.another_expensive_way' ..."
|
5
|
-
exit
|
6
|
-
end
|
7
|
-
|
8
|
-
require File.dirname(__FILE__) + '/../config/environment'
|
9
|
-
require 'benchmark'
|
10
|
-
include Benchmark
|
11
|
-
|
12
|
-
# Don't include compilation in the benchmark
|
13
|
-
ARGV[1..-1].each { |expression| eval(expression) }
|
14
|
-
|
15
|
-
bm(6) do |x|
|
16
|
-
ARGV[1..-1].each_with_index do |expression, idx|
|
17
|
-
x.report("##{idx + 1}") { ARGV[0].to_i.times { eval(expression) } }
|
18
|
-
end
|
19
|
-
end
|
data/script/performance/request
DELETED
data/script/process/inspector
DELETED
data/script/process/reaper
DELETED
data/script/process/spawner
DELETED
data/script/process/spinner
DELETED
data/script/profiler
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
if ARGV.empty?
|
3
|
-
$stderr.puts "Usage: profiler 'Person.expensive_method(10)' [times]"
|
4
|
-
exit(1)
|
5
|
-
end
|
6
|
-
|
7
|
-
# Keep the expensive require out of the profile.
|
8
|
-
$stderr.puts 'Loading Rails...'
|
9
|
-
require File.dirname(__FILE__) + '/../config/environment'
|
10
|
-
|
11
|
-
# Define a method to profile.
|
12
|
-
if ARGV[1] and ARGV[1].to_i > 1
|
13
|
-
eval "def profile_me() #{ARGV[1]}.times { #{ARGV[0]} } end"
|
14
|
-
else
|
15
|
-
eval "def profile_me() #{ARGV[0]} end"
|
16
|
-
end
|
17
|
-
|
18
|
-
# Use the ruby-prof extension if available. Fall back to stdlib profiler.
|
19
|
-
begin
|
20
|
-
require 'prof'
|
21
|
-
$stderr.puts 'Using the ruby-prof extension.'
|
22
|
-
Prof.clock_mode = Prof::GETTIMEOFDAY
|
23
|
-
Prof.start
|
24
|
-
profile_me
|
25
|
-
results = Prof.stop
|
26
|
-
require 'rubyprof_ext'
|
27
|
-
Prof.print_profile(results, $stderr)
|
28
|
-
rescue LoadError
|
29
|
-
$stderr.puts 'Using the standard Ruby profiler.'
|
30
|
-
Profiler__.start_profile
|
31
|
-
profile_me
|
32
|
-
Profiler__.stop_profile
|
33
|
-
Profiler__.print_profile($stderr)
|
34
|
-
end
|
data/script/spec_server
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
gem 'test-unit', '1.2.3' if RUBY_VERSION.to_f >= 1.9
|
3
|
-
|
4
|
-
puts "Loading Rails environment"
|
5
|
-
ENV["RAILS_ENV"] ||= 'test'
|
6
|
-
require File.expand_path(File.dirname(__FILE__) + "/../config/environment") unless defined?(RAILS_ROOT)
|
7
|
-
|
8
|
-
require 'optparse'
|
9
|
-
require 'spec/rails/spec_server'
|