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 +4 -4
- data/README.md +28 -5
- data/lib/fastlane/plugin/bomb_emoji/helper/bomb_emoji_helper.rb +19 -20
- data/lib/fastlane/plugin/bomb_emoji/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c748178448b1254cd4edb39e28ec1ba9e273d4ca
|
4
|
+
data.tar.gz: 182d8f0924e0af7ecb3326f7a7753226180d8c1c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
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
|
-
|
21
|
-
|
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
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
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
|
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.
|
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-
|
11
|
+
date: 2019-04-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: emoji_regex
|