fastlane-plugin-bomb_emoji 0.1.1 → 0.1.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: '00694c2d11cd822debac08fc9cd1a87e91df6616'
4
- data.tar.gz: 317fb9c62d506665bae11a61a6aff2cb15ead559
3
+ metadata.gz: c748178448b1254cd4edb39e28ec1ba9e273d4ca
4
+ data.tar.gz: 182d8f0924e0af7ecb3326f7a7753226180d8c1c
5
5
  SHA512:
6
- metadata.gz: 7c84fbeede3e7e79fcb37239a3d17221624f8aa0204f3573b29ba1f9e927be5552c40866849d6f90514bb97c7ff5d36b1c79505fb8517d12938cbbab0330373c
7
- data.tar.gz: acac83291356cea046db84b1ba0b15c5ab52024e849f7b256b0d06964adbd4f28e1c0fbaf2dd5621392100d1164a66611f45a2d64ddbfbcc4e73a8eac3a1e29f
6
+ metadata.gz: 42782bf09ea770dea041000023bc1bf4dcf146803daa1580fe0a578dc2d9557e748513dabe2feadb156ac3fe27e932feeafc09926a728df6e190d4bd2ebde2fc
7
+ data.tar.gz: 552a84eaeb83a6899e2afea37eacf9051a048fb426b44785190547933a4953d0200602ca3907e6c81a90e41927f8661355db93a98f4803eec31b33e64ff65a19
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # bomb_emoji plugin
1
+ # bomb_emoji plugin 💣💥💣💥💣💥💣💥
2
2
 
3
3
  [![fastlane Plugin Badge](https://rawcdn.githack.com/fastlane/fastlane/master/fastlane/assets/plugin-badge.svg)](https://rubygems.org/gems/fastlane-plugin-bomb_emoji)
4
4
 
@@ -12,16 +12,39 @@ fastlane add_plugin bomb_emoji
12
12
 
13
13
  ## About bomb_emoji
14
14
 
15
- No more emojis
15
+ No more emojis 🙌🎊🎉
16
16
 
17
- **Note to author:** Add a more detailed description about this plugin here. If your plugin contains multiple actions, make sure to mention them here.
17
+ ```rb
18
+ bomb_emoji
19
+
20
+ lane :test do
21
+ UI.message "🚀 <-- should NOT have rocket emoji and no emojis after this"
22
+ end
23
+ ```
24
+
25
+ ### Before
26
+
27
+ ```sh
28
+ ➜ fastlane-plugin-bomb_emoji git:(master) ✗ fastlane test
29
+ [08:08:51]: Driving the lane 'test' 🚀
30
+ [08:08:51]: 🚀 <-- should NOT have rocket emoji and no emojis after this
31
+ [08:08:51]: fastlane.tools finished successfully 🎉
32
+ ```
33
+
34
+ ### After
35
+
36
+ ```sh
37
+ ➜ fastlane-plugin-bomb_emoji git:(master) ✗ fastlane test
38
+ [08:03:01]: Driving the lane 'test'
39
+ [08:03:01]: <-- should NOT have rocket emoji and no emojis after this
40
+ [08:03:01]: fastlane.tools finished successfully
41
+ fastlane-plugin-bomb_emoji saved you 2 emoji
42
+ ````
18
43
 
19
44
  ## Example
20
45
 
21
46
  Check out the [example `Fastfile`](fastlane/Fastfile) to see how to use this plugin. Try it by cloning the repo, running `fastlane install_plugins` and `bundle exec fastlane test`.
22
47
 
23
- **Note to author:** Please set up a sample project to make it easy for users to explore what your plugin does. Provide everything that is necessary to try out the plugin in this project (including a sample Xcode/Android project if necessary)
24
-
25
48
  ## Run tests for this plugin
26
49
 
27
50
  To run both the tests, and code style validation, run
@@ -6,6 +6,9 @@ module Fastlane
6
6
 
7
7
  module Helper
8
8
  class BombEmojiHelper
9
+ @@emojis_removed = 0
10
+ @@emoji_lines_cleaned = []
11
+
9
12
  def self.bomb(arg)
10
13
  # Only bomb if we want to bomb
11
14
  return arg unless ENV['BOMB_EMOJI_ENABLED']
@@ -13,20 +16,27 @@ module Fastlane
13
16
  # Don't bomb a table
14
17
  return arg if arg.kind_of?(Terminal::Table)
15
18
 
19
+ # Only bomb a string
20
+ return arg unless arg.kind_of?(String)
21
+
16
22
  # Don't bomb a separator
17
23
  return arg if arg.start_with?("---")
18
24
 
19
25
  # Bomb the rest
20
- return arg.to_s.gsub!(EmojiRegex::Regex, "")
21
- end
26
+ clean = arg.to_s.gsub(EmojiRegex::Regex, "").to_s
27
+
28
+ count = arg.to_s.size - clean.size
29
+ @@emojis_removed += count
30
+ @@emoji_lines_cleaned << arg if count > 0
22
31
 
23
- module IO
24
- def puts(*args)
25
- args = args.map do |arg|
26
- BombEmojiHelper.bomb(arg)
27
- end
28
- super(args)
32
+ if clean.start_with?("fastlane.tools finished successfully") || clean.start_with?("fastlane.tools just saved you") || clean.start_with?("fastlane finished with errors")
33
+ clean += "\nfastlane-plugin-bomb_emoji saved you #{@@emojis_removed} emoji"
34
+ @@emoji_lines_cleaned.each do |line|
35
+ clean += "\n\t#{line}"
36
+ end if FastlaneCore::Globals.verbose?
29
37
  end
38
+
39
+ return clean
30
40
  end
31
41
 
32
42
  module Shell
@@ -45,12 +55,6 @@ module Fastlane
45
55
  def deprecated(arg)
46
56
  super(BombEmojiHelper.bomb(arg))
47
57
  end
48
- def command(arg)
49
- super(BombEmojiHelper.bomb(arg))
50
- end
51
- def command_output(arg)
52
- super(BombEmojiHelper.bomb(arg))
53
- end
54
58
  def verbose(arg)
55
59
  super(BombEmojiHelper.bomb(arg))
56
60
  end
@@ -59,14 +63,9 @@ module Fastlane
59
63
  end
60
64
  end
61
65
 
62
- # Prep to 💣 emojis
63
- class IO
64
- #prepend Fastlane::Helper::BombEmojiHelper::IO
65
- end
66
-
67
66
  # Prep to 💣 emojis
68
67
  module FastlaneCore
69
68
  class Shell
70
69
  prepend Fastlane::Helper::BombEmojiHelper::Shell
71
70
  end
72
- end
71
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module BombEmoji
3
- VERSION = "0.1.1"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-bomb_emoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Josh Holtz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-26 00:00:00.000000000 Z
11
+ date: 2019-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: emoji_regex