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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dfcf599dded8856826d8164d69d81621226ed4e8
4
- data.tar.gz: e045ba2a228ba63a08194fcbbb4e53d3fbf6dc5a
3
+ metadata.gz: 506ae0669d5f59063e0515776355fecf06b54cc7
4
+ data.tar.gz: 3ef4f5620895c71789e5ead739ff389045ab6f96
5
5
  SHA512:
6
- metadata.gz: 7ec88bec0a0e0cb2bae99ac31f0e5345336f8f5d627c864284c0c4d7c56fcf17b503811715111715f32ad44ac28bd854f06b23624e9e044abc1c9fccb28b1f9e
7
- data.tar.gz: 8a6917ebd224a9d0768ffcddb541b12174c3831d65dcce1fc1820d8fd73befce02d77c60de218e60278d1ae21b4fa14c18eeccc981ce3da2d07afed416df4a62
6
+ metadata.gz: c5acc6fc341b13c17fcc096964587dc8f3f15785447b8bb33f91fc66e6634fe6a47361e4b91b8f70c82fcc70bb456929e7664fa13a9fcf1be6391459a741bae2
7
+ data.tar.gz: ddd39ae4d3689da03ac2b4d1755f25368e6791ddfb8a6b4a00c0a842047a3153f3d3ab70b9369be8b7f5d4130c7c2eb35c362bc45f40b27311e8f168469e6acf
data/CHANGELOG.md CHANGED
@@ -6,4 +6,9 @@
6
6
 
7
7
  * Updated documentation
8
8
  * Fixed issue with html encoding of the script tag
9
- * Added unit test to check tag
9
+ * Added unit test to check tag
10
+
11
+ ## v0.0.3
12
+
13
+ * Updated documentation
14
+ * Fixed issue with domain name in embedded button
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
- # Bothersme List [![Build Status](https://travis-ci.org/BothersMe/bothersme_list.svg?branch=master)](https://travis-ci.org/BothersMe/bothersme_list) [![Code Climate](https://codeclimate.com/github/BothersMe/bothersme_list/badges/gpa.svg)](https://codeclimate.com/github/BothersMe/bothersme_list) [![Coverage Status](https://coveralls.io/repos/BothersMe/bothersme_list/badge.svg)](https://coveralls.io/r/BothersMe/bothersme_list) [![Dependency Status](https://www.versioneye.com/user/projects/5598d2186166340022000087/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5598d2186166340022000087)
2
-
3
- Inserts "Track an Issue" button on a side
4
-
5
- Parameters:
6
- 1. type: 'website', 'camera', 'wearable'
7
- 2. company: 'YourCompanyName'
8
- 3. product: 'YourProductName' or nil if used for all products
1
+ # Bothersme List
2
+ [![Build Status](https://travis-ci.org/BothersMe/bothersme_list.svg?branch=master)](https://travis-ci.org/BothersMe/bothersme_list)
3
+ [![Code Climate](https://codeclimate.com/github/BothersMe/bothersme_list/badges/gpa.svg)](https://codeclimate.com/github/BothersMe/bothersme_list)
4
+ [![Coverage Status](https://coveralls.io/repos/BothersMe/bothersme_list/badge.svg)](https://coveralls.io/r/BothersMe/bothersme_list)
5
+ [![Dependency Status](https://www.versioneye.com/user/projects/5598d2186166340022000087/badge.svg?style=flat)](https://www.versioneye.com/user/projects/5598d2186166340022000087)
6
+ [![Online docs](https://img.shields.io/badge/docs-✓-green.svg)](http://www.rubydoc.info/github/BothersMe/bothersme_list/master/BothersmeList)
7
+ [![Gem Version](https://img.shields.io/gem/v/bothersme_list.png)](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 )
@@ -1,3 +1,3 @@
1
1
  module BothersmeList
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -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, #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'
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 = '//<%= domain_root %>/bm_track_issue/bm_track_issue-v1.js';
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.2
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-05 00:00:00.000000000 Z
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