jquery_count_to_rails 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1dcc9570b195906d9cc1bdd6a25034c8d9057ca9
4
+ data.tar.gz: 214a6fa3a4487c384044646c6463229f6edee98f
5
+ SHA512:
6
+ metadata.gz: a1ecaf1b87137881ee7103c4942f3ca4b8f89b7e0cb24864aca1a4abd353a1be32ec57447042220e073617ef999c1182367513a997434fcd4f7efca29beb1c99
7
+ data.tar.gz: 2043865ed28716987bb24189c4679a08ed1e5253ffe6a0979f3b5c2c6c68a0a81a05b60cc01e4529c84e2592b217a6893728c1c87b2e8f1daa3d6a9dd680ad9c
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright 2017 ElliottAYoung
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,51 @@
1
+ # JqueryCountToRails
2
+ This is a simple Rails Gem to add the [JQuery CountTo Plugin](https://github.com/mhuggins/jquery-countTo) to your Asset Pipeline.
3
+
4
+
5
+ ##Installation
6
+ Add this line to your application's Gemfile:
7
+
8
+ ```ruby
9
+ gem 'jquery_count_to_rails'
10
+ ```
11
+
12
+ And then execute:
13
+
14
+ ```bash
15
+ $ bundle install
16
+ ```
17
+
18
+ Or install it yourself as:
19
+
20
+ ```bash
21
+ $ gem install jquery_count_to_rails
22
+ ```
23
+
24
+ ##Usage
25
+ To include the relevant JQuery library simply add the following to `app/assets/javascripts/application.js`
26
+
27
+ //= require jquery.countTo
28
+
29
+ Once you've included it, you can use the library in any of your views like so:
30
+
31
+ ```html
32
+ <span class="timer" data-from="0" data-to="100" data-speed="5000" data-refresh-interval="50">100</span>
33
+
34
+ <script type="text/javascript">
35
+ $('.timer').countTo();
36
+ </script>
37
+ ```
38
+
39
+ ##Contributing
40
+ To contribute please begin by creating an issue on this Repo. Once you've done that, fork this Repo, then, on your fork, make any desired changes.
41
+
42
+ Please name your branch as follows:
43
+
44
+ ```
45
+ feature/#{Github Issue Number}-#{Description of Issue}
46
+ ```
47
+
48
+ Then make a PR onto this repo with your desired changes.
49
+
50
+ ##License
51
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,33 @@
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 = 'JqueryCountToRails'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+
18
+
19
+
20
+
21
+
22
+ require 'bundler/gem_tasks'
23
+
24
+ require 'rake/testtask'
25
+
26
+ Rake::TestTask.new(:test) do |t|
27
+ t.libs << 'test'
28
+ t.pattern = 'test/**/*_test.rb'
29
+ t.verbose = false
30
+ end
31
+
32
+
33
+ task default: :test
@@ -0,0 +1,14 @@
1
+ module JqueryCountToRails
2
+ if defined? ::Rails
3
+ if ::Rails.version.to_s < '3.1'
4
+ require 'jquery_count_to_rails/railtie'
5
+ else
6
+ require 'jquery_count_to_rails/engine'
7
+ end
8
+ elsif defined? ::Sprockets
9
+ require 'jquery_count_to_rails/sprockets'
10
+ else
11
+ require 'jquery_count_to_rails/errors/unsupported_platform_error'
12
+ raise UnsupportedPlatformError
13
+ end
14
+ end
@@ -0,0 +1,6 @@
1
+ module JqueryCountToRails
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ class UnsupportedPlatformError < StandardError
2
+ def initialize(msg="Your Technology is Not Supported. Supported Technologies: Rails, Sprockets.")
3
+ super
4
+ end
5
+ end
@@ -0,0 +1,6 @@
1
+ module JqueryCountToRails
2
+ module Rails
3
+ class Railtie < ::Rails::Railtie
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,5 @@
1
+ module JqueryCountToRails
2
+ root_dir = File.expand_path(File.dirname(File.dirname(File.dirname(__FILE__))))
3
+
4
+ Sprockets.paths << File.join(root_dir, 'vendor', 'assets')
5
+ end
@@ -0,0 +1,3 @@
1
+ module JqueryCountToRails
2
+ VERSION = '1.0.0'
3
+ end
metadata ADDED
@@ -0,0 +1,81 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jquery_count_to_rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - ElliottAYoung
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2017-05-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: sqlite3
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ description: A Rails Gem to include the JQuery Plugin for CountTo
42
+ email:
43
+ - elliott.a.young@gmail.com
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - MIT-LICENSE
49
+ - README.md
50
+ - Rakefile
51
+ - lib/jquery_count_to_rails.rb
52
+ - lib/jquery_count_to_rails/engine.rb
53
+ - lib/jquery_count_to_rails/errors/unsupported_platform_error.rb
54
+ - lib/jquery_count_to_rails/railtie.rb
55
+ - lib/jquery_count_to_rails/sprockets.rb
56
+ - lib/jquery_count_to_rails/version.rb
57
+ homepage: https://github.com/ElliottAYoung/jquery_count_to_rails
58
+ licenses:
59
+ - MIT
60
+ metadata: {}
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubyforge_project:
77
+ rubygems_version: 2.5.1
78
+ signing_key:
79
+ specification_version: 4
80
+ summary: A Rails Gem to include the JQuery Plugin for CountTo
81
+ test_files: []