barkeep 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3bc22ae0334bd062994f2f3ba6f35a7f827fe434
4
- data.tar.gz: a44a8ee5ba696dfff887227e8e9540c577352eec
3
+ metadata.gz: cb35fe7793855cd9aea168ca5fe0b2424606136e
4
+ data.tar.gz: 44959a21667b452f1566605a1e877cd327041d32
5
5
  SHA512:
6
- metadata.gz: 9b695eeb570ab938298fdca879914e9701615e2eb8e5444a5d9a7ed70ff37b41e38dfea8d3ba5d235fb2153a90d0382bcbd7c177d0d0ba2f999c569242e2ee8e
7
- data.tar.gz: 5caf5c8cd0cef36f1630f4419372f725cc7d760c3eae118ee2da8a70494800cb0a4ea0e22c561eb9c124a8a9559a35e38a57630ce9c3802fe4094c513df85c8b
6
+ metadata.gz: 0fcd2eedbb43ee25a555d4cf2f426d36f246bfa1dd538b983e965d30558be1fbf2a59b7ad12634359e096cdff2fd6465139b88586bafe3f9559cc0cd72d02673
7
+ data.tar.gz: 42c50e3e9228ec08912b7bd2a2ac6c7ddfc406cdc5976a71cd42d1dfffd225b7ea3c5685ed5f1bb17f083eb8665bff26c7fa5892c8d8666e7d93da496ad5f729
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 1.9.3
5
+ - 2.0.0
6
+ - 2.1.2
7
+ - 2.2.3
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ## Version 0.3.2 - June 29, 2018
2
+
3
+ * Documentation updates
4
+ * Test on more versions of Ruby
5
+ * Use minitest for test suite
6
+
1
7
  ## Version 0.3.1 - November 20, 2015
2
8
 
3
9
  * Work in situations where you haven't deployed into a git repository
@@ -1,4 +1,6 @@
1
- = Barkeep
1
+ ## Barkeep
2
+
3
+ [![Build Status](https://travis-ci.org/patientslikeme/barkeep.svg?branch=master)](https://travis-ci.org/patientslikeme/barkeep)
2
4
 
3
5
  Barkeep is an extensible developer's status bar to track your current deployed
4
6
  commit and more. Barkeep sits at the bottom of your app and shows information
@@ -6,62 +8,76 @@ you deem useful.
6
8
 
7
9
  Here's an example of Barkeep running with some default panes:
8
10
 
9
- http://i.imgur.com/0TTHX.png
11
+ ![Barkeep example](http://i.imgur.com/0TTHX.png)
12
+
13
+ ## Install
10
14
 
11
- == Install
15
+ ### Gem Installation
12
16
 
13
- === Gem Installation
17
+ Add to your Gemfile:
14
18
 
15
- * Install and require gem (add it to your Gemfile or your environment.rb file).
19
+ ```ruby
20
+ gem 'barkeep'
21
+ ```
16
22
 
17
- === Application Setup
23
+ ### Application Setup
18
24
 
19
25
  * in Rails, include Barkeep in your ApplicationHelper, i.e.
20
26
 
21
- module ApplicationHelper
22
- include Barkeep
23
- ...
24
- end
27
+ ```ruby
28
+ module ApplicationHelper
29
+ include Barkeep
30
+ ...
31
+ end
32
+ ```
25
33
 
26
34
  * in Sinatra, include Barkeep as a helper in your main app file, i.e.
27
35
 
28
- helpers Barkeep
36
+ ```ruby
37
+ helpers Barkeep
38
+ ```
29
39
 
30
40
  * add the barkeep styles in your layout header. This bypasses the assets pipeline. But that is OK, because you don't want this in your pipeline in production.
31
41
 
32
- <%= barkeep.styles %>
42
+ ```erb
43
+ <%= barkeep.styles %>
44
+ ```
33
45
 
34
46
  * call barkeep.render from your layout or footer, i.e.
35
47
 
36
- <%= barkeep.render_toolbar %>
48
+ ```erb
49
+ <%= barkeep.render_toolbar %>
50
+ ```
37
51
 
38
52
  * These two methods will return an empty string unless the app is running under one of the environments specified in your config file
39
53
 
40
54
  * Create a config file in config/barkeep.json (see example below)
41
55
 
42
- === Rails 2
56
+ ### Rails 2
43
57
 
44
58
  If you are stuck in Rails 2, version 0.1.1 of Barkeep should work for you. Note that some of the installation options are
45
59
  different in Rails 2. Check the README in that version for more details.
46
60
 
47
- == Config
61
+ ## Config
48
62
 
49
63
  Configuration is specified in a config/barkeep.json
50
64
 
51
65
  You want to specify some panes, a github url, and the environments in which you
52
66
  want to render Barkeep. Here is a config with all the default panes:
53
67
 
54
- {
55
- "panes" : [
56
- "branch_info",
57
- "commit_sha_info",
58
- "commit_author_info",
59
- "commit_date_info",
60
- "rpm_request_info"
61
- ],
62
- "github_url" : "https://github.com/USER_OR_ORGANIZATION/PROJECT_NAME",
63
- "environments" : ["development", "stage"]
64
- }
68
+ ```json
69
+ {
70
+ "panes" : [
71
+ "branch_info",
72
+ "commit_sha_info",
73
+ "commit_author_info",
74
+ "commit_date_info",
75
+ "rpm_request_info"
76
+ ],
77
+ "github_url" : "https://github.com/USER_OR_ORGANIZATION/PROJECT_NAME",
78
+ "environments" : ["development", "stage"]
79
+ }
80
+ ```
65
81
 
66
82
  Panes are rendered in the order specified in the array. You can specify as
67
83
  many panes as you wish.
@@ -70,7 +86,7 @@ Panes are assumed to be methods accessible in the context of your
70
86
  ApplicationHelper. Alternatively, you can specify a partial as a pane using
71
87
  the format "partial path/to/your/partial"
72
88
 
73
- == Custom Styling
89
+ ## Custom Styling
74
90
 
75
91
  Barkeep comes with some basic styling that has worked well for us. You are
76
92
  encouraged to modify it to suit your needs. The easiest way to do this is to
@@ -80,19 +96,19 @@ barkeep). You can then pull it in to your main stylesheet or Sass-ify it, etc.
80
96
  Once you've setup your own styles, you probably won't want to call
81
97
  barkeep.styles anymore.
82
98
 
83
- == Included panes
99
+ ## Included panes
84
100
 
85
- * branch_info: shows the current branch and links to the branch on github
86
- * commit_sha_info: shows the current commit sha and links to the commit on
101
+ * `branch_info`: shows the current branch and links to the branch on github
102
+ * `commit_sha_info`: shows the current commit sha and links to the commit on
87
103
  github (useful when testing on stage for knowing what is depolyed)
88
- * commit_author_info: show the author of the current commit
89
- * commit_date_info: show the date of the current commit (hover for full
104
+ * `commit_author_info`: show the author of the current commit
105
+ * `commit_date_info`: show the date of the current commit (hover for full
90
106
  timestamp)
91
- * rpm_request_info: if you're using the newrelic gem in development mode, this
107
+ * `rpm_request_info`: if you're using the newrelic gem in development mode, this
92
108
  provides a link to the development newerelic index and a link to the current
93
109
  request profiled in newrelic
94
110
 
95
- == Contributing to Barkeep
111
+ ## Contributing to Barkeep
96
112
 
97
113
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
98
114
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
@@ -102,8 +118,8 @@ barkeep.styles anymore.
102
118
  * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
103
119
  * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
104
120
 
105
- == Copyright
121
+ ## Copyright
106
122
 
107
- Copyright (c) 2011 PatientsLikeMe. See LICENSE.txt for
123
+ Copyright © 2011-2015 PatientsLikeMe. Distributed under the MIT license. See LICENSE.txt for
108
124
  further details.
109
125
 
data/barkeep.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'barkeep/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
-
7
+
8
8
  spec.name = "barkeep"
9
9
  spec.version = Barkeep::VERSION
10
10
  spec.authors = ["PatientsLikeMe"]
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ["lib"]
21
21
 
22
22
  spec.add_runtime_dependency "json"
23
- spec.add_development_dependency "mocha", ">= 0.9.12"
24
- spec.add_development_dependency "shoulda"
23
+ spec.add_development_dependency "mocha", ">= 1.1.0"
24
+ spec.add_development_dependency "minitest"
25
25
  spec.add_development_dependency "rake"
26
26
  end
data/bin/rake ADDED
@@ -0,0 +1,16 @@
1
+ #!/usr/bin/env ruby
2
+ #
3
+ # This file was generated by Bundler.
4
+ #
5
+ # The application 'rake' is installed as part of a gem, and
6
+ # this file is here to facilitate running it.
7
+ #
8
+
9
+ require 'pathname'
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path("../../Gemfile",
11
+ Pathname.new(__FILE__).realpath)
12
+
13
+ require 'rubygems'
14
+ require 'bundler/setup'
15
+
16
+ load Gem.bin_path('rake', 'rake')
@@ -1,3 +1,3 @@
1
1
  module Barkeep
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  end
data/test/helper.rb CHANGED
@@ -1,20 +1,6 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- begin
4
- Bundler.setup(:default, :development)
5
- rescue Bundler::BundlerError => e
6
- $stderr.puts e.message
7
- $stderr.puts "Run `bundle install` to install missing gems"
8
- exit e.status_code
9
- end
10
- require 'test/unit'
11
- require 'shoulda'
12
- require 'mocha'
13
- require 'mocha/test_unit'
1
+ require 'minitest'
2
+ require 'minitest/spec'
3
+ require 'minitest/autorun'
4
+ require 'mocha/mini_test'
14
5
 
15
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
16
- $LOAD_PATH.unshift(File.dirname(__FILE__))
17
6
  require 'barkeep'
18
-
19
- class Test::Unit::TestCase
20
- end
data/test/test_barkeep.rb CHANGED
@@ -1,24 +1,27 @@
1
1
  require 'helper'
2
2
 
3
- class TestBarkeep < Test::Unit::TestCase
3
+ class FakeModule
4
4
  include Barkeep
5
+ end
5
6
 
7
+ describe "Barkeep" do
6
8
  attr_accessor :output_buffer
7
9
 
8
- def setup
9
- @barkeep = barkeep
10
- @barkeep.stubs({
11
- :config => {'github_url' => 'http://github.com/project_name', 'panes' => ['branch_info', 'commit_sha_info'], 'environments' => ['development']},
12
- :load? => true
13
- })
10
+ let(:barkeep) do
11
+ FakeModule.new.barkeep.tap do |bk|
12
+ bk.stubs({
13
+ :config => {'github_url' => 'http://github.com/project_name', 'panes' => ['branch_info', 'commit_sha_info'], 'environments' => ['development']},
14
+ :load? => true
15
+ })
16
+ end
14
17
  end
15
18
 
16
- should "render a style tag filled with css" do
19
+ it "renders a style tag filled with css" do
17
20
  css = File.read(File.expand_path(File.dirname(__FILE__) + "/../lib/default.css"))
18
- assert_equal "<style>#{css}</style>", @barkeep.styles
21
+ barkeep.styles.must_equal "<style>#{css}</style>"
19
22
  end
20
23
 
21
- should "render the barkeep bar" do
24
+ it "renders the barkeep bar" do
22
25
  GitWrapper.instance.stubs(:repository? => true, :to_hash => {:branch => 'new_branch', :commit => 'abcdef', :last_author => 'Johnny', :date => '2/11/2012'})
23
26
  expected = %(
24
27
  <dl id="barkeep">
@@ -29,7 +32,7 @@ class TestBarkeep < Test::Unit::TestCase
29
32
  <dd class="close"><a href="#" onclick="c = document.getElementById('barkeep'); c.parentNode.removeChild(c); return false" title="Close me!">&times;</a></dd>
30
33
  </dl>
31
34
  )
32
- assert_equal expected.gsub(/\s+/, ''), @barkeep.render_toolbar.gsub(/\s+/, '')
35
+ expected.gsub(/\s+/, '').must_equal barkeep.render_toolbar.gsub(/\s+/, '')
33
36
  end
34
37
  end
35
38
 
@@ -39,4 +42,3 @@ class String
39
42
  self
40
43
  end
41
44
  end
42
-
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: barkeep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - PatientsLikeMe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-20 00:00:00.000000000 Z
11
+ date: 2018-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -30,16 +30,16 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.9.12
33
+ version: 1.1.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
- version: 0.9.12
40
+ version: 1.1.0
41
41
  - !ruby/object:Gem::Dependency
42
- name: shoulda
42
+ name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -70,18 +70,21 @@ description: an extensible developer's status bar to track your current deployed
70
70
  & more
71
71
  email:
72
72
  - open_source@patientslikeme.com
73
- executables: []
73
+ executables:
74
+ - rake
74
75
  extensions: []
75
76
  extra_rdoc_files: []
76
77
  files:
77
78
  - ".document"
78
79
  - ".gitignore"
80
+ - ".travis.yml"
79
81
  - CHANGELOG.md
80
82
  - Gemfile
81
83
  - LICENSE.txt
82
- - README.rdoc
84
+ - README.md
83
85
  - Rakefile
84
86
  - barkeep.gemspec
87
+ - bin/rake
85
88
  - lib/barkeep.rb
86
89
  - lib/barkeep/version.rb
87
90
  - lib/default.css
@@ -108,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
111
  version: '0'
109
112
  requirements: []
110
113
  rubyforge_project:
111
- rubygems_version: 2.4.5.1
114
+ rubygems_version: 2.5.2
112
115
  signing_key:
113
116
  specification_version: 4
114
117
  summary: an extensible developer's status bar to track your current deployed commit