inputmask-rails 4.0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +50 -0
  3. data/.ruby-gemset +1 -0
  4. data/.ruby-version +1 -0
  5. data/Gemfile +4 -0
  6. data/Gemfile.lock +158 -0
  7. data/LICENSE +21 -0
  8. data/README.md +66 -0
  9. data/Rakefile +31 -0
  10. data/inputmask-rails.gemspec +27 -0
  11. data/lib/inputmask-rails.rb +1 -0
  12. data/lib/inputmask/rails.rb +8 -0
  13. data/lib/inputmask/rails/engine.rb +6 -0
  14. data/lib/inputmask/rails/version.rb +6 -0
  15. data/vendor/assets/javascripts/bindings/inputmask.binding.js +33 -0
  16. data/vendor/assets/javascripts/bindings/inputmask.binding.min.js +1 -0
  17. data/vendor/assets/javascripts/dependencyLibs/inputmask.dependencyLib.jqlite.js +129 -0
  18. data/vendor/assets/javascripts/dependencyLibs/inputmask.dependencyLib.jqlite.min.js +1 -0
  19. data/vendor/assets/javascripts/dependencyLibs/inputmask.dependencyLib.jquery.js +19 -0
  20. data/vendor/assets/javascripts/dependencyLibs/inputmask.dependencyLib.jquery.min.js +1 -0
  21. data/vendor/assets/javascripts/dependencyLibs/inputmask.dependencyLib.js +301 -0
  22. data/vendor/assets/javascripts/dependencyLibs/inputmask.dependencyLib.min.js +1 -0
  23. data/vendor/assets/javascripts/global/window.js +11 -0
  24. data/vendor/assets/javascripts/global/window.min.js +1 -0
  25. data/vendor/assets/javascripts/inputmask.date.extensions.js +252 -0
  26. data/vendor/assets/javascripts/inputmask.date.extensions.min.js +1 -0
  27. data/vendor/assets/javascripts/inputmask.extensions.js +97 -0
  28. data/vendor/assets/javascripts/inputmask.extensions.min.js +1 -0
  29. data/vendor/assets/javascripts/inputmask.js +2745 -0
  30. data/vendor/assets/javascripts/inputmask.min.js +1 -0
  31. data/vendor/assets/javascripts/inputmask.numeric.extensions.js +553 -0
  32. data/vendor/assets/javascripts/inputmask.numeric.extensions.min.js +1 -0
  33. data/vendor/assets/javascripts/jquery.inputmask.bundle.js +3867 -0
  34. data/vendor/assets/javascripts/jquery.inputmask.bundle.min.js +9 -0
  35. data/vendor/assets/javascripts/jquery.inputmask.js +97 -0
  36. data/vendor/assets/javascripts/jquery.inputmask.min.js +1 -0
  37. metadata +135 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 6012b9f4664771f48c00da7ed2b85cde4af767f8b7db82aba714952aee01aa96
4
+ data.tar.gz: 5ca7fd439a021364f94a54ea01514ab37083077d8f35f06f5e34036cda551b22
5
+ SHA512:
6
+ metadata.gz: 0db133b3ca57647fdb9887499d57622f82d4ac84181efe96c75eff28c87b42060da32127ecdf98364707a966850b043e4984f03c62096c538b784a592e2bbc16
7
+ data.tar.gz: 3d0fb67d4a39a9dfe2a9aa14a885dc3b3f8bee516a7cdddb3dffa210de7375ed894a8c4e044e9f36dc5c6962228b878875bd1b78312a241b359ca54cc4ae2743
data/.gitignore ADDED
@@ -0,0 +1,50 @@
1
+ *.gem
2
+ *.rbc
3
+ /.config
4
+ /coverage/
5
+ /InstalledFiles
6
+ /pkg/
7
+ /spec/reports/
8
+ /spec/examples.txt
9
+ /test/tmp/
10
+ /test/version_tmp/
11
+ /tmp/
12
+
13
+ # Used by dotenv library to load environment variables.
14
+ # .env
15
+
16
+ ## Specific to RubyMotion:
17
+ .dat*
18
+ .repl_history
19
+ build/
20
+ *.bridgesupport
21
+ build-iPhoneOS/
22
+ build-iPhoneSimulator/
23
+
24
+ ## Specific to RubyMotion (use of CocoaPods):
25
+ #
26
+ # We recommend against adding the Pods directory to your .gitignore. However
27
+ # you should judge for yourself, the pros and cons are mentioned at:
28
+ # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
29
+ #
30
+ # vendor/Pods/
31
+
32
+ ## Documentation cache and generated files:
33
+ /.yardoc/
34
+ /_yardoc/
35
+ /doc/
36
+ /rdoc/
37
+
38
+ ## Environment normalization:
39
+ /.bundle/
40
+ /vendor/bundle
41
+ /lib/bundler/man/
42
+
43
+ # for a library or gem, you might want to ignore these files since the code is
44
+ # intended to run in multiple environments; otherwise, check them in:
45
+ # Gemfile.lock
46
+ # .ruby-version
47
+ # .ruby-gemset
48
+
49
+ # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
50
+ .rvmrc
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ inputmask-rails
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.5.7
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in inputmask-rails.gemspec
4
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,158 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ inputmask-rails (4.0.9.1)
5
+ rails (>= 3.2)
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actioncable (6.0.1)
11
+ actionpack (= 6.0.1)
12
+ nio4r (~> 2.0)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailbox (6.0.1)
15
+ actionpack (= 6.0.1)
16
+ activejob (= 6.0.1)
17
+ activerecord (= 6.0.1)
18
+ activestorage (= 6.0.1)
19
+ activesupport (= 6.0.1)
20
+ mail (>= 2.7.1)
21
+ actionmailer (6.0.1)
22
+ actionpack (= 6.0.1)
23
+ actionview (= 6.0.1)
24
+ activejob (= 6.0.1)
25
+ mail (~> 2.5, >= 2.5.4)
26
+ rails-dom-testing (~> 2.0)
27
+ actionpack (6.0.1)
28
+ actionview (= 6.0.1)
29
+ activesupport (= 6.0.1)
30
+ rack (~> 2.0)
31
+ rack-test (>= 0.6.3)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
34
+ actiontext (6.0.1)
35
+ actionpack (= 6.0.1)
36
+ activerecord (= 6.0.1)
37
+ activestorage (= 6.0.1)
38
+ activesupport (= 6.0.1)
39
+ nokogiri (>= 1.8.5)
40
+ actionview (6.0.1)
41
+ activesupport (= 6.0.1)
42
+ builder (~> 3.1)
43
+ erubi (~> 1.4)
44
+ rails-dom-testing (~> 2.0)
45
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
46
+ activejob (6.0.1)
47
+ activesupport (= 6.0.1)
48
+ globalid (>= 0.3.6)
49
+ activemodel (6.0.1)
50
+ activesupport (= 6.0.1)
51
+ activerecord (6.0.1)
52
+ activemodel (= 6.0.1)
53
+ activesupport (= 6.0.1)
54
+ activestorage (6.0.1)
55
+ actionpack (= 6.0.1)
56
+ activejob (= 6.0.1)
57
+ activerecord (= 6.0.1)
58
+ marcel (~> 0.3.1)
59
+ activesupport (6.0.1)
60
+ concurrent-ruby (~> 1.0, >= 1.0.2)
61
+ i18n (>= 0.7, < 2)
62
+ minitest (~> 5.1)
63
+ tzinfo (~> 1.1)
64
+ zeitwerk (~> 2.2)
65
+ builder (3.2.3)
66
+ concurrent-ruby (1.1.5)
67
+ crass (1.0.5)
68
+ diff-lcs (1.3)
69
+ erubi (1.9.0)
70
+ globalid (0.4.2)
71
+ activesupport (>= 4.2.0)
72
+ i18n (1.7.0)
73
+ concurrent-ruby (~> 1.0)
74
+ loofah (2.3.1)
75
+ crass (~> 1.0.2)
76
+ nokogiri (>= 1.5.9)
77
+ mail (2.7.1)
78
+ mini_mime (>= 0.1.1)
79
+ marcel (0.3.3)
80
+ mimemagic (~> 0.3.2)
81
+ method_source (0.9.2)
82
+ mimemagic (0.3.3)
83
+ mini_mime (1.0.2)
84
+ mini_portile2 (2.4.0)
85
+ minitest (5.13.0)
86
+ nio4r (2.5.2)
87
+ nokogiri (1.10.5)
88
+ mini_portile2 (~> 2.4.0)
89
+ rack (2.0.7)
90
+ rack-test (1.1.0)
91
+ rack (>= 1.0, < 3)
92
+ rails (6.0.1)
93
+ actioncable (= 6.0.1)
94
+ actionmailbox (= 6.0.1)
95
+ actionmailer (= 6.0.1)
96
+ actionpack (= 6.0.1)
97
+ actiontext (= 6.0.1)
98
+ actionview (= 6.0.1)
99
+ activejob (= 6.0.1)
100
+ activemodel (= 6.0.1)
101
+ activerecord (= 6.0.1)
102
+ activestorage (= 6.0.1)
103
+ activesupport (= 6.0.1)
104
+ bundler (>= 1.3.0)
105
+ railties (= 6.0.1)
106
+ sprockets-rails (>= 2.0.0)
107
+ rails-dom-testing (2.0.3)
108
+ activesupport (>= 4.2.0)
109
+ nokogiri (>= 1.6)
110
+ rails-html-sanitizer (1.3.0)
111
+ loofah (~> 2.3)
112
+ railties (6.0.1)
113
+ actionpack (= 6.0.1)
114
+ activesupport (= 6.0.1)
115
+ method_source
116
+ rake (>= 0.8.7)
117
+ thor (>= 0.20.3, < 2.0)
118
+ rake (13.0.1)
119
+ rspec (3.9.0)
120
+ rspec-core (~> 3.9.0)
121
+ rspec-expectations (~> 3.9.0)
122
+ rspec-mocks (~> 3.9.0)
123
+ rspec-core (3.9.0)
124
+ rspec-support (~> 3.9.0)
125
+ rspec-expectations (3.9.0)
126
+ diff-lcs (>= 1.2.0, < 2.0)
127
+ rspec-support (~> 3.9.0)
128
+ rspec-mocks (3.9.0)
129
+ diff-lcs (>= 1.2.0, < 2.0)
130
+ rspec-support (~> 3.9.0)
131
+ rspec-support (3.9.0)
132
+ sprockets (4.0.0)
133
+ concurrent-ruby (~> 1.0)
134
+ rack (> 1, < 3)
135
+ sprockets-rails (3.2.1)
136
+ actionpack (>= 4.0)
137
+ activesupport (>= 4.0)
138
+ sprockets (>= 3.0.0)
139
+ thor (0.20.3)
140
+ thread_safe (0.3.6)
141
+ tzinfo (1.2.5)
142
+ thread_safe (~> 0.1)
143
+ websocket-driver (0.7.1)
144
+ websocket-extensions (>= 0.1.0)
145
+ websocket-extensions (0.1.4)
146
+ zeitwerk (2.2.1)
147
+
148
+ PLATFORMS
149
+ ruby
150
+
151
+ DEPENDENCIES
152
+ bundler (~> 1.17)
153
+ inputmask-rails!
154
+ rake (~> 13.0)
155
+ rspec (~> 3.0)
156
+
157
+ BUNDLED WITH
158
+ 1.17.3
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2019 Henrique Gubert
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 all
13
+ 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 THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,66 @@
1
+ # inputmask-rails
2
+ [![Gem Version](https://badge.fury.io/rb/inputmask-rails.svg)](https://badge.fury.io/rb/inputmask-rails)
3
+
4
+ Wrapper gem to include Inputmask (js) to your Rails app
5
+
6
+ This gem is a wrapper of [Inputmask project](https://github.com/RobinHerbots/Inputmask), that allows you to include Inputmask in your Rails app, using the asset pipeline.
7
+
8
+ The gem currently wraps **Inputmask version 4.0.9**.
9
+
10
+
11
+
12
+ ## Installation
13
+
14
+ Add this line to your application's Gemfile:
15
+
16
+ ```ruby
17
+ gem 'inputmask-rails'
18
+ ```
19
+
20
+ And then run:
21
+
22
+ $ bundle
23
+
24
+ Or install it yourself as:
25
+
26
+ $ gem install inputmask-rails
27
+
28
+
29
+ ## Usage
30
+
31
+ If you're using JQuery and want to include the full inputmask javascript (with all extensions), just add the following line to your `app/assets/javascripts/application.js` or `app/assets/javascripts/vendor.js`:
32
+ ```
33
+ //= require jquery.inputmask.bundle.min
34
+ ```
35
+
36
+ In case you are not using JQuery, or want to pick and choose extensions individually, please refer to the [Inputmask project](https://github.com/RobinHerbots/Inputmask) page and follow instructions (be careful to read the instructions of the right lib version, as of now it is **Inputmask version 4.0.9**)
37
+
38
+ This gem includes all published js files of the Inputmask project, so you can require any of them in your Rails app assets. Namely:
39
+ ```
40
+ # Non-minified
41
+ inputmask.js
42
+ inputmask.extensions.js
43
+ inputmask.extensions.numeric.js
44
+ inputmask.extensions.date.js
45
+ jquery.inputmask.js
46
+ bindings/inputmask.binding.js
47
+ dependencyLibs/inputmask.dependencyLib.jqlite.js
48
+ dependencyLibs/inputmask.dependencyLib.jquery.js
49
+ dependencyLibs/inputmask.dependencyLib.js
50
+ global/window.js
51
+ jquery.inputmask.bundle.js
52
+
53
+ # Minified
54
+ inputmask.min.js
55
+ inputmask.extensions.min.js
56
+ inputmask.extensions.numeric.min.js
57
+ inputmask.extensions.date.min.js
58
+ jquery.inputmask.min.js
59
+ bindings/inputmask.binding.min.js
60
+ dependencyLibs/inputmask.dependencyLib.jqlite.min.js
61
+ dependencyLibs/inputmask.dependencyLib.jquery.min.js
62
+ dependencyLibs/inputmask.dependencyLib.min.js
63
+ global/window.min.js
64
+ jquery.inputmask.bundle.min.js
65
+
66
+ ```
data/Rakefile ADDED
@@ -0,0 +1,31 @@
1
+ require "bundler/gem_tasks"
2
+
3
+ desc "Downloads JS files from public Inputmask repo"
4
+ task :download_inputmask do
5
+ def download_inputmask_file(filename, version)
6
+ puts "Downloading #{filename}.js"
7
+ puts `curl -o vendor/assets/javascripts/#{filename}.js https://raw.githubusercontent.com/RobinHerbots/Inputmask/#{version}/dist/inputmask/#{filename}.js`
8
+ puts "Downloading #{filename}.min.js"
9
+ puts `curl -o vendor/assets/javascripts/#{filename}.min.js https://raw.githubusercontent.com/RobinHerbots/Inputmask/#{version}/dist/min/inputmask/#{filename}.js`
10
+ end
11
+
12
+ def download_inputmask_bundle(filename, version)
13
+ puts "Downloading #{filename}.bundle.js"
14
+ puts `curl -o vendor/assets/javascripts/#{filename}.bundle.js https://raw.githubusercontent.com/RobinHerbots/Inputmask/#{version}/dist/#{filename}.bundle.js`
15
+ puts "Downloading #{filename}.bundle.min.js"
16
+ puts `curl -o vendor/assets/javascripts/#{filename}.bundle.min.js https://raw.githubusercontent.com/RobinHerbots/Inputmask/#{version}/dist/min/#{filename}.bundle.min.js`
17
+ end
18
+
19
+ download_inputmask_file('inputmask', Inputmask::Rails::INPUTMASK_VERSION)
20
+ download_inputmask_file('jquery.inputmask', Inputmask::Rails::INPUTMASK_VERSION)
21
+ download_inputmask_file('inputmask.extensions', Inputmask::Rails::INPUTMASK_VERSION)
22
+ download_inputmask_file('inputmask.date.extensions', Inputmask::Rails::INPUTMASK_VERSION)
23
+ download_inputmask_file('inputmask.numeric.extensions', Inputmask::Rails::INPUTMASK_VERSION)
24
+ download_inputmask_file('bindings/inputmask.binding', Inputmask::Rails::INPUTMASK_VERSION)
25
+ download_inputmask_file('dependencyLibs/inputmask.dependencyLib.jqlite', Inputmask::Rails::INPUTMASK_VERSION)
26
+ download_inputmask_file('dependencyLibs/inputmask.dependencyLib.jquery', Inputmask::Rails::INPUTMASK_VERSION)
27
+ download_inputmask_file('dependencyLibs/inputmask.dependencyLib', Inputmask::Rails::INPUTMASK_VERSION)
28
+ download_inputmask_file('global/window', Inputmask::Rails::INPUTMASK_VERSION)
29
+ download_inputmask_bundle('jquery.inputmask', Inputmask::Rails::INPUTMASK_VERSION)
30
+ puts "\e[32mDone!\e[0m"
31
+ end
@@ -0,0 +1,27 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'inputmask/rails/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "inputmask-rails"
8
+ spec.version = Inputmask::Rails::VERSION
9
+ spec.date = '2019-11-13'
10
+ spec.authors = ["Henrique Gubert"]
11
+ spec.email = ["guberthenrique@hotmail.com"]
12
+
13
+ spec.summary = %q{Wrapper gem to include Inputmask (js) to your Rails app}
14
+ spec.description = %q{This gem is a wrapper of Inputmask project, that allows you to include Inputmask in your Rails app, using the asset pipeline.}
15
+ spec.homepage = "https://github.com/hsgubert/inputmask-rails"
16
+ spec.license = "MIT"
17
+
18
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ spec.bindir = "exe"
20
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
21
+ spec.require_paths = ["lib"]
22
+
23
+ spec.add_runtime_dependency 'rails', '>= 3.2'
24
+ spec.add_development_dependency "bundler", "~> 1.17"
25
+ spec.add_development_dependency "rake", "~> 13.0"
26
+ spec.add_development_dependency "rspec", "~> 3.0"
27
+ end
@@ -0,0 +1 @@
1
+ require 'inputmask/rails'
@@ -0,0 +1,8 @@
1
+ # requires the Rails engine, that automatically includes the assets on the app
2
+ require 'inputmask/rails/engine'
3
+ require 'inputmask/rails/version'
4
+
5
+ module Inputmask
6
+ module Rails
7
+ end
8
+ end
@@ -0,0 +1,6 @@
1
+ module Inputmask
2
+ module Rails
3
+ class Engine < ::Rails::Engine
4
+ end
5
+ end
6
+ end
@@ -0,0 +1,6 @@
1
+ module Inputmask
2
+ module Rails
3
+ VERSION = "4.0.9.1"
4
+ INPUTMASK_VERSION = "4.0.9"
5
+ end
6
+ end
@@ -0,0 +1,33 @@
1
+ /*!
2
+ * bindings/inputmask.binding.js
3
+ * https://github.com/RobinHerbots/Inputmask
4
+ * Copyright (c) 2010 - 2019 Robin Herbots
5
+ * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
6
+ * Version: 4.0.9
7
+ */
8
+
9
+ (function(factory) {
10
+ if (typeof define === "function" && define.amd) {
11
+ define([ "jquery", "../inputmask", "../global/window" ], factory);
12
+ } else if (typeof exports === "object") {
13
+ module.exports = factory(require("jquery"), require("../inputmask"), require("../global/window"));
14
+ } else {
15
+ factory(jQuery, window.Inputmask, window);
16
+ }
17
+ })(function($, Inputmask, window) {
18
+ $(window.document).ajaxComplete(function(event, xmlHttpRequest, ajaxOptions) {
19
+ if ($.inArray("html", ajaxOptions.dataTypes) !== -1) {
20
+ $(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias]").each(function(ndx, lmnt) {
21
+ if (lmnt.inputmask === undefined) {
22
+ Inputmask().mask(lmnt);
23
+ }
24
+ });
25
+ }
26
+ }).ready(function() {
27
+ $(".inputmask, [data-inputmask], [data-inputmask-mask], [data-inputmask-alias]").each(function(ndx, lmnt) {
28
+ if (lmnt.inputmask === undefined) {
29
+ Inputmask().mask(lmnt);
30
+ }
31
+ });
32
+ });
33
+ });