vticker_rails 0.0.1 → 1.0.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.
- checksums.yaml +4 -4
- data/{LICENSE.txt → MIT-LICENSE} +1 -3
- data/README.rdoc +3 -0
- data/Rakefile +20 -1
- data/lib/tasks/vticker_rails_tasks.rake +4 -0
- data/lib/vticker_rails/version.rb +1 -1
- data/lib/vticker_rails.rb +0 -3
- metadata +39 -16
- data/.gitignore +0 -14
- data/Gemfile +0 -4
- data/README.md +0 -31
- data/vendor/assets/javascripts/vticker.js +0 -226
- data/vticker_rails.gemspec +0 -23
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df5a81a0b6cfa106e3242a90455b6a58655fa18c
|
4
|
+
data.tar.gz: 6195ccca15042ce527a18b25b9cf0bd355911718
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a0304c499b573896cd1d159b9051cb0714fde4a5a218e7ef2afde5207f30836dcc3ab0b9c08ae9c09d27e56a39724a66b55c2ea5ba52def1e297cf3ed76db93b
|
7
|
+
data.tar.gz: fc5dcee20c6ed64243347d855759e931543465185e7f8e469b96e9819c322110c5826f6dc2ad8dd6b7a6efdab83bde855e447ccad992ac5f12e723622a91cb5a
|
data/{LICENSE.txt → MIT-LICENSE}
RENAMED
data/README.rdoc
ADDED
data/Rakefile
CHANGED
@@ -1,2 +1,21 @@
|
|
1
|
-
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'VtickerRails'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
Bundler::GemHelper.install_tasks
|
2
21
|
|
data/lib/vticker_rails.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vticker_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Süleyman ÖZEV
|
@@ -11,50 +11,73 @@ cert_chain: []
|
|
11
11
|
date: 2014-12-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
20
|
-
|
19
|
+
version: '4.1'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 4.1.8
|
23
|
+
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
27
|
- - "~>"
|
25
28
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
29
|
+
version: '4.1'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 4.1.8
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: jquery-rails
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - "~>"
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '4.0'
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 4.0.0
|
43
|
+
type: :runtime
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '4.0'
|
50
|
+
- - ">="
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 4.0.0
|
27
53
|
- !ruby/object:Gem::Dependency
|
28
54
|
name: rake
|
29
55
|
requirement: !ruby/object:Gem::Requirement
|
30
56
|
requirements:
|
31
57
|
- - "~>"
|
32
58
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
59
|
+
version: '0'
|
34
60
|
type: :development
|
35
61
|
prerelease: false
|
36
62
|
version_requirements: !ruby/object:Gem::Requirement
|
37
63
|
requirements:
|
38
64
|
- - "~>"
|
39
65
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
41
|
-
description: News ticker for
|
66
|
+
version: '0'
|
67
|
+
description: News ticker for jquery
|
42
68
|
email:
|
43
69
|
- sulozev@gmail.com
|
44
70
|
executables: []
|
45
71
|
extensions: []
|
46
72
|
extra_rdoc_files: []
|
47
73
|
files:
|
48
|
-
-
|
49
|
-
-
|
50
|
-
- LICENSE.txt
|
51
|
-
- README.md
|
74
|
+
- MIT-LICENSE
|
75
|
+
- README.rdoc
|
52
76
|
- Rakefile
|
77
|
+
- lib/tasks/vticker_rails_tasks.rake
|
53
78
|
- lib/vticker_rails.rb
|
54
79
|
- lib/vticker_rails/version.rb
|
55
|
-
|
56
|
-
- vticker_rails.gemspec
|
57
|
-
homepage: http://github.com/suleymanozev/vticker_rails
|
80
|
+
homepage: http://github.com/suleymanozev/vticker-rails
|
58
81
|
licenses:
|
59
82
|
- MIT
|
60
83
|
metadata: {}
|
@@ -77,5 +100,5 @@ rubyforge_project:
|
|
77
100
|
rubygems_version: 2.2.2
|
78
101
|
signing_key:
|
79
102
|
specification_version: 4
|
80
|
-
summary:
|
103
|
+
summary: Jquery news ticker
|
81
104
|
test_files: []
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/README.md
DELETED
@@ -1,31 +0,0 @@
|
|
1
|
-
# VtickerRails
|
2
|
-
|
3
|
-
TODO: Write a gem description
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
```ruby
|
10
|
-
gem 'vticker_rails'
|
11
|
-
```
|
12
|
-
|
13
|
-
And then execute:
|
14
|
-
|
15
|
-
$ bundle
|
16
|
-
|
17
|
-
Or install it yourself as:
|
18
|
-
|
19
|
-
$ gem install vticker_rails
|
20
|
-
|
21
|
-
## Usage
|
22
|
-
|
23
|
-
TODO: Write usage instructions here
|
24
|
-
|
25
|
-
## Contributing
|
26
|
-
|
27
|
-
1. Fork it ( https://github.com/[my-github-username]/vticker_rails/fork )
|
28
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
29
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
30
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
31
|
-
5. Create a new Pull Request
|
@@ -1,226 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
Vertical News Ticker 1.15
|
3
|
-
|
4
|
-
Original by: Tadas Juozapaitis ( kasp3rito [eta] gmail (dot) com )
|
5
|
-
http://www.jugbit.com/jquery-vticker-vertical-news-ticker/
|
6
|
-
|
7
|
-
Forked/Modified by: Richard Hollis @richhollis - richhollis.co.uk
|
8
|
-
*/
|
9
|
-
|
10
|
-
(function($){
|
11
|
-
|
12
|
-
var defaults = {
|
13
|
-
speed: 700,
|
14
|
-
pause: 4000,
|
15
|
-
showItems: 1,
|
16
|
-
mousePause: true,
|
17
|
-
height: 0,
|
18
|
-
animate: true,
|
19
|
-
margin: 0,
|
20
|
-
padding: 0,
|
21
|
-
startPaused: false
|
22
|
-
};
|
23
|
-
|
24
|
-
var internal = {
|
25
|
-
|
26
|
-
moveUp: function(state, attribs) {
|
27
|
-
internal.animate(state, attribs, 'up');
|
28
|
-
},
|
29
|
-
|
30
|
-
moveDown: function(state, attribs){
|
31
|
-
internal.animate(state, attribs, 'down');
|
32
|
-
},
|
33
|
-
|
34
|
-
animate: function(state, attribs, dir) {
|
35
|
-
var height = state.itemHeight;
|
36
|
-
var options = state.options;
|
37
|
-
var el = state.element;
|
38
|
-
var obj = el.children('ul');
|
39
|
-
var selector = (dir === 'up') ? 'li:first' : 'li:last';
|
40
|
-
|
41
|
-
el.trigger("vticker.beforeTick");
|
42
|
-
|
43
|
-
var clone = obj.children(selector).clone(true);
|
44
|
-
|
45
|
-
if(options.height > 0) height = obj.children('li:first').height();
|
46
|
-
height += (options.margin) + (options.padding*2); // adjust for margins & padding
|
47
|
-
|
48
|
-
if(dir==='down') obj.css('top', '-' + height + 'px').prepend(clone);
|
49
|
-
|
50
|
-
if(attribs && attribs.animate) {
|
51
|
-
if(state.animating) return;
|
52
|
-
state.animating = true;
|
53
|
-
var opts = (dir === 'up') ? {top: '-=' + height + 'px'} : {top: 0};
|
54
|
-
obj.animate(opts, options.speed, function() {
|
55
|
-
$(obj).children(selector).remove();
|
56
|
-
$(obj).css('top', '0px');
|
57
|
-
state.animating = false;
|
58
|
-
el.trigger("vticker.afterTick");
|
59
|
-
});
|
60
|
-
} else {
|
61
|
-
obj.children(selector).remove();
|
62
|
-
obj.css('top', '0px');
|
63
|
-
el.trigger("vticker.afterTick");
|
64
|
-
}
|
65
|
-
if(dir==='up') clone.appendTo(obj);
|
66
|
-
},
|
67
|
-
|
68
|
-
nextUsePause: function() {
|
69
|
-
var state = $(this).data('state');
|
70
|
-
var options = state.options;
|
71
|
-
if(state.isPaused || state.itemCount < 2) return;
|
72
|
-
methods.next.call( this, {animate:options.animate} );
|
73
|
-
},
|
74
|
-
|
75
|
-
startInterval: function() {
|
76
|
-
var state = $(this).data('state');
|
77
|
-
var options = state.options;
|
78
|
-
var initThis = this;
|
79
|
-
state.intervalId = setInterval(function(){
|
80
|
-
internal.nextUsePause.call( initThis );
|
81
|
-
}, options.pause);
|
82
|
-
},
|
83
|
-
|
84
|
-
stopInterval: function() {
|
85
|
-
var state = $(this).data('state');
|
86
|
-
if(!state) return;
|
87
|
-
if(state.intervalId) clearInterval(state.intervalId);
|
88
|
-
state.intervalId = undefined;
|
89
|
-
},
|
90
|
-
|
91
|
-
restartInterval: function() {
|
92
|
-
internal.stopInterval.call(this);
|
93
|
-
internal.startInterval.call(this);
|
94
|
-
}
|
95
|
-
};
|
96
|
-
|
97
|
-
var methods = {
|
98
|
-
|
99
|
-
init: function(options) {
|
100
|
-
// if init called second time then stop first, then re-init
|
101
|
-
methods.stop.call(this);
|
102
|
-
// init
|
103
|
-
var defaultsClone = jQuery.extend({}, defaults);
|
104
|
-
var options = $.extend(defaultsClone, options);
|
105
|
-
var el = $(this);
|
106
|
-
var state = {
|
107
|
-
itemCount: el.children('ul').children('li').length,
|
108
|
-
itemHeight: 0,
|
109
|
-
itemMargin: 0,
|
110
|
-
element: el,
|
111
|
-
animating: false,
|
112
|
-
options: options,
|
113
|
-
isPaused: (options.startPaused) ? true : false,
|
114
|
-
pausedByCode: false
|
115
|
-
};
|
116
|
-
$(this).data('state', state);
|
117
|
-
|
118
|
-
el.css({overflow: 'hidden', position: 'relative'})
|
119
|
-
.children('ul').css({position: 'absolute', margin: 0, padding: 0})
|
120
|
-
.children('li').css({margin: options.margin, padding: options.padding});
|
121
|
-
|
122
|
-
if(isNaN(options.height) || options.height === 0)
|
123
|
-
{
|
124
|
-
el.children('ul').children('li').each(function(){
|
125
|
-
var current = $(this);
|
126
|
-
if(current.height() > state.itemHeight)
|
127
|
-
state.itemHeight = current.height();
|
128
|
-
});
|
129
|
-
// set the same height on all child elements
|
130
|
-
el.children('ul').children('li').each(function(){
|
131
|
-
var current = $(this);
|
132
|
-
current.height(state.itemHeight);
|
133
|
-
});
|
134
|
-
// set element to total height
|
135
|
-
var box = (options.margin) + (options.padding * 2);
|
136
|
-
el.height(((state.itemHeight + box) * options.showItems) + options.margin);
|
137
|
-
}
|
138
|
-
else
|
139
|
-
{
|
140
|
-
// set the preferred height
|
141
|
-
el.height(options.height);
|
142
|
-
}
|
143
|
-
|
144
|
-
var initThis = this;
|
145
|
-
if(!options.startPaused) {
|
146
|
-
internal.startInterval.call( initThis );
|
147
|
-
}
|
148
|
-
|
149
|
-
if(options.mousePause)
|
150
|
-
{
|
151
|
-
el.bind("mouseenter", function () {
|
152
|
-
//if the automatic scroll is paused, don't change that.
|
153
|
-
if (state.isPaused === true) return;
|
154
|
-
state.pausedByCode = true;
|
155
|
-
// stop interval
|
156
|
-
internal.stopInterval.call( initThis );
|
157
|
-
methods.pause.call( initThis, true );
|
158
|
-
}).bind("mouseleave", function () {
|
159
|
-
//if the automatic scroll is paused, don't change that.
|
160
|
-
if (state.isPaused === true && !state.pausedByCode) return;
|
161
|
-
state.pausedByCode = false;
|
162
|
-
methods.pause.call(initThis, false);
|
163
|
-
// restart interval
|
164
|
-
internal.startInterval.call( initThis );
|
165
|
-
});
|
166
|
-
}
|
167
|
-
},
|
168
|
-
|
169
|
-
pause: function(pauseState) {
|
170
|
-
var state = $(this).data('state');
|
171
|
-
if(!state) return undefined;
|
172
|
-
if(state.itemCount < 2) return false;
|
173
|
-
state.isPaused = pauseState;
|
174
|
-
var el = state.element;
|
175
|
-
if(pauseState) {
|
176
|
-
$(this).addClass('paused');
|
177
|
-
el.trigger("vticker.pause");
|
178
|
-
}
|
179
|
-
else {
|
180
|
-
$(this).removeClass('paused');
|
181
|
-
el.trigger("vticker.resume");
|
182
|
-
}
|
183
|
-
},
|
184
|
-
|
185
|
-
next: function(attribs) {
|
186
|
-
var state = $(this).data('state');
|
187
|
-
if(!state) return undefined;
|
188
|
-
if(state.animating || state.itemCount < 2) return false;
|
189
|
-
internal.restartInterval.call( this );
|
190
|
-
internal.moveUp(state, attribs);
|
191
|
-
},
|
192
|
-
|
193
|
-
prev: function(attribs) {
|
194
|
-
var state = $(this).data('state');
|
195
|
-
if(!state) return undefined;
|
196
|
-
if(state.animating || state.itemCount < 2) return false;
|
197
|
-
internal.restartInterval.call( this );
|
198
|
-
internal.moveDown(state, attribs);
|
199
|
-
},
|
200
|
-
|
201
|
-
stop: function() {
|
202
|
-
var state = $(this).data('state');
|
203
|
-
if(!state) return undefined;
|
204
|
-
internal.stopInterval.call( this );
|
205
|
-
},
|
206
|
-
|
207
|
-
remove: function() {
|
208
|
-
var state = $(this).data('state');
|
209
|
-
if(!state) return undefined;
|
210
|
-
internal.stopInterval.call( this );
|
211
|
-
var el = state.element;
|
212
|
-
el.unbind();
|
213
|
-
el.remove();
|
214
|
-
}
|
215
|
-
};
|
216
|
-
|
217
|
-
$.fn.vTicker = function( method ) {
|
218
|
-
if ( methods[method] ) {
|
219
|
-
return methods[method].apply( this, Array.prototype.slice.call( arguments, 1 ));
|
220
|
-
} else if ( typeof method === 'object' || ! method ) {
|
221
|
-
return methods.init.apply( this, arguments );
|
222
|
-
} else {
|
223
|
-
$.error( 'Method ' + method + ' does not exist on jQuery.vTicker' );
|
224
|
-
}
|
225
|
-
};
|
226
|
-
})(jQuery);
|
data/vticker_rails.gemspec
DELETED
@@ -1,23 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'vticker_rails/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = "vticker_rails"
|
8
|
-
spec.version = VtickerRails::VERSION
|
9
|
-
spec.authors = ["Süleyman ÖZEV"]
|
10
|
-
spec.email = ["sulozev@gmail.com"]
|
11
|
-
spec.summary = %q{jQuery news ticker}
|
12
|
-
spec.description = %q{News ticker for jQuery}
|
13
|
-
spec.homepage = "http://github.com/suleymanozev/vticker_rails"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = `git ls-files -z`.split("\x0")
|
17
|
-
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
-
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = ["lib"]
|
20
|
-
|
21
|
-
spec.add_development_dependency "bundler", "~> 1.7"
|
22
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
-
end
|