bothersme_list 0.0.1 → 0.0.2
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 +4 -4
- data/.coveralls.yml +2 -0
- data/.travis.yml +3 -0
- data/.yardopts +1 -0
- data/CHANGELOG.md +7 -1
- data/Gemfile +11 -0
- data/README.md +5 -1
- data/Rakefile +3 -1
- data/bothersme_list.gemspec +0 -3
- data/lib/bothersme_list.rb +16 -5
- data/lib/bothersme_list/version.rb +1 -1
- data/spec/bothersme_list_spec.rb +3 -0
- data/spec/spec_helper.rb +2 -0
- metadata +5 -44
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dfcf599dded8856826d8164d69d81621226ed4e8
|
4
|
+
data.tar.gz: e045ba2a228ba63a08194fcbbb4e53d3fbf6dc5a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ec88bec0a0e0cb2bae99ac31f0e5345336f8f5d627c864284c0c4d7c56fcf17b503811715111715f32ad44ac28bd854f06b23624e9e044abc1c9fccb28b1f9e
|
7
|
+
data.tar.gz: 8a6917ebd224a9d0768ffcddb541b12174c3831d65dcce1fc1820d8fd73befce02d77c60de218e60278d1ae21b4fa14c18eeccc981ce3da2d07afed416df4a62
|
data/.coveralls.yml
ADDED
data/.travis.yml
ADDED
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
- CHANGELOG*
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# Bothersme List [](https://travis-ci.org/BothersMe/bothersme_list) [](https://codeclimate.com/github/BothersMe/bothersme_list) [](https://coveralls.io/r/BothersMe/bothersme_list) [](https://www.versioneye.com/user/projects/5598d2186166340022000087)
|
2
2
|
|
3
3
|
Inserts "Track an Issue" button on a side
|
4
4
|
|
@@ -42,3 +42,7 @@ At the end of your layout (usually application.hmtl.erb file) before ```</body>`
|
|
42
42
|
## CHANGELOG
|
43
43
|
|
44
44
|
See [here](CHANGELOG.md).
|
45
|
+
|
46
|
+
## Ruby Doc
|
47
|
+
|
48
|
+
Is [here](http://www.rubydoc.info/github/BothersMe/bothersme_list/master/BothersmeList)
|
data/Rakefile
CHANGED
data/bothersme_list.gemspec
CHANGED
@@ -17,7 +17,4 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
spec.rubyforge_project = "bothersme_list"
|
20
|
-
spec.add_development_dependency "bundler", "~> 1.7"
|
21
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
22
|
-
spec.add_development_dependency "rspec"
|
23
20
|
end
|
data/lib/bothersme_list.rb
CHANGED
@@ -2,14 +2,23 @@ require "bothersme_list/version"
|
|
2
2
|
|
3
3
|
module BothersmeList
|
4
4
|
# Inserts "Track an Issue" button on a side
|
5
|
+
# @see http://bothers.me as an example
|
5
6
|
#
|
6
|
-
#
|
7
|
-
# type: 'website', 'camera', 'wearable'
|
8
|
-
# company: 'YourCompanyName'
|
9
|
-
# product: 'YourProductName' or nil if used for all products
|
7
|
+
# Usage:
|
10
8
|
#
|
9
|
+
# <%= issues_list('website', 'MyWebsite.com', 'MyProduct') %>
|
10
|
+
#
|
11
|
+
# right before "</body>" to asynchronously add "Track an Issue" button.
|
12
|
+
#
|
13
|
+
# @param [String, #read] type indicates the type of the product. Supported types are: 'website', 'camera', 'wearable'
|
14
|
+
# @param [String, #read] company is your company name camel case like 'MyCompany'
|
15
|
+
# @param [optional, String, #read] product name of your product came case like "My Product", you can pass nil to render issues for all products
|
16
|
+
# @param [optional, String, #read] side which side to render on, supported 'left', 'right', default: 'right'
|
17
|
+
# @param [optional, String, #read] textColor CSS color to render as foreground color. default 'white'
|
18
|
+
# @param [optional, String, #read] bgColor CSS color to render as background color, default '#55B055'
|
19
|
+
# @return [String] the HTML safe <script> tag containing code to add the button
|
11
20
|
def issues_list(type, company, product=nil, side='right', textColor='white', bgColor='#55B055')
|
12
|
-
%{
|
21
|
+
button_script = %{
|
13
22
|
<!-- Bothers.Me button -->
|
14
23
|
<script>
|
15
24
|
(function(w,d,fn,params) {
|
@@ -34,6 +43,8 @@ module BothersmeList
|
|
34
43
|
'user': '' }});
|
35
44
|
</script>
|
36
45
|
}
|
46
|
+
button_script = button_script.html_safe if defined?(Rails)
|
47
|
+
return button_script
|
37
48
|
end
|
38
49
|
end
|
39
50
|
|
data/spec/bothersme_list_spec.rb
CHANGED
@@ -14,5 +14,8 @@ describe BothersmeList do
|
|
14
14
|
it "should include product" do
|
15
15
|
expect(test_instance.issues_list("a", "b", "zzzz")).to include("zzzz")
|
16
16
|
end
|
17
|
+
it "should include script tag unencoded" do
|
18
|
+
expect(test_instance.issues_list("a", "b")).to include("</script>")
|
19
|
+
end
|
17
20
|
end
|
18
21
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bothersme_list
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bothers.Me
|
@@ -9,49 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2015-07-05 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: rspec
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
44
|
-
requirements:
|
45
|
-
- - ">="
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
type: :development
|
49
|
-
prerelease: false
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
51
|
-
requirements:
|
52
|
-
- - ">="
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
12
|
+
dependencies: []
|
55
13
|
description: Adds 'Report an Issue' button to your website to allow reporting issues
|
56
14
|
published on bothers.me
|
57
15
|
email:
|
@@ -60,7 +18,10 @@ executables: []
|
|
60
18
|
extensions: []
|
61
19
|
extra_rdoc_files: []
|
62
20
|
files:
|
21
|
+
- ".coveralls.yml"
|
63
22
|
- ".gitignore"
|
23
|
+
- ".travis.yml"
|
24
|
+
- ".yardopts"
|
64
25
|
- CHANGELOG.md
|
65
26
|
- Gemfile
|
66
27
|
- LICENSE.txt
|