fastlane-craft 1.1.0 → 1.1.1

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
- SHA1:
3
- metadata.gz: '0884911a9016dc68fd49fbf17d68ad245ed9f5a0'
4
- data.tar.gz: 5a2b18a4409cb3f216cf252229716bba24a63363
2
+ SHA256:
3
+ metadata.gz: 4d590b43e4ed7f0c9b814a6cf4ebb750899deea475bfd7c5d53ea80fbf442ce1
4
+ data.tar.gz: d72ff4d6287905d5dadf524a9681db5f3650e145863ee78b8904e0ad61a89e62
5
5
  SHA512:
6
- metadata.gz: 10c5d3afa7c469f986b2458cb175a85715f669a6ac84253e02ae31bee3751bc52ccda6431d622b5d928cbc7669d847f9f25ba25272cef9fe0fdbda058357dbdf
7
- data.tar.gz: 8ba85b480f846488a99523e9b0e92685e9b3f72f2051766f055512d74173d9da44931c211e701de2f74fc6d64d69767d1c8cc7b73a79a9e72e5a183276b651d3
6
+ metadata.gz: 89723aa09da0b4a6b8c660e10ebc8f9e465acfad7b4e84f88eb7b952b8f8c2c87d6f7b3e6ef75ca5ac291c52d164b1627e454f8d8eb6efbb46a46159ec251dd0
7
+ data.tar.gz: 41c18e2a64e1bc82efe4ac5552e936b2d83ae543e943f66dfa7dcfa57c7b5924011d3f6c4036b635e2550af536a9053444e4f7b5aaed25998f36a2a90df0d6d3
@@ -1,5 +1,6 @@
1
1
  require_relative 'fastlane_craft/telegram'
2
2
  require_relative 'fastlane_craft/telegram_notifier'
3
+ require_relative 'fastlane_craft/version'
3
4
 
4
5
  module FastlaneCraft
5
- end
6
+ end
@@ -1,11 +1,12 @@
1
1
  require_relative 'telegram_notifier'
2
- include FastlaneCraft
3
2
 
4
3
  module Fastlane
5
4
  module Actions
6
5
  class TelegramAction < Action
6
+ include FastlaneCraft
7
+
7
8
  def self.run(params)
8
- TelegramNotifier.notify(
9
+ TelegramNotifier.notify(
9
10
  bot_api_token: params[:bot_api_token],
10
11
  chat_id: params[:chat_id],
11
12
  message: params[:message],
@@ -18,34 +19,34 @@ module Fastlane
18
19
  #####################################################
19
20
 
20
21
  def self.description
21
- "Send a success/error message to your Telegram group"
22
+ 'Send a success/error message to your Telegram group'
22
23
  end
23
24
 
24
25
  def self.details
25
- "Send a success/error message to your Telegram group"
26
+ 'Send a success/error message to your Telegram group'
26
27
  end
27
28
 
28
29
  def self.available_options
29
30
  [
30
31
  FastlaneCore::ConfigItem.new(key: :bot_api_token,
31
- env_name: "FL_TELEGRAM_BOT_API_TOKEN",
32
- description: "API Token for telegram bot",
32
+ env_name: 'FL_TELEGRAM_BOT_API_TOKEN',
33
+ description: 'API Token for telegram bot',
33
34
  verify_block: proc do |value|
34
- UI.user_error!("No bot API token for TelegramAction given, pass using `bot_api_token: 'token'`") unless (value and not value.empty?)
35
+ UI.user_error!("No bot API token for TelegramAction given, pass using `bot_api_token: 'token'`") unless value && !value.empty?
35
36
  end),
36
37
  FastlaneCore::ConfigItem.new(key: :message,
37
- env_name: "FL_TELEGRAM_MESSAGE",
38
- description: "The message that should be displayed on Telegram",
38
+ env_name: 'FL_TELEGRAM_MESSAGE',
39
+ description: 'The message that should be displayed on Telegram',
39
40
  optional: true),
40
41
  FastlaneCore::ConfigItem.new(key: :chat_id,
41
- env_name: "FL_TELEGRAM_CHAT_ID",
42
- description: "telegram chat id",
42
+ env_name: 'FL_TELEGRAM_CHAT_ID',
43
+ description: 'telegram chat id',
43
44
  verify_block: proc do |value|
44
- UI.user_error!("No chat id for TelegramAction given, pass using `chat_id: 'chat id'`") unless (value and not value.empty?)
45
+ UI.user_error!("No chat id for TelegramAction given, pass using `chat_id: 'chat id'`") unless value && !value.empty?
45
46
  end),
46
47
  FastlaneCore::ConfigItem.new(key: :parse_mode,
47
- env_name: "FL_TELEGRAM_MESSAGE_PARSE_MODE",
48
- description: "telegram message parse mode",
48
+ env_name: 'FL_TELEGRAM_MESSAGE_PARSE_MODE',
49
+ description: 'telegram message parse mode',
49
50
  optional: true)
50
51
  ]
51
52
  end
@@ -63,17 +64,16 @@ module Fastlane
63
64
  end
64
65
 
65
66
  def self.authors
66
- ["sroik", "elfenlaid"]
67
+ %w[sroik elfenlaid]
67
68
  end
68
69
 
69
- def self.is_supported?(platform)
70
+ def self.is_supported?(_)
70
71
  true
71
72
  end
72
73
 
73
74
  def self.category
74
75
  :notifications
75
76
  end
76
-
77
77
  end
78
78
  end
79
79
  end
@@ -1,12 +1,12 @@
1
1
  require 'net/https'
2
2
  require 'uri'
3
3
 
4
- module FastlaneCraft
5
- HTML = 'HTML'
6
- MARKDOWN = 'Markdown'
4
+ module FastlaneCraft
5
+ HTML = 'HTML'.freeze
6
+ MARKDOWN = 'Markdown'.freeze
7
7
 
8
8
  class TelegramNotifier
9
- def self.notify(bot_api_token:,chat_id:, message:, parse_mode: nil)
9
+ def self.notify(bot_api_token:, chat_id:, message:, parse_mode: nil)
10
10
  uri = URI.parse("https://api.telegram.org/bot#{bot_api_token}/sendMessage")
11
11
  params = { text: message, chat_id: chat_id }
12
12
  params[:parse_mode] = parse_mode unless parse_mode.nil?
@@ -0,0 +1,3 @@
1
+ module FastlaneCraft
2
+ VERSION = '1.1.1'.freeze
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-craft
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sroik
@@ -9,48 +9,90 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-03-23 00:00:00.000000000 Z
12
+ date: 2018-01-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ">="
18
+ - - ">"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '0'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ">="
25
+ - - ">"
26
+ - !ruby/object:Gem::Version
27
+ version: '0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: gem-release
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">"
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :development
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">"
26
40
  - !ruby/object:Gem::Version
27
41
  version: '0'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: rake
30
44
  requirement: !ruby/object:Gem::Requirement
31
45
  requirements:
32
- - - ">="
46
+ - - ">"
47
+ - !ruby/object:Gem::Version
48
+ version: '0'
49
+ type: :development
50
+ prerelease: false
51
+ version_requirements: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">"
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ - !ruby/object:Gem::Dependency
57
+ name: rubocop
58
+ requirement: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">"
61
+ - !ruby/object:Gem::Version
62
+ version: '0.52'
63
+ type: :development
64
+ prerelease: false
65
+ version_requirements: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">"
68
+ - !ruby/object:Gem::Version
69
+ version: '0.52'
70
+ - !ruby/object:Gem::Dependency
71
+ name: test-unit
72
+ requirement: !ruby/object:Gem::Requirement
73
+ requirements:
74
+ - - ">"
33
75
  - !ruby/object:Gem::Version
34
76
  version: '0'
35
77
  type: :development
36
78
  prerelease: false
37
79
  version_requirements: !ruby/object:Gem::Requirement
38
80
  requirements:
39
- - - ">="
81
+ - - ">"
40
82
  - !ruby/object:Gem::Version
41
83
  version: '0'
42
84
  - !ruby/object:Gem::Dependency
43
85
  name: webmock
44
86
  requirement: !ruby/object:Gem::Requirement
45
87
  requirements:
46
- - - ">="
88
+ - - ">"
47
89
  - !ruby/object:Gem::Version
48
90
  version: '0'
49
91
  type: :development
50
92
  prerelease: false
51
93
  version_requirements: !ruby/object:Gem::Requirement
52
94
  requirements:
53
- - - ">="
95
+ - - ">"
54
96
  - !ruby/object:Gem::Version
55
97
  version: '0'
56
98
  description: fastlane craft
@@ -59,9 +101,10 @@ executables: []
59
101
  extensions: []
60
102
  extra_rdoc_files: []
61
103
  files:
62
- - lib/fastlane-craft.rb
104
+ - lib/fastlane_craft.rb
63
105
  - lib/fastlane_craft/telegram.rb
64
106
  - lib/fastlane_craft/telegram_notifier.rb
107
+ - lib/fastlane_craft/version.rb
65
108
  homepage: https://github.com/app-craft/fastlane-craft.git
66
109
  licenses:
67
110
  - MIT
@@ -82,7 +125,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
125
  version: '0'
83
126
  requirements: []
84
127
  rubyforge_project:
85
- rubygems_version: 2.6.10
128
+ rubygems_version: 2.7.3
86
129
  signing_key:
87
130
  specification_version: 4
88
131
  summary: fastlane craft summary