playsure_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 +7 -0
- data/.gitignore +14 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +39 -0
- data/Rakefile +2 -0
- data/lib/playsure_helper.rb +7 -0
- data/lib/playsure_helper/engine.rb +13 -0
- data/lib/playsure_helper/helper.rb +14 -0
- data/lib/playsure_helper/link_helper.rb +9 -0
- data/lib/playsure_helper/page_helper.rb +18 -0
- data/lib/playsure_helper/version.rb +3 -0
- data/playsure_helper.gemspec +28 -0
- metadata +126 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7a5fd3e147c9ceed113868737179d17b03e5b4ac
|
4
|
+
data.tar.gz: 43a4dfa42bcb7932eecfed4bd3c8a7275f022b2a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: deb3285966c61d43bf80dfde009290cd5648f70fcddd59cb7d987c86c8127dba656b55651d8b065353d31e39efaadd9de3e52072e4fd25424ac4d3a10628e1a9
|
7
|
+
data.tar.gz: 6d3a44d9e1137b4c3f2041e52acef5490e19d18978feeae4d4b66bf9a859c441d2ae943ca04a9fcc3e2ac9811e49b53607d56e31ca751c4cd9e742d6e61c3bde
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 HeChienHsu
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,39 @@
|
|
1
|
+
# PlaysureHelper
|
2
|
+
|
3
|
+
Playsure Helper is a gem for playsure to make things faster.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'playsure_helper'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install playsure_helper
|
20
|
+
|
21
|
+
## Usage
|
22
|
+
|
23
|
+
### LinkHelper
|
24
|
+
|
25
|
+
#### active_link_to
|
26
|
+
|
27
|
+
可參考 <https://github.com/comfy/active_link_to> 的文件
|
28
|
+
|
29
|
+
### SeoHelper
|
30
|
+
|
31
|
+
可參考 <https://github.com/techbang/seo_helper> 的文件
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
1. Fork it ( https://bitbucket.org/playsure/playsure_helper/overview )
|
36
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
37
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
38
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
39
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
require 'playsure_helper/helper'
|
2
|
+
|
3
|
+
module PlaysureHelper
|
4
|
+
class Engine < ::Rails::Engine
|
5
|
+
initializer 'playsure_helper.view_helpers' do
|
6
|
+
ActionView::Base.send :include, PlaysureHelper::Helper
|
7
|
+
end
|
8
|
+
|
9
|
+
initializer 'playsure_helper.controller_helpers' do
|
10
|
+
ActionController::Base.send :include, PlaysureHelper::ControllerHelper
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'playsure_helper/link_helper'
|
2
|
+
require 'playsure_helper/page_helper'
|
3
|
+
|
4
|
+
module PlaysureHelper
|
5
|
+
module Helper
|
6
|
+
# Helpers here
|
7
|
+
include LinkHelper
|
8
|
+
include PageHelper
|
9
|
+
end
|
10
|
+
|
11
|
+
module ControllerHelper
|
12
|
+
# Controller Helpers here
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module PlaysureHelper
|
2
|
+
module Helper
|
3
|
+
include SeoHelper
|
4
|
+
|
5
|
+
def render_body_tag
|
6
|
+
class_attribute = ["#{controller_name}-controller","#{action_name}-action"].join(" ")
|
7
|
+
id_attribute = (@body_id)? " id=\"#{@body_id}-page\"" : ""
|
8
|
+
|
9
|
+
raw(%Q|<!--[if lt IE 7 ]>r
|
10
|
+
<body class="#{class_attribute} ie6"><![endif]-->
|
11
|
+
<!--[if gte IE 7 ]>
|
12
|
+
<body class="#{class_attribute} ie"><![endif]-->
|
13
|
+
<!--[if !IE]>-->
|
14
|
+
<body#{id_attribute} class="#{class_attribute}">
|
15
|
+
<!--<![endif]-->|)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'playsure_helper/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "playsure_helper"
|
8
|
+
spec.version = PlaysureHelper::VERSION
|
9
|
+
spec.authors = ["HakaiHsu"]
|
10
|
+
spec.email = ["hechien@playsure.com.tw"]
|
11
|
+
spec.summary = %q{This gem is for playsure to make things faster.}
|
12
|
+
spec.description = %q{This gem is for playsure to make things faster.}
|
13
|
+
spec.homepage = "http://www.playsure.com.tw"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.required_ruby_version = '>= 2.0.0'
|
17
|
+
|
18
|
+
spec.files = `git ls-files -z`.split("\x0")
|
19
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
spec.add_development_dependency "rails", ">= 4.0.0"
|
26
|
+
spec.add_dependency "active_link_to"
|
27
|
+
spec.add_dependency "seo_helper"
|
28
|
+
end
|
metadata
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: playsure_helper
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- HakaiHsu
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-04-24 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.7'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.7'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 4.0.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 4.0.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: active_link_to
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: seo_helper
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
description: This gem is for playsure to make things faster.
|
84
|
+
email:
|
85
|
+
- hechien@playsure.com.tw
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- Gemfile
|
92
|
+
- LICENSE.txt
|
93
|
+
- README.md
|
94
|
+
- Rakefile
|
95
|
+
- lib/playsure_helper.rb
|
96
|
+
- lib/playsure_helper/engine.rb
|
97
|
+
- lib/playsure_helper/helper.rb
|
98
|
+
- lib/playsure_helper/link_helper.rb
|
99
|
+
- lib/playsure_helper/page_helper.rb
|
100
|
+
- lib/playsure_helper/version.rb
|
101
|
+
- playsure_helper.gemspec
|
102
|
+
homepage: http://www.playsure.com.tw
|
103
|
+
licenses:
|
104
|
+
- MIT
|
105
|
+
metadata: {}
|
106
|
+
post_install_message:
|
107
|
+
rdoc_options: []
|
108
|
+
require_paths:
|
109
|
+
- lib
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: 2.0.0
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
requirements: []
|
121
|
+
rubyforge_project:
|
122
|
+
rubygems_version: 2.4.2
|
123
|
+
signing_key:
|
124
|
+
specification_version: 4
|
125
|
+
summary: This gem is for playsure to make things faster.
|
126
|
+
test_files: []
|