jquery-knob-rails 1.2.13
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +10 -0
- data/.travis.yml +12 -0
- data/CHANGELOG.md +3 -0
- data/CONTRIBUTING.md +144 -0
- data/Gemfile +6 -0
- data/MIT-LICENSE +21 -0
- data/README.md +36 -0
- data/Rakefile +18 -0
- data/jquery-knob-rails.gemspec +26 -0
- data/lib/jquery-knob-rails.rb +1 -0
- data/lib/jquery-knob/rails.rb +7 -0
- data/lib/jquery-knob/rails/engine.rb +6 -0
- data/lib/jquery-knob/rails/version.rb +5 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +65 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +31 -0
- data/test/dummy/config/environments/production.rb +64 -0
- data/test/dummy/config/environments/test.rb +35 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +10 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +2 -0
- data/test/integration/navigation_test.rb +18 -0
- data/test/jquery-knob-rails_test.rb +7 -0
- data/test/test_helper.rb +15 -0
- data/vendor/assets/javascripts/jquery.knob.js +805 -0
- data/vendor/assets/javascripts/jquery.knob.min.js +1 -0
- metadata +132 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 690c8cff18710f7929ad84ef1c30ec0b5c605728
|
4
|
+
data.tar.gz: fb9d59f4153cb0eb31b801aea0767de711d7aaed
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e498a918f1845cb6d664e8e3c45c16387a71e163256c0260a8301831cd5d7c3e6d64f82c6906d164f0250762b2b13f7d5ac1c7c2cd21cc5895aefbcf697fb8a2
|
7
|
+
data.tar.gz: f58a828f81043897291e3f768156017d201697aa6b2c2fde01d54c532714dec4da402f10a281243d1f7f700af8715dbb1368c3a5cbe4915a9529b415822c5c74
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,144 @@
|
|
1
|
+
Contributing to jquery-knob-rails
|
2
|
+
=====================
|
3
|
+
|
4
|
+
[![Build Status](https://travis-ci.org/Jack12816/jquery-knob-rails.svg?branch=master)](https://travis-ci.org/Jack12816/jquery-knob-rails)
|
5
|
+
|
6
|
+
jquery-knob-rails is work of [many
|
7
|
+
contributors](https://github.com/aterrien/jQuery-Knob/graphs/contributors).
|
8
|
+
You're encouraged to submit [pull
|
9
|
+
requests](https://github.com/aterrien/jQuery-Knob/pulls), [propose features
|
10
|
+
and discuss issues](https://github.com/aterrien/jQuery-Knob/issues).
|
11
|
+
|
12
|
+
#### Updating jQuery Knob
|
13
|
+
|
14
|
+
If the jQuery Knob scripts are outdated (i.e. maybe a new version of jquery was
|
15
|
+
released yesterday), feel free to open an issue and prod us to get that thing
|
16
|
+
updated. However, for security reasons, we won't be accepting pull requests
|
17
|
+
with updated jQuery Knob scripts.
|
18
|
+
|
19
|
+
#### Fork the Project
|
20
|
+
|
21
|
+
Fork the [project on Github](https://github.com/Jack12816/jquery-knob-rails)
|
22
|
+
and check out your copy.
|
23
|
+
|
24
|
+
```
|
25
|
+
git clone https://github.com/contributor/jquery-knob-rails.git
|
26
|
+
cd jquery-knob-rails
|
27
|
+
git remote add upstream https://github.com/Jack12816/jquery-knob-rails.git
|
28
|
+
```
|
29
|
+
|
30
|
+
#### Create a Topic Branch
|
31
|
+
|
32
|
+
Make sure your fork is up-to-date and create a topic branch for your feature or
|
33
|
+
bug fix.
|
34
|
+
|
35
|
+
```
|
36
|
+
git checkout master
|
37
|
+
git pull upstream master
|
38
|
+
git checkout -b my-feature-branch
|
39
|
+
```
|
40
|
+
|
41
|
+
#### Bundle Install and Test
|
42
|
+
|
43
|
+
Ensure that you can build the project and run tests.
|
44
|
+
|
45
|
+
```
|
46
|
+
bundle install
|
47
|
+
bundle exec rake test
|
48
|
+
```
|
49
|
+
|
50
|
+
#### Write Tests
|
51
|
+
|
52
|
+
Try to write a test that reproduces the problem you're trying to fix or
|
53
|
+
describes a feature that you want to build. Add to [test](test).
|
54
|
+
|
55
|
+
#### Testing
|
56
|
+
|
57
|
+
This is a gem that simply includes jQuery Knob into the Rails
|
58
|
+
asset pipeline. The asset pipeline functionality is well tested within the
|
59
|
+
Rails framework. And jQuery Knob have its own extensive
|
60
|
+
test suites. Thus, there's not a lot to actually test here.
|
61
|
+
|
62
|
+
That being said, we do have a few integration-level tests to make sure
|
63
|
+
everything is being included within a sample Rails app.
|
64
|
+
|
65
|
+
If you're making changes to the actual gem, run the tests as follows:
|
66
|
+
|
67
|
+
1. Checkout the demo Rails app: `git clone git://github.com/JangoSteve/Rails-jQuery-Demo.git`
|
68
|
+
|
69
|
+
2. Install the gems: `bundle install`
|
70
|
+
|
71
|
+
3. Change the jquery-knob-rails gem in the Gemfile to use your local
|
72
|
+
version of the gem with your updates: `gem 'jquery-knob-rails', :path => '../path/to/jquery-knob-rails'`
|
73
|
+
|
74
|
+
4. Update your bundled jquery-knob-rails gem: `bundle update jquery-knob-rails`
|
75
|
+
|
76
|
+
5. Run the tests: `bundle exec rspec spec/`
|
77
|
+
|
78
|
+
We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.
|
79
|
+
|
80
|
+
#### Write Code
|
81
|
+
|
82
|
+
Implement your feature or bug fix.
|
83
|
+
|
84
|
+
Make sure that `bundle exec rake test` completes without errors.
|
85
|
+
|
86
|
+
#### Write Documentation
|
87
|
+
|
88
|
+
Document any external behavior in the [README](README.md).
|
89
|
+
|
90
|
+
#### Commit Changes
|
91
|
+
|
92
|
+
Make sure git knows your name and email address:
|
93
|
+
|
94
|
+
```
|
95
|
+
git config --global user.name "Your Name"
|
96
|
+
git config --global user.email "contributor@example.com"
|
97
|
+
```
|
98
|
+
|
99
|
+
Writing good commit logs is important. A commit log should describe what
|
100
|
+
changed and why.
|
101
|
+
|
102
|
+
```
|
103
|
+
git add ...
|
104
|
+
git commit
|
105
|
+
```
|
106
|
+
|
107
|
+
#### Push
|
108
|
+
|
109
|
+
```
|
110
|
+
git push origin my-feature-branch
|
111
|
+
```
|
112
|
+
|
113
|
+
#### Make a Pull Request
|
114
|
+
|
115
|
+
Go to https://github.com/contributor/jquery-knob-rails and select your feature
|
116
|
+
branch. Click the 'Pull Request' button and fill out the form. Pull requests
|
117
|
+
are usually reviewed within a few days.
|
118
|
+
|
119
|
+
#### Rebase
|
120
|
+
|
121
|
+
If you've been working on a change for a while, rebase with upstream/master.
|
122
|
+
|
123
|
+
```
|
124
|
+
git fetch upstream
|
125
|
+
git rebase upstream/master
|
126
|
+
git push origin my-feature-branch -f
|
127
|
+
```
|
128
|
+
|
129
|
+
#### Check on Your Pull Request
|
130
|
+
|
131
|
+
Go back to your pull request after a few minutes and see whether it passed
|
132
|
+
muster with Travis-CI. Everything should look green, otherwise fix issues and
|
133
|
+
amend your commit as described above.
|
134
|
+
|
135
|
+
#### Be Patient
|
136
|
+
|
137
|
+
It's likely that your change will not be merged and that the nitpicky
|
138
|
+
maintainers will ask you to do more, or fix seemingly benign problems. Hang on
|
139
|
+
there!
|
140
|
+
|
141
|
+
#### Thank You
|
142
|
+
|
143
|
+
Please do know that we really appreciate and value your time and work. We love
|
144
|
+
you, really.
|
data/Gemfile
ADDED
data/MIT-LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2010-2016 Andre Arko
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# jquery-knob-rails
|
2
|
+
|
3
|
+
This gem provides the [jQuery Knob
|
4
|
+
plugin](https://github.com/aterrien/jQuery-Knob) for your Rails 4+ application.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
Add the following to your Gemfile:
|
9
|
+
|
10
|
+
```ruby
|
11
|
+
gem 'jquery-knob-rails'
|
12
|
+
```
|
13
|
+
|
14
|
+
The jquery-knob files will be added to the asset pipeline and available for you
|
15
|
+
to use. If they're not already in `app/assets/javascripts/application.js` by
|
16
|
+
default, add these lines:
|
17
|
+
|
18
|
+
```js
|
19
|
+
//= require jquery
|
20
|
+
//= require jquery-knob
|
21
|
+
```
|
22
|
+
|
23
|
+
## Contributing to jquery-knob-rails
|
24
|
+
|
25
|
+
jquery-knob-rails is work of many contributors. You're encouraged to submit
|
26
|
+
pull requests, propose features and discuss issues.
|
27
|
+
|
28
|
+
* If it's an issue pertaining to the jquery-knob-rails javascript, please report it to the [jQuery Knob project](https://github.com/aterrien/jQuery-Knob).
|
29
|
+
|
30
|
+
* If the jQuery scripts are outdated (i.e. maybe a new version of jQuery Knob was released yesterday), feel free to open an issue and prod us to get that thing updated. However, for security reasons, we won't be accepting pull requests with updated jQuery Knob scripts.
|
31
|
+
|
32
|
+
See [CONTRIBUTING](CONTRIBUTING.md).
|
33
|
+
|
34
|
+
## License
|
35
|
+
|
36
|
+
jquery-knob-rails is released under the [MIT License](MIT-LICENSE).
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
require 'rake/testtask'
|
3
|
+
|
4
|
+
begin
|
5
|
+
require 'bundler/setup'
|
6
|
+
require 'bundler/gem_tasks'
|
7
|
+
rescue LoadError
|
8
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
9
|
+
end
|
10
|
+
|
11
|
+
Rake::TestTask.new(:test) do |t|
|
12
|
+
t.libs << 'lib'
|
13
|
+
t.libs << 'test'
|
14
|
+
t.pattern = 'test/**/*_test.rb'
|
15
|
+
t.verbose = false
|
16
|
+
end
|
17
|
+
|
18
|
+
task :default => :test
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/jquery-knob/rails/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |s|
|
5
|
+
s.name = "jquery-knob-rails"
|
6
|
+
s.version = JqueryKnob::Rails::VERSION
|
7
|
+
s.platform = Gem::Platform::RUBY
|
8
|
+
s.authors = ["Hermann Mayer"]
|
9
|
+
s.email = ["hermann.mayer92@gmail.com"]
|
10
|
+
s.homepage = "https://github.com/rails/jquery-rails"
|
11
|
+
s.summary = "Use jQuery with Rails 4+"
|
12
|
+
s.description = "This gem provides the jQuery Knob plugin for your Rails 4+ application."
|
13
|
+
s.license = "MIT"
|
14
|
+
|
15
|
+
s.required_ruby_version = ">= 1.9.3"
|
16
|
+
s.required_rubygems_version = ">= 1.3.6"
|
17
|
+
|
18
|
+
s.add_dependency "railties", ">= 4.2.0"
|
19
|
+
s.add_dependency "thor", ">= 0.14", "< 2.0"
|
20
|
+
|
21
|
+
s.add_dependency "rails-dom-testing", ">= 1", "< 3"
|
22
|
+
|
23
|
+
s.files = `git ls-files`.split("\n")
|
24
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
|
25
|
+
s.require_path = 'lib'
|
26
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'jquery-knob/rails'
|
data/test/dummy/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
|
+
|
3
|
+
# Pick the frameworks you want:
|
4
|
+
# require "active_record/railtie"
|
5
|
+
# require "action_controller/railtie"
|
6
|
+
require "action_mailer/railtie"
|
7
|
+
# require "active_resource/railtie"
|
8
|
+
require "sprockets/railtie"
|
9
|
+
# require "rails/test_unit/railtie"
|
10
|
+
|
11
|
+
Bundler.require
|
12
|
+
require "jquery-knob-rails"
|
13
|
+
|
14
|
+
module Dummy
|
15
|
+
class Application < Rails::Application
|
16
|
+
# Settings in config/environments/* take precedence over those specified here.
|
17
|
+
# Application configuration should go into files in config/initializers
|
18
|
+
# -- all .rb files in that directory are automatically loaded.
|
19
|
+
|
20
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
21
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
22
|
+
|
23
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
24
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
25
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
26
|
+
|
27
|
+
# Activate observers that should always be running.
|
28
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
29
|
+
|
30
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
31
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
32
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
33
|
+
|
34
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
35
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
36
|
+
# config.i18n.default_locale = :de
|
37
|
+
|
38
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
39
|
+
config.encoding = "utf-8"
|
40
|
+
|
41
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
42
|
+
config.filter_parameters += [:password]
|
43
|
+
|
44
|
+
# Enable escaping HTML in JSON.
|
45
|
+
config.active_support.escape_html_entities_in_json = true
|
46
|
+
|
47
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
48
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
49
|
+
# like if you have constraints or database-specific column types
|
50
|
+
# config.active_record.schema_format = :sql
|
51
|
+
|
52
|
+
# Enforce whitelist mode for mass assignment.
|
53
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
54
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
55
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
56
|
+
# config.active_record.whitelist_attributes = true
|
57
|
+
|
58
|
+
# Enable the asset pipeline
|
59
|
+
config.assets.enabled = true
|
60
|
+
|
61
|
+
# Version of your assets, change this if you want to expire all your assets
|
62
|
+
config.assets.version = '1.0'
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
Dummy::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
|
+
|
4
|
+
# In the development environment your application's code is reloaded on
|
5
|
+
# every request. This slows down response time but is perfect for development
|
6
|
+
# since you don't have to restart the web server when you make code changes.
|
7
|
+
config.cache_classes = false
|
8
|
+
|
9
|
+
# Log error messages when you accidentally call methods on nil.
|
10
|
+
config.whiny_nils = true
|
11
|
+
|
12
|
+
# Show full error reports and disable caching
|
13
|
+
config.consider_all_requests_local = true
|
14
|
+
config.action_controller.perform_caching = false
|
15
|
+
|
16
|
+
# Don't care if the mailer can't send
|
17
|
+
config.action_mailer.raise_delivery_errors = false
|
18
|
+
|
19
|
+
# Print deprecation notices to the Rails logger
|
20
|
+
config.active_support.deprecation = :log
|
21
|
+
|
22
|
+
# Only use best-standards-support built into browsers
|
23
|
+
config.action_dispatch.best_standards_support = :builtin
|
24
|
+
|
25
|
+
|
26
|
+
# Do not compress assets
|
27
|
+
config.assets.compress = false
|
28
|
+
|
29
|
+
# Expands the lines which load the assets
|
30
|
+
config.assets.debug = true
|
31
|
+
end
|