beef-slides 1.1.5 → 1.1.7
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +3 -3
- data/VERSION +1 -1
- data/app/models/slide.rb +7 -0
- data/app/views/admin/slides/show.html.erb +1 -1
- data/{slides.gemspec → beef-slides.gemspec} +10 -9
- metadata +8 -7
data/Rakefile
CHANGED
@@ -4,14 +4,14 @@ require 'rake'
|
|
4
4
|
begin
|
5
5
|
require 'jeweler'
|
6
6
|
Jeweler::Tasks.new do |gem|
|
7
|
-
gem.name = "slides"
|
7
|
+
gem.name = "beef-slides"
|
8
8
|
gem.summary = %Q{Slide show generation}
|
9
9
|
gem.email = "daniel@wearebeef.co.uk"
|
10
|
-
gem.homepage = "http://github.com/
|
10
|
+
gem.homepage = "http://github.com/beef/slides"
|
11
11
|
gem.authors = ["Daniel Craig"]
|
12
12
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
13
13
|
end
|
14
|
-
|
14
|
+
Jeweler::GemcutterTasks.new
|
15
15
|
rescue LoadError
|
16
16
|
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
17
17
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.1.
|
1
|
+
1.1.7
|
data/app/models/slide.rb
CHANGED
@@ -14,6 +14,8 @@ class Slide < ActiveRecord::Base
|
|
14
14
|
|
15
15
|
default_scope :order => 'position ASC'
|
16
16
|
|
17
|
+
before_save :correct_url
|
18
|
+
|
17
19
|
def to_json(options = {})
|
18
20
|
options.reverse_merge! :methods => :public_filename, :only => [:title, :strapline, :link, :date]
|
19
21
|
super options
|
@@ -23,4 +25,9 @@ private
|
|
23
25
|
def has_file?
|
24
26
|
filename != 'no_file'
|
25
27
|
end
|
28
|
+
|
29
|
+
|
30
|
+
def correct_url
|
31
|
+
write_attribute :link, self.link.gsub(/^http\:\/\//i,'') unless self.link.nil?
|
32
|
+
end
|
26
33
|
end
|
@@ -1,15 +1,15 @@
|
|
1
1
|
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
|
-
s.name = %q{slides}
|
8
|
-
s.version = "1.1.
|
7
|
+
s.name = %q{beef-slides}
|
8
|
+
s.version = "1.1.7"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Daniel Craig"]
|
12
|
-
s.date = %q{2009-
|
12
|
+
s.date = %q{2009-11-02}
|
13
13
|
s.email = %q{daniel@wearebeef.co.uk}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE",
|
@@ -33,24 +33,24 @@ Gem::Specification.new do |s|
|
|
33
33
|
"app/views/admin/slide_shows/show.html.erb",
|
34
34
|
"app/views/admin/slides/index.html.erb",
|
35
35
|
"app/views/admin/slides/show.html.erb",
|
36
|
+
"beef-slides.gemspec",
|
36
37
|
"config/routes.rb",
|
37
38
|
"generators/slides_migration/slides_migration_generator.rb",
|
38
39
|
"generators/slides_migration/templates/migration.rb",
|
39
40
|
"lib/slides.rb",
|
40
41
|
"public/javascripts/swfobject.js",
|
41
|
-
"slides.gemspec",
|
42
42
|
"test/slide_show_test.rb",
|
43
43
|
"test/slides_test.rb",
|
44
44
|
"test/test_helper.rb"
|
45
45
|
]
|
46
|
-
s.homepage = %q{http://github.com/
|
46
|
+
s.homepage = %q{http://github.com/beef/slides}
|
47
47
|
s.rdoc_options = ["--charset=UTF-8"]
|
48
48
|
s.require_paths = ["lib"]
|
49
49
|
s.rubygems_version = %q{1.3.5}
|
50
50
|
s.summary = %q{Slide show generation}
|
51
51
|
s.test_files = [
|
52
|
-
"test/
|
53
|
-
"test/
|
52
|
+
"test/slide_show_test.rb",
|
53
|
+
"test/slides_test.rb",
|
54
54
|
"test/test_helper.rb"
|
55
55
|
]
|
56
56
|
|
@@ -64,3 +64,4 @@ Gem::Specification.new do |s|
|
|
64
64
|
else
|
65
65
|
end
|
66
66
|
end
|
67
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beef-slides
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Craig
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-11-02 00:00:00 +00:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -40,18 +40,19 @@ files:
|
|
40
40
|
- app/views/admin/slide_shows/show.html.erb
|
41
41
|
- app/views/admin/slides/index.html.erb
|
42
42
|
- app/views/admin/slides/show.html.erb
|
43
|
+
- beef-slides.gemspec
|
43
44
|
- config/routes.rb
|
44
45
|
- generators/slides_migration/slides_migration_generator.rb
|
45
46
|
- generators/slides_migration/templates/migration.rb
|
46
47
|
- lib/slides.rb
|
47
48
|
- public/javascripts/swfobject.js
|
48
|
-
- slides.gemspec
|
49
49
|
- test/slide_show_test.rb
|
50
50
|
- test/slides_test.rb
|
51
51
|
- test/test_helper.rb
|
52
|
-
has_rdoc:
|
53
|
-
homepage: http://github.com/
|
54
|
-
licenses:
|
52
|
+
has_rdoc: true
|
53
|
+
homepage: http://github.com/beef/slides
|
54
|
+
licenses: []
|
55
|
+
|
55
56
|
post_install_message:
|
56
57
|
rdoc_options:
|
57
58
|
- --charset=UTF-8
|
@@ -77,6 +78,6 @@ signing_key:
|
|
77
78
|
specification_version: 3
|
78
79
|
summary: Slide show generation
|
79
80
|
test_files:
|
80
|
-
- test/slides_test.rb
|
81
81
|
- test/slide_show_test.rb
|
82
|
+
- test/slides_test.rb
|
82
83
|
- test/test_helper.rb
|