ruby_badger 4.2.2 → 4.2.3

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
  SHA256:
3
- metadata.gz: d14675dd254763492d867ae8e43bd2659f73457a1be482d0c0683328ccbae847
4
- data.tar.gz: 6ad7b0a1629c0a7e093e21e0e8af0d1d80d465b42359df0b1274f363ad198852
3
+ metadata.gz: 389380a9907fcd45d232765dc266ff5542d08676c6c684a85c108a2517ca4394
4
+ data.tar.gz: 10b0d9fff940261cab9f17e5620b7cfdd10e6fe657b87ccd3eb6cdaf0cc1372a
5
5
  SHA512:
6
- metadata.gz: bf775bb247f33ad0c69629c35c3d4a3006aac3679481df70fc12b0d4fbf51817a01da8274f07d97264255a874e824d5456b5c23a4023d8cf6f960370ad79a454
7
- data.tar.gz: d90a3877cab582732a0b747e11f63903c42e1662527648bdc95f8945c59229512187e2f701cc3fa8f7002999e820544e2f69b8c7fd8ed6d9f90d768bce68d71e
6
+ metadata.gz: a1e5d6657a82085632f168d8ca1910bd7b71ee3f077102a4f1e5e2506fa025535d810681c937e5dcba84447a5efb9ada43bf95ec29e9926c547e1384482c8854
7
+ data.tar.gz: 39ede298ac6c4d26d70d38ff40bf1b082d02858fcb9031a686c063bf8e95e4148023c009e0f735d0eea576ff176279ad563eb4c222d20175601b4ac9b623e4ff
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ruby_badger (4.2.2)
4
+ ruby_badger (4.2.3)
5
5
  rails (~> 4.2, >= 4.2)
6
6
 
7
7
  GEM
@@ -165,15 +165,15 @@ PLATFORMS
165
165
 
166
166
  DEPENDENCIES
167
167
  bundler (~> 1.8, >= 1.8)
168
- capybara
169
- factory_bot_rails
170
- fuubar
168
+ capybara (~> 2.18.0, >= 2.18)
169
+ factory_bot_rails (~> 4.8.2, >= 4.8)
170
+ fuubar (~> 2.3.1, >= 2.3)
171
171
  jquery-rails
172
172
  rails
173
173
  rake (~> 12.3.0, >= 12.3)
174
- rspec-rails
174
+ rspec-rails (~> 3.7.2, >= 3.7)
175
175
  ruby_badger!
176
- sass-rails
176
+ sass-rails (~> 5.0.7, >= 5.0)
177
177
  sqlite3
178
178
 
179
179
  BUNDLED WITH
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Get a nice, clean badge displaying your Rails Environment or other helpful info. Want to display last deploy date? Or maybe the status of some app wide settings? Throw it in RubyBadger! He just doesn't care!
4
4
 
5
- This is my fork/gem of [honey_badger](https://github.com/rsanheim/honey_badger) gem. This exists because honey_badger has gone dormant and hasn't been patched in many years. Although this one is not an actively changing gem, Pull requests are accepted.
5
+ This is my fork/gem of [honey_badger](https://github.com/rsanheim/honey_badger) gem. This exists because honey_badger has gone dormant and hasn't been patched in many years. Although this one is not an actively changing gem, Pull requests are accepted.
6
6
 
7
7
  # Usage (requires Rails 4.2 and Bundler > 1.8)
8
8
 
@@ -22,6 +22,11 @@ Or pass in an array to display more than one interesting fact in your badge (eac
22
22
 
23
23
  <%= ruby_badger ["eats larva", "skin is loose"] %>
24
24
 
25
+ To get the current get branch information: (default is false)
26
+
27
+ <%= ruby_badger(nil, true) %> # for default env text + git info
28
+ <%= ruby_badger(["eats larva", "skin is loose"], true) %> # for custom text + git info
29
+
25
30
  Add the require for the css in your application.css (using Rails 3.1 sprockets awesomeness):
26
31
 
27
32
  /*
@@ -1,10 +1,20 @@
1
1
  module RubyBadger
2
2
  module ApplicationHelper
3
- def ruby_badger(text=Rails.env)
4
- content_tag :div, :class => "corner-banner ruby-badger #{Rails.env}" do
5
- text = text.join('<br/>') if text.instance_of?(Array)
6
- text.html_safe
3
+ def ruby_badger(text = nil, git_info = false)
4
+ content_tag :div, class: "corner-banner ruby-badger #{Rails.env}" do
5
+ text = Rails.env if text.blank?
6
+ if text.instance_of?(Array)
7
+ text << [git_branch_info] if git_info
8
+ text.join('<br/>').html_safe
9
+ else
10
+ text += '<br/>' << git_branch_info if git_info
11
+ text.html_safe
12
+ end
7
13
  end
8
14
  end
15
+
16
+ def git_branch_info
17
+ `git rev-parse --abbrev-ref HEAD`.chomp
18
+ end
9
19
  end
10
20
  end
@@ -1,3 +1,3 @@
1
1
  module RubyBadger
2
- VERSION = "4.2.2"
2
+ VERSION = "4.2.3"
3
3
  end
@@ -10,3 +10,12 @@ Started GET "/assets/ruby_badger.css" for 127.0.0.1 at 2018-03-09 10:56:08 -0600
10
10
   (0.2ms) begin transaction
11
11
  Started GET "/assets/ruby_badger.css" for 127.0.0.1 at 2018-03-09 10:56:21 -0600
12
12
   (0.1ms) rollback transaction
13
+  (0.2ms) begin transaction
14
+ Started GET "/assets/ruby_badger.css" for 127.0.0.1 at 2018-03-09 11:15:59 -0600
15
+  (0.1ms) rollback transaction
16
+  (0.2ms) begin transaction
17
+ Started GET "/assets/ruby_badger.css" for 127.0.0.1 at 2018-03-09 11:16:16 -0600
18
+  (0.1ms) rollback transaction
19
+  (0.3ms) begin transaction
20
+ Started GET "/assets/ruby_badger.css" for 127.0.0.1 at 2018-03-09 11:31:28 -0600
21
+  (0.1ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_badger
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.2
4
+ version: 4.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Southard