bugherd 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.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # BugHerd gem
2
2
 
3
- Add the BugHerd widget to your Rails site.
3
+ Add the BugHerd widget to your Rails site. [Get a BugHerd account](http://www.bugherd.com/).
4
4
 
5
5
  ## Installation
6
6
 
@@ -20,6 +20,8 @@ BugHerd.configure do |config|
20
20
  end
21
21
  ```
22
22
 
23
+ Alternatively you can set an environment variable called BUGHERD_PROJECT_KEY.
24
+
23
25
  You can obtain the project key from your project's installation options in BugHerd.
24
26
 
25
27
  Now add to the *head* tag in your layout(s):
@@ -27,3 +29,35 @@ Now add to the *head* tag in your layout(s):
27
29
  ```ruby
28
30
  <%= bugherd_tag %>
29
31
  ```
32
+
33
+ ## Meta data
34
+
35
+ BugHerd allows you to pass in extra data which will be added as metadata to any bug your users may log on the page where the widget is rendered.
36
+
37
+ ```ruby
38
+ <%= bugherd_tag :metadata => {
39
+ :user_id => current_user.id.to_s,
40
+ :controller => controller.controller_name
41
+ } %>
42
+ ```
43
+
44
+ ## Translation
45
+
46
+ If you are using the public "Send Feedback" option on your project, you can customise the display text:
47
+
48
+ ```ruby
49
+ <%= bugherd_tag :feedback => {
50
+ :tab_text => "Stuur commentaar",
51
+ :option_title_text => "Kies een optie",
52
+ :option_pin_text => "Ik wil graag iets op deze pagina aanwijzen.",
53
+ :option_site_text => "Ik heb commentaar over deze pagina in z'n geheel.",
54
+ :feedback_entry_placeholder => "schrijf hier uw commentaar",
55
+ :feedback_email_placeholder => "uw email adres",
56
+ :feedback_submit_text => "verstuur commentaar",
57
+ :confirm_success_text => "Commentaar is verstuurd.",
58
+ :confirm_loading_text => "Commentaar wordt verstuurd...",
59
+ :confirm_close_text => "sluiten",
60
+ :confirm_error_text => "Er is een fout opgetreden en commentaar kon niet verstuurd worden.",
61
+ :confirm_retry_text => "Probeer opnieuw",
62
+ } %>
63
+ ```
@@ -1,12 +1,13 @@
1
1
  module BugHerdHelper
2
2
 
3
3
  def bugherd_tag(options = {})
4
+ key = ENV['BUGHERD_PROJECT_KEY'] || BugHerd.configuration.project_key
4
5
  javascript_tag "
5
6
  var BugHerdConfig = #{options.to_json};
6
7
  (function (d, t) {
7
8
  var bh = d.createElement(t), s = d.getElementsByTagName(t)[0];
8
9
  bh.type = 'text/javascript';
9
- bh.src = '//www.bugherd.com/sidebarv2.js?apikey=#{BugHerd.configuration.project_key}';
10
+ bh.src = '//www.bugherd.com/sidebarv2.js?apikey=#{key}';
10
11
  s.parentNode.insertBefore(bh, s);
11
12
  })(document, 'script');
12
13
  "
@@ -1,3 +1,3 @@
1
1
  module BugHerd
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
@@ -163,3 +163,19 @@ Completed 200 OK in 9ms (Views: 8.3ms | ActiveRecord: 0.0ms)
163
163
   (0.1ms) rollback transaction
164
164
   (0.0ms) begin transaction
165
165
   (0.0ms) rollback transaction
166
+ Connecting to database specified by database.yml
167
+  (0.3ms) begin transaction
168
+ Processing by MainController#index as HTML
169
+ Rendered main/index.html.erb within layouts/application (1.6ms)
170
+ Completed 200 OK in 11ms (Views: 11.2ms | ActiveRecord: 0.0ms)
171
+  (0.1ms) rollback transaction
172
+  (0.1ms) begin transaction
173
+  (0.0ms) rollback transaction
174
+ Connecting to database specified by database.yml
175
+  (0.3ms) begin transaction
176
+ Processing by MainController#index as HTML
177
+ Rendered main/index.html.erb within layouts/application (1.8ms)
178
+ Completed 200 OK in 12ms (Views: 11.5ms | ActiveRecord: 0.0ms)
179
+  (0.1ms) rollback transaction
180
+  (0.0ms) begin transaction
181
+  (0.0ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bugherd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-04 00:00:00.000000000 Z
12
+ date: 2013-01-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -43,7 +43,8 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
- description: ''
46
+ description: BugHerd lets you report and manage issues directly from any website it's
47
+ embedded on.
47
48
  email:
48
49
  - support@bugherd.com
49
50
  executables: []
@@ -106,24 +107,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
107
  - - ! '>='
107
108
  - !ruby/object:Gem::Version
108
109
  version: '0'
109
- segments:
110
- - 0
111
- hash: 1290492949082979729
112
110
  required_rubygems_version: !ruby/object:Gem::Requirement
113
111
  none: false
114
112
  requirements:
115
113
  - - ! '>='
116
114
  - !ruby/object:Gem::Version
117
115
  version: '0'
118
- segments:
119
- - 0
120
- hash: 1290492949082979729
121
116
  requirements: []
122
117
  rubyforge_project:
123
118
  rubygems_version: 1.8.24
124
119
  signing_key:
125
120
  specification_version: 3
126
- summary: Quick way to add BugHerd to your Rails project!
121
+ summary: Embedded issue tracker for websites and web apps
127
122
  test_files:
128
123
  - test/bugherd_test.rb
129
124
  - test/dummy/app/assets/javascripts/application.js
@@ -160,3 +155,4 @@ test_files:
160
155
  - test/dummy/README.rdoc
161
156
  - test/dummy/script/rails
162
157
  - test/test_helper.rb
158
+ has_rdoc: