vticker_rails 0.0.1 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ebbd6840aa7cf6f884589f6e85eb8dd1a1e55e8
4
- data.tar.gz: 4a9652bca05ec204b510cec6ee8d1a6a301cab3b
3
+ metadata.gz: df5a81a0b6cfa106e3242a90455b6a58655fa18c
4
+ data.tar.gz: 6195ccca15042ce527a18b25b9cf0bd355911718
5
5
  SHA512:
6
- metadata.gz: 619a2c47e40833d3dc1173b38a025a1269e11c0b8633293b3778e5618548412064380758dc3ebd04131ed6086bfee2bd9640dee46e4dbd092dddc800a13261f5
7
- data.tar.gz: 9279c6989c031c1060a7e1e0b0cc627faba37540394bca5975c63b7c2c77fcddb396c02fddc3bb33e5aafc8da41ef777fdf760f49338740075f1fbef4c163ebe
6
+ metadata.gz: a0304c499b573896cd1d159b9051cb0714fde4a5a218e7ef2afde5207f30836dcc3ab0b9c08ae9c09d27e56a39724a66b55c2ea5ba52def1e297cf3ed76db93b
7
+ data.tar.gz: fc5dcee20c6ed64243347d855759e931543465185e7f8e469b96e9819c322110c5826f6dc2ad8dd6b7a6efdab83bde855e447ccad992ac5f12e723622a91cb5a
@@ -1,6 +1,4 @@
1
- Copyright (c) 2014 Süleyman ÖZEV
2
-
3
- MIT License
1
+ Copyright 2014 YOURNAME
4
2
 
5
3
  Permission is hereby granted, free of charge, to any person obtaining
6
4
  a copy of this software and associated documentation files (the
data/README.rdoc ADDED
@@ -0,0 +1,3 @@
1
+ = VtickerRails
2
+
3
+ This project rocks and uses MIT-LICENSE.
data/Rakefile CHANGED
@@ -1,2 +1,21 @@
1
- require "bundler/gem_tasks"
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
 
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :vticker_rails do
3
+ # # Task goes here
4
+ # end
@@ -1,3 +1,3 @@
1
1
  module VtickerRails
2
- VERSION = "0.0.1"
2
+ VERSION = "1.0.1"
3
3
  end
data/lib/vticker_rails.rb CHANGED
@@ -1,5 +1,2 @@
1
- require "vticker_rails/version"
2
-
3
1
  module VtickerRails
4
- # Your code goes here...
5
2
  end
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: 0.0.1
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: bundler
14
+ name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.7'
20
- type: :development
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.7'
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: '10.0'
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: '10.0'
41
- description: News ticker for jQuery
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
- - ".gitignore"
49
- - Gemfile
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
- - vendor/assets/javascripts/vticker.js
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: jQuery news ticker
103
+ summary: Jquery news ticker
81
104
  test_files: []
data/.gitignore DELETED
@@ -1,14 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- mkmf.log
data/Gemfile DELETED
@@ -1,4 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Specify your gem's dependencies in vticker_rails.gemspec
4
- gemspec
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);
@@ -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