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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6cf8537a4e0b22a10c739916b91b93aa979ad0f2
4
- data.tar.gz: ded5e7d892a90f4d896dee4d745e5bbc3f9bb757
3
+ metadata.gz: dfcf599dded8856826d8164d69d81621226ed4e8
4
+ data.tar.gz: e045ba2a228ba63a08194fcbbb4e53d3fbf6dc5a
5
5
  SHA512:
6
- metadata.gz: 0db4d4209d842475eadd4738825934287543c77fdb0cb4a2aee4b716624186f2cb10ef0c5ae206bba9711733b1b139f0da00985dc465cea8aafb9acff801d824
7
- data.tar.gz: 28903bc465dda748a2f9c40a82cf158cff0751a9855f7204ef763a9476ab05020897c1ea9a81c5f3b9a30e5af246caf99bcdbf2fdf8d5a6d4a2e6e45edd85845
6
+ metadata.gz: 7ec88bec0a0e0cb2bae99ac31f0e5345336f8f5d627c864284c0c4d7c56fcf17b503811715111715f32ad44ac28bd854f06b23624e9e044abc1c9fccb28b1f9e
7
+ data.tar.gz: 8a6917ebd224a9d0768ffcddb541b12174c3831d65dcce1fc1820d8fd73befce02d77c60de218e60278d1ae21b4fa14c18eeccc981ce3da2d07afed416df4a62
@@ -0,0 +1,2 @@
1
+ service_name: travis-ci
2
+ repo_token: NeJOLpDexmJMxDm28lp4hnlRHLP8TNPfi
@@ -0,0 +1,3 @@
1
+ rvm:
2
+ - 1.9.2
3
+ - 2.1.4
@@ -0,0 +1 @@
1
+ - CHANGELOG*
@@ -1,3 +1,9 @@
1
1
  ## v0.0.1
2
2
 
3
- * Initial release
3
+ * Initial release
4
+
5
+ ## v0.0.2
6
+
7
+ * Updated documentation
8
+ * Fixed issue with html encoding of the script tag
9
+ * Added unit test to check tag
data/Gemfile CHANGED
@@ -2,3 +2,14 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in bothersme_list.gemspec
4
4
  gemspec
5
+
6
+ gem "rake"
7
+ gem "bundler"
8
+
9
+ group :test do
10
+ gem "rspec"
11
+
12
+ if ENV["CI"]
13
+ gem "coveralls", require: false
14
+ end
15
+ end
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # BothersmeList
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
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
@@ -1,2 +1,4 @@
1
1
  require "bundler/gem_tasks"
2
-
2
+ require 'rspec/core/rake_task'
3
+ RSpec::Core::RakeTask.new(:spec)
4
+ task :default => :spec
@@ -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
@@ -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
- # Parameters:
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
 
@@ -1,3 +1,3 @@
1
1
  module BothersmeList
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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
@@ -1 +1,3 @@
1
1
  require 'bothersme_list'
2
+ require 'coveralls'
3
+ Coveralls.wear!
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.1
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