rails-tel_to_helper 0.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 0334ad0ec954a9b9d5e8b68e9c519406edad6b98
4
+ data.tar.gz: 33f5b9be1f7f744ac44ce48b4e967c2d1aeecb03
5
+ SHA512:
6
+ metadata.gz: a9908b17f394e3c50a9cc6109bde520009dad93c150eb303800024cd7d4530531eb3249a4748f0c767b942394cd4974dd997aad5744255013e815d75f03a35a0
7
+ data.tar.gz: bd98690b0653135ed286dde1adcaad3738096a5b9de7c8de6321854a5d26d476a6542839df85c52ed8a4cab389066b7434522449b741512347d386b5ed3bedb9
data/.gitignore ADDED
@@ -0,0 +1,14 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ lib/bundler/man
9
+ pkg
10
+ rdoc
11
+ spec/reports
12
+ test/tmp
13
+ test/version_tmp
14
+ tmp
data/.travis.yml ADDED
@@ -0,0 +1,2 @@
1
+ rvm:
2
+ - 2
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2014 Jianqiu Xiao <swordray@gmail.com>
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,2 @@
1
+ rails-tel_to_helper
2
+ ===================
data/Rakefile ADDED
@@ -0,0 +1,3 @@
1
+ task :default do |t|
2
+ `gem build rails-tel_to_helper.gemspec`
3
+ end
@@ -0,0 +1,15 @@
1
+ require 'action_view/helpers'
2
+
3
+ module ActionView
4
+ module Helpers
5
+ # = Action View Telephone Link Helper
6
+ module TelToHelper
7
+ # Creates a telephone link tag of the given +number+ and +name+. If +nil+
8
+ # is passed as the +name+ the value of the link itself will become the
9
+ # +number+. +options+ and +html_options+ will be same as +link_to.
10
+ def tel_to(number, name = nil, html_options = nil)
11
+ link_to(h(name || number), "tel:#{h(number)}", html_options) if number.present?
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module RailsTelToHelper #:nodoc:
2
+ VERSION = '0.0.1'
3
+ end
@@ -0,0 +1,7 @@
1
+ require "action_view"
2
+ require "action_view/helpers/tel_to_helper"
3
+ require "action_view/base"
4
+
5
+ class ActionView::Base
6
+ include TelToHelper
7
+ end
@@ -0,0 +1,23 @@
1
+ $LOAD_PATH.push File.expand_path("../lib", __FILE__)
2
+ require 'rails-tel_to_helper/version'
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = "rails-tel_to_helper"
6
+ s.version = RailsTelToHelper::VERSION
7
+ s.platform = Gem::Platform::RUBY
8
+ s.author = ["Jianqiu Xiao"]
9
+ s.email = ["swordray@gmail.com"]
10
+ s.homepage = "https://github.com/swordray/rails-tel_to_helper"
11
+ s.summary = "Action View Telephone Link Helper"
12
+ s.description = "Generate tel protocol link tag"
13
+ s.license = "MIT"
14
+
15
+ s.files = `git ls-files`.split("\n")
16
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
18
+ s.require_paths = ["lib"]
19
+
20
+ s.required_ruby_version = "~> 2.0"
21
+
22
+ s.add_dependency 'rails'
23
+ end
metadata ADDED
@@ -0,0 +1,68 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rails-tel_to_helper
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Jianqiu Xiao
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-03-17 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
+ description: Generate tel protocol link tag
28
+ email:
29
+ - swordray@gmail.com
30
+ executables: []
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - ".gitignore"
35
+ - ".travis.yml"
36
+ - Gemfile
37
+ - LICENSE
38
+ - README.md
39
+ - Rakefile
40
+ - lib/action_view/helpers/tel_to_helper.rb
41
+ - lib/rails-tel_to_helper.rb
42
+ - lib/rails-tel_to_helper/version.rb
43
+ - rails-tel_to_helper.gemspec
44
+ homepage: https://github.com/swordray/rails-tel_to_helper
45
+ licenses:
46
+ - MIT
47
+ metadata: {}
48
+ post_install_message:
49
+ rdoc_options: []
50
+ require_paths:
51
+ - lib
52
+ required_ruby_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '2.0'
57
+ required_rubygems_version: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ requirements: []
63
+ rubyforge_project:
64
+ rubygems_version: 2.2.2
65
+ signing_key:
66
+ specification_version: 4
67
+ summary: Action View Telephone Link Helper
68
+ test_files: []