bothersme_list 0.0.2 → 0.0.3
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/CHANGELOG.md +6 -1
- data/README.md +25 -8
- data/lib/bothersme_list/version.rb +1 -1
- data/lib/bothersme_list.rb +9 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 506ae0669d5f59063e0515776355fecf06b54cc7
|
4
|
+
data.tar.gz: 3ef4f5620895c71789e5ead739ff389045ab6f96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c5acc6fc341b13c17fcc096964587dc8f3f15785447b8bb33f91fc66e6634fe6a47361e4b91b8f70c82fcc70bb456929e7664fa13a9fcf1be6391459a741bae2
|
7
|
+
data.tar.gz: ddd39ae4d3689da03ac2b4d1755f25368e6791ddfb8a6b4a00c0a842047a3153f3d3ab70b9369be8b7f5d4130c7c2eb35c362bc45f40b27311e8f168469e6acf
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,12 +1,12 @@
|
|
1
|
-
# Bothersme List
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
3. product: 'YourProductName' or nil if used for all products
|
1
|
+
# Bothersme List
|
2
|
+
[](https://travis-ci.org/BothersMe/bothersme_list)
|
3
|
+
[](https://codeclimate.com/github/BothersMe/bothersme_list)
|
4
|
+
[](https://coveralls.io/r/BothersMe/bothersme_list)
|
5
|
+
[](https://www.versioneye.com/user/projects/5598d2186166340022000087)
|
6
|
+
[](http://www.rubydoc.info/github/BothersMe/bothersme_list/master/BothersmeList)
|
7
|
+
[](https://rubygems.org/gems/bothersme_list)
|
9
8
|
|
9
|
+
Inserts "Track an Issue" button on a side like a button on [http://bothers.me](http://bothers.me)
|
10
10
|
|
11
11
|
## Installation
|
12
12
|
|
@@ -26,11 +26,28 @@ Or install it yourself as:
|
|
26
26
|
|
27
27
|
## Usage
|
28
28
|
|
29
|
+
Add this line to your application's Gemfile:
|
30
|
+
|
31
|
+
```ruby
|
32
|
+
gem 'bothersme_list'
|
33
|
+
```
|
34
|
+
|
29
35
|
At the end of your layout (usually application.hmtl.erb file) before ```</body>``` add
|
30
36
|
```ruby
|
31
37
|
<%= issues_list('website', 'MyWebsite.com', 'MyProduct') %>
|
32
38
|
```
|
33
39
|
|
40
|
+
the script will asynchronously add "Track an Issue" button.
|
41
|
+
|
42
|
+
### Parameters
|
43
|
+
1. type [String] indicates the type of the product. Supported types are: 'website', 'camera', 'wearable'
|
44
|
+
2. company [String] is your company name camel case like 'MyCompany'
|
45
|
+
3. product [String] name of your product came case like "My Product", you can pass nil to render issues for all products
|
46
|
+
4. side [String] which side to render on, supported 'left', 'right', default: 'right'
|
47
|
+
5. textColor [String] CSS color to render as foreground color. default 'white'
|
48
|
+
6. bgColor [String] CSS color to render as background color, default '#55B055'
|
49
|
+
|
50
|
+
|
34
51
|
## Contributing
|
35
52
|
|
36
53
|
1. Fork it ( https://github.com/BothersMe/bothersme_list/fork )
|
data/lib/bothersme_list.rb
CHANGED
@@ -4,18 +4,19 @@ module BothersmeList
|
|
4
4
|
# Inserts "Track an Issue" button on a side
|
5
5
|
# @see http://bothers.me as an example
|
6
6
|
#
|
7
|
-
# Usage:
|
7
|
+
# @example Usage:
|
8
8
|
#
|
9
9
|
# <%= issues_list('website', 'MyWebsite.com', 'MyProduct') %>
|
10
10
|
#
|
11
11
|
# right before "</body>" to asynchronously add "Track an Issue" button.
|
12
12
|
#
|
13
|
-
# @param [String
|
14
|
-
# @param [String
|
15
|
-
# @param [
|
16
|
-
# @param [
|
17
|
-
# @param [
|
18
|
-
# @param [
|
13
|
+
# @param type [String] indicates the type of the product. Supported types are: 'website', 'camera', 'wearable'
|
14
|
+
# @param company [String] is your company name camel case like 'MyCompany'
|
15
|
+
# @param product [String] name of your product came case like "My Product", you can pass nil to render issues for all products
|
16
|
+
# @param side [String] which side to render on, supported 'left', 'right', default: 'right'
|
17
|
+
# @param textColor [String] CSS color to render as foreground color. default 'white'
|
18
|
+
# @param bgColor [String] CSS color to render as background color, default '#55B055'
|
19
|
+
#
|
19
20
|
# @return [String] the HTML safe <script> tag containing code to add the button
|
20
21
|
def issues_list(type, company, product=nil, side='right', textColor='white', bgColor='#55B055')
|
21
22
|
button_script = %{
|
@@ -29,7 +30,7 @@ module BothersmeList
|
|
29
30
|
var script = d.createElement('script');
|
30
31
|
var parent = d.getElementsByTagName('script')[0];
|
31
32
|
script.async = 1;
|
32
|
-
script.src = '
|
33
|
+
script.src = '//bothers.me/bm_track_issue/bm_track_issue-v1.js';
|
33
34
|
script.setAttribute('fn',fn);
|
34
35
|
script.setAttribute('params',JSON.stringify(params));
|
35
36
|
parent.parentNode.insertBefore(script, parent);
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bothers.Me
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-06 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Adds 'Report an Issue' button to your website to allow reporting issues
|
14
14
|
published on bothers.me
|