fullstack-carousel 0.1.1

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/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem 'rails'
4
+
5
+ group :development do
6
+ gem "bundler"
7
+ gem "jeweler", "~> 1.8.4"
8
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,94 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (3.2.11)
5
+ actionpack (= 3.2.11)
6
+ mail (~> 2.4.4)
7
+ actionpack (3.2.11)
8
+ activemodel (= 3.2.11)
9
+ activesupport (= 3.2.11)
10
+ builder (~> 3.0.0)
11
+ erubis (~> 2.7.0)
12
+ journey (~> 1.0.4)
13
+ rack (~> 1.4.0)
14
+ rack-cache (~> 1.2)
15
+ rack-test (~> 0.6.1)
16
+ sprockets (~> 2.2.1)
17
+ activemodel (3.2.11)
18
+ activesupport (= 3.2.11)
19
+ builder (~> 3.0.0)
20
+ activerecord (3.2.11)
21
+ activemodel (= 3.2.11)
22
+ activesupport (= 3.2.11)
23
+ arel (~> 3.0.2)
24
+ tzinfo (~> 0.3.29)
25
+ activeresource (3.2.11)
26
+ activemodel (= 3.2.11)
27
+ activesupport (= 3.2.11)
28
+ activesupport (3.2.11)
29
+ i18n (~> 0.6)
30
+ multi_json (~> 1.0)
31
+ arel (3.0.2)
32
+ builder (3.0.4)
33
+ erubis (2.7.0)
34
+ git (1.2.5)
35
+ hike (1.2.1)
36
+ i18n (0.6.1)
37
+ jeweler (1.8.4)
38
+ bundler (~> 1.0)
39
+ git (>= 1.2.5)
40
+ rake
41
+ rdoc
42
+ journey (1.0.4)
43
+ json (1.7.6)
44
+ mail (2.4.4)
45
+ i18n (>= 0.4.0)
46
+ mime-types (~> 1.16)
47
+ treetop (~> 1.4.8)
48
+ mime-types (1.19)
49
+ multi_json (1.5.0)
50
+ polyglot (0.3.3)
51
+ rack (1.4.4)
52
+ rack-cache (1.2)
53
+ rack (>= 0.4)
54
+ rack-ssl (1.3.3)
55
+ rack
56
+ rack-test (0.6.2)
57
+ rack (>= 1.0)
58
+ rails (3.2.11)
59
+ actionmailer (= 3.2.11)
60
+ actionpack (= 3.2.11)
61
+ activerecord (= 3.2.11)
62
+ activeresource (= 3.2.11)
63
+ activesupport (= 3.2.11)
64
+ bundler (~> 1.0)
65
+ railties (= 3.2.11)
66
+ railties (3.2.11)
67
+ actionpack (= 3.2.11)
68
+ activesupport (= 3.2.11)
69
+ rack-ssl (~> 1.3.2)
70
+ rake (>= 0.8.7)
71
+ rdoc (~> 3.4)
72
+ thor (>= 0.14.6, < 2.0)
73
+ rake (10.0.3)
74
+ rdoc (3.12)
75
+ json (~> 1.4)
76
+ sprockets (2.2.2)
77
+ hike (~> 1.2)
78
+ multi_json (~> 1.0)
79
+ rack (~> 1.0)
80
+ tilt (~> 1.1, != 1.3.0)
81
+ thor (0.17.0)
82
+ tilt (1.3.3)
83
+ treetop (1.4.12)
84
+ polyglot
85
+ polyglot (>= 0.3.1)
86
+ tzinfo (0.3.35)
87
+
88
+ PLATFORMS
89
+ ruby
90
+
91
+ DEPENDENCIES
92
+ bundler
93
+ jeweler (~> 1.8.4)
94
+ rails
data/README.md ADDED
@@ -0,0 +1,28 @@
1
+ # Fullstack-carousel
2
+
3
+ Carousel plugin for fullstack cms
4
+
5
+ ---
6
+
7
+ Copyright (c) 2012 mcasimir
8
+
9
+ MIT License
10
+
11
+ Permission is hereby granted, free of charge, to any person obtaining
12
+ a copy of this software and associated documentation files (the
13
+ "Software"), to deal in the Software without restriction, including
14
+ without limitation the rights to use, copy, modify, merge, publish,
15
+ distribute, sublicense, and/or sell copies of the Software, and to
16
+ permit persons to whom the Software is furnished to do so, subject to
17
+ the following conditions:
18
+
19
+ The above copyright notice and this permission notice shall be
20
+ included in all copies or substantial portions of the Software.
21
+
22
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
23
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
24
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
25
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
26
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
27
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
28
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,53 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "fullstack-carousel"
18
+ gem.homepage = "http://github.com/mcasimir/kaminari-bootstrap"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Carousel plugin for fullstack cms}
21
+ gem.description = %Q{Carousel plugin for fullstack cms}
22
+ gem.email = "maurizio.cas@gmail.com"
23
+ gem.authors = ["mcasimir"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+
29
+ task :push do
30
+ message = ENV["message"] || "commit #{Time.now}"
31
+ `git add . && git commit -a -m '#{message}' && git push`
32
+ end
33
+
34
+ task "release:patch" do
35
+ Rake::Task["gemspec"].invoke
36
+ Rake::Task["version:bump:patch"]
37
+ Rake::Task["push"].invoke
38
+ Rake::Task["release"].invoke
39
+ end
40
+
41
+ task "release:minor" do
42
+ Rake::Task["gemspec"].invoke
43
+ Rake::Task["version:bump:minor"]
44
+ Rake::Task["push"].invoke
45
+ Rake::Task["release"].invoke
46
+ end
47
+
48
+ task "release:major" do
49
+ Rake::Task["gemspec"].invoke
50
+ Rake::Task["version:bump:major"]
51
+ Rake::Task["push"].invoke
52
+ Rake::Task["release"].invoke
53
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.1
@@ -0,0 +1,37 @@
1
+ module FullstackCarouselHelper
2
+
3
+ # <%= carousel_page_part(:slideshow, :id => 'myCarousel') do |item| %>
4
+ # <img src="<%= item.photo.url %>" alt="">
5
+ # <div class="carousel-caption">
6
+ # <h4><%= item.label %></h4>
7
+ # <p><%= item.description %></p>
8
+ # </div>
9
+ # <% end %>
10
+
11
+ def carousel_page_part(key, options = {}, &block)
12
+ options = { :arrows => true }.merge(options)
13
+ klass = ((options.delete(:class) || "").split(/\s+/) + [ "carousel" ]).join(" ")
14
+ options[:class] = klass
15
+ arrows = !!options.delete(:arrows)
16
+
17
+ content_tag :div, options
18
+ content_tag :div, :class => "carousel-inner"
19
+ part key, :schema => :slideshow do |slideshow|
20
+
21
+ slideshow.items.each_with_index do |item, i|
22
+ capture do
23
+ content_tag :div, :class => ( i == 0 ? "item active" : "item" ) do
24
+ yield(&block)
25
+ end
26
+ end
27
+ end
28
+
29
+ end
30
+
31
+ # if arrow
32
+ # <a class="left carousel-control" href="#myCarousel" data-slide="prev">‹</a>
33
+ # <a class="right carousel-control" href="#myCarousel" data-slide="next">›</a>
34
+ end
35
+ end
36
+
37
+ end
@@ -0,0 +1,9 @@
1
+ class SlideshowItem < Link
2
+
3
+ field :description
4
+
5
+ has_attached :photo
6
+ validates_attachment :photo,
7
+ :size => { :in => 0..2.megabytes }
8
+
9
+ end
@@ -0,0 +1,7 @@
1
+ class SlideshowPagePart < PagePart
2
+ has_many :slideshow_items, :dependent => :delete_all, :order=>'position ASC', :as => :link_owner
3
+ accepts_nested_attributes_for :slideshow_items, :allow_destroy => true
4
+
5
+ alias :items :slideshow_items
6
+
7
+ end
@@ -0,0 +1 @@
1
+ <%= render :partial => "admin/links/associated_fields", :locals => {:f => f, :index => index} %>
@@ -0,0 +1,57 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "fullstack-carousel"
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["mcasimir"]
12
+ s.date = "2013-01-29"
13
+ s.description = "Carousel plugin for fullstack cms"
14
+ s.email = "maurizio.cas@gmail.com"
15
+ s.extra_rdoc_files = [
16
+ "README.md"
17
+ ]
18
+ s.files = [
19
+ "Gemfile",
20
+ "Gemfile.lock",
21
+ "README.md",
22
+ "Rakefile",
23
+ "VERSION",
24
+ "app/helpers/fullstack_carousel_helper.rb",
25
+ "app/models/slideshow_item.rb",
26
+ "app/models/slideshow_page_part.rb",
27
+ "app/views/admin/slideshow_items/_associated_fields.html.erb",
28
+ "fullstack-carousel.gemspec",
29
+ "lib/fullstack-carousel.rb",
30
+ "lib/fullstack/carousel.rb",
31
+ "lib/fullstack/carousel/engine.rb"
32
+ ]
33
+ s.homepage = "http://github.com/mcasimir/kaminari-bootstrap"
34
+ s.licenses = ["MIT"]
35
+ s.require_paths = ["lib"]
36
+ s.rubygems_version = "1.8.25"
37
+ s.summary = "Carousel plugin for fullstack cms"
38
+
39
+ if s.respond_to? :specification_version then
40
+ s.specification_version = 3
41
+
42
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
43
+ s.add_runtime_dependency(%q<rails>, [">= 0"])
44
+ s.add_development_dependency(%q<bundler>, [">= 0"])
45
+ s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
46
+ else
47
+ s.add_dependency(%q<rails>, [">= 0"])
48
+ s.add_dependency(%q<bundler>, [">= 0"])
49
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
50
+ end
51
+ else
52
+ s.add_dependency(%q<rails>, [">= 0"])
53
+ s.add_dependency(%q<bundler>, [">= 0"])
54
+ s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
55
+ end
56
+ end
57
+
@@ -0,0 +1,9 @@
1
+ require 'rails'
2
+
3
+ module Fullstack
4
+ module Carousel
5
+ class Engine < ::Rails::Engine
6
+
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,7 @@
1
+ require 'fullstack/carousel/engine'
2
+
3
+ module Fullstack
4
+ module Carousel
5
+
6
+ end
7
+ end
@@ -0,0 +1,23 @@
1
+ # Author:: Maurizio Casimirri (mailto:maurizio.cas@gmail.com)
2
+ # Copyright:: Copyright (c) 2012 Maurizio Casimirri
3
+ #
4
+ # Permission is hereby granted, free of charge, to any person obtaining
5
+ # a copy of this software and associated documentation files (the
6
+ # "Software"), to deal in the Software without restriction, including
7
+ # without limitation the rights to use, copy, modify, merge, publish,
8
+ # distribute, sublicense, and/or sell copies of the Software, and to
9
+ # permit persons to whom the Software is furnished to do so, subject to
10
+ # the following conditions:
11
+ #
12
+ # The above copyright notice and this permission notice shall be
13
+ # included in all copies or substantial portions of the Software.
14
+ #
15
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
19
+ # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
20
+ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
21
+ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+
23
+ require 'fullstack/carousel'
metadata ADDED
@@ -0,0 +1,110 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fullstack-carousel
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - mcasimir
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-01-29 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: rails
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
30
+ - !ruby/object:Gem::Dependency
31
+ name: bundler
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ type: :development
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ - !ruby/object:Gem::Dependency
47
+ name: jeweler
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ~>
52
+ - !ruby/object:Gem::Version
53
+ version: 1.8.4
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 1.8.4
62
+ description: Carousel plugin for fullstack cms
63
+ email: maurizio.cas@gmail.com
64
+ executables: []
65
+ extensions: []
66
+ extra_rdoc_files:
67
+ - README.md
68
+ files:
69
+ - Gemfile
70
+ - Gemfile.lock
71
+ - README.md
72
+ - Rakefile
73
+ - VERSION
74
+ - app/helpers/fullstack_carousel_helper.rb
75
+ - app/models/slideshow_item.rb
76
+ - app/models/slideshow_page_part.rb
77
+ - app/views/admin/slideshow_items/_associated_fields.html.erb
78
+ - fullstack-carousel.gemspec
79
+ - lib/fullstack-carousel.rb
80
+ - lib/fullstack/carousel.rb
81
+ - lib/fullstack/carousel/engine.rb
82
+ homepage: http://github.com/mcasimir/kaminari-bootstrap
83
+ licenses:
84
+ - MIT
85
+ post_install_message:
86
+ rdoc_options: []
87
+ require_paths:
88
+ - lib
89
+ required_ruby_version: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ segments:
96
+ - 0
97
+ hash: 3606787983430745266
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
+ none: false
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ requirements: []
105
+ rubyforge_project:
106
+ rubygems_version: 1.8.25
107
+ signing_key:
108
+ specification_version: 3
109
+ summary: Carousel plugin for fullstack cms
110
+ test_files: []