fastlane 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cebfea716260d2cb57c35933a33328e4e84108b7
4
- data.tar.gz: 63f7321329f5a086a730e92025badcf405e50530
3
+ metadata.gz: 1c350e6249a35b24af7d49ce3fc5e2338d7b1e7d
4
+ data.tar.gz: de99ca4312f03d470d56aa6c046851d4e46fd25f
5
5
  SHA512:
6
- metadata.gz: 4c25ba42dc222a5e47646f0b5c764b5d4fa8664a7d0e1d69c015c6b2b35061d279f87bafd7e6181307eb195ddb8c003509787e07a259065b441dbc75a029f630
7
- data.tar.gz: 5ca184b2aa8a5edcd0a59766562531af2e31c6fb593c5a555074209dbf31141eeb859a150842758a82b42110a4d21fdd3615047b03f71dd169fe00964675abf8
6
+ metadata.gz: 481dac79ca57963a8395f6449e0bd27e415ce021d9b17c7a4ae1a6a6d917ec5af85e690a989bc4b94644ddd712c1c67cd4b0f72290a0d65b85b33689213e5884
7
+ data.tar.gz: 324a00d3f0e106cbab7209f4afeabaaa659aa6d1723eb959951630038c98b44bd77994fadf5cf110c041356eac7bd4a3016c5ac7d307cb808da387bae2745ec7
data/README.md CHANGED
@@ -159,6 +159,7 @@ A detailed description about how ```fastlane``` stores your credentials is avail
159
159
  Thanks to all contributors for extending and improving the `fastlane` suite:
160
160
 
161
161
  - [Product Hunt](http://producthunt.com)
162
+ - [MindNode](https://mindnode.com)
162
163
  - [Detroit Labs](http://www.detroitlabs.com/)
163
164
  - Josh Holtz ([@joshdholtz](https://twitter.com/joshdholtz))
164
165
  - Ash Furrow ([@ashfurrow](https://twitter.com/ashfurrow))
@@ -67,7 +67,7 @@ class FastlaneApplication
67
67
  c.description = 'Lists all available lanes'
68
68
 
69
69
  c.action do |_args, _options|
70
- ff = Fastlane::FastFile.new(File.join(Fastlane::FastlaneFolder.path, 'Fastfile'))
70
+ ff = Fastlane::FastFile.new(File.join(Fastlane::FastlaneFolder.path || '.', 'Fastfile'))
71
71
  puts "\nAvailable lanes:".green
72
72
  ff.runner.available_lanes.each do |lane|
73
73
  puts "- #{lane}"
@@ -0,0 +1,74 @@
1
+ module Fastlane
2
+ module Actions
3
+ module SharedValues
4
+ end
5
+
6
+ class ChatworkAction < Action
7
+ def self.run(options)
8
+ require 'net/http'
9
+ require 'uri'
10
+
11
+ emoticon = (options[:success] ? '(dance)' : ';(')
12
+
13
+ uri = URI.parse("https://api.chatwork.com/v1/rooms/#{options[:roomid]}/messages")
14
+ https = Net::HTTP.new(uri.host, uri.port)
15
+ https.use_ssl = true
16
+
17
+ req = Net::HTTP::Post.new(uri.request_uri)
18
+ req['X-ChatWorkToken'] = options[:api_token]
19
+ req.set_form_data({
20
+ 'body' => "[info][title]Notification from fastlane[/title]#{emoticon} #{options[:message]}[/info]"
21
+ })
22
+
23
+ response = https.request(req)
24
+ case response.code.to_i
25
+ when 200..299
26
+ Helper.log.info 'Successfully sent notification to ChatWork right now 📢'.green
27
+ else
28
+ require 'json'
29
+ json = JSON.parse(response.body)
30
+ raise "HTTP Error: #{response.code} #{json['errors']}".red
31
+ end
32
+ end
33
+
34
+ def self.description
35
+ "Send a success/error message to ChatWork"
36
+ end
37
+
38
+ def self.available_options
39
+ [
40
+ FastlaneCore::ConfigItem.new(key: :api_token,
41
+ env_name: "CHATWORK_API_TOKEN",
42
+ description: "ChatWork API Token",
43
+ verify_block: Proc.new do |value|
44
+ unless value.to_s.length > 0
45
+ Helper.log.fatal "Please add 'ENV[\"CHATWORK_API_TOKEN\"] = \"your token\"' to your Fastfile's `before_all` section.".red
46
+ raise 'No CHATWORK_API_TOKEN given.'.red
47
+ end
48
+ end),
49
+ FastlaneCore::ConfigItem.new(key: :message,
50
+ env_name: "FL_CHATWORK_MESSAGE",
51
+ description: "The message to post on ChatWork"),
52
+ FastlaneCore::ConfigItem.new(key: :roomid,
53
+ env_name: "FL_CHATWORK_ROOMID",
54
+ description: "The room ID",
55
+ is_string: false),
56
+ FastlaneCore::ConfigItem.new(key: :success,
57
+ env_name: "FL_CHATWORK_SUCCESS",
58
+ description: "Was this build successful? (true/false)",
59
+ optional: true,
60
+ default_value: true,
61
+ is_string: false)
62
+ ]
63
+ end
64
+
65
+ def self.author
66
+ "ChatWork Inc."
67
+ end
68
+
69
+ def self.is_supported?(platform)
70
+ true
71
+ end
72
+ end
73
+ end
74
+ end
@@ -110,7 +110,7 @@ module Fastlane
110
110
  end
111
111
 
112
112
  def self.is_supported?(platform)
113
- platform == :ios
113
+ [:ios, :mac].include?platform
114
114
  end
115
115
  end
116
116
  end
@@ -7,7 +7,7 @@ module Fastlane
7
7
  class CrashlyticsAction < Action
8
8
 
9
9
  def self.is_supported?(platform)
10
- platform == :ios
10
+ [:ios, :mac].include?platform
11
11
  end
12
12
 
13
13
  def self.run(params)
@@ -78,7 +78,7 @@ module Fastlane
78
78
  end
79
79
 
80
80
  def self.is_supported?(platform)
81
- platform == :ios
81
+ [:ios, :mac].include?platform
82
82
  end
83
83
  end
84
84
  end
@@ -28,7 +28,7 @@ module Fastlane
28
28
  #####################################################
29
29
 
30
30
  def self.is_supported?(platform)
31
- platform == :ios
31
+ [:ios, :mac].include?platform
32
32
  end
33
33
 
34
34
  def self.description
@@ -47,7 +47,13 @@ module Fastlane
47
47
  env_name: "FRAMEIT_FORCE_DEVICE_TYPE",
48
48
  description: "Forces a given device type, useful for Mac screenshots, as their sizes vary",
49
49
  default_value: '',
50
- optional: true)
50
+ optional: true,
51
+ verify_block: Proc.new do |value|
52
+ available = ['iPhone_6_Plus', 'iPhone_5s', 'iPhone_4', 'iPad_mini', 'Mac']
53
+ unless available.include?value
54
+ raise "Invalid device type '#{value}'. Available values: #{available}".red
55
+ end
56
+ end)
51
57
  ]
52
58
  end
53
59
 
@@ -13,7 +13,9 @@ module Fastlane
13
13
 
14
14
  channel = options[:channel]
15
15
  color = (options[:success] ? 'green' : 'red')
16
- message = "<table><tr><td><img src=\"https://s3-eu-west-1.amazonaws.com/fastlane.tools/fastlane.png\" width=\"50\" height=\"50\"></td><td>" + options[:message] + '</td></tr></table>'
16
+
17
+ the_message = options[:message]
18
+ message = "<table><tr><td><img src='https://s3-eu-west-1.amazonaws.com/fastlane.tools/fastlane.png' width='50' height='50'></td><td>#{the_message[0..9999]}</td></tr></table>"
17
19
 
18
20
  if api_version.to_i == 1
19
21
  ########## running on V1 ##########
@@ -66,11 +68,11 @@ module Fastlane
66
68
  when 200, 204
67
69
  true
68
70
  when 404
69
- raise "Unknown #{channel}".red
71
+ raise "Channel `#{channel}` not found".red
70
72
  when 401
71
- raise "Access denied #{channel}".red
73
+ raise "Access denied for channel `#{channel}`".red
72
74
  else
73
- raise "Unexpected #{response.code} for `#{channel}'".red
75
+ raise "Unexpected #{response.code} for `#{channel}` with response: #{response.body}".red
74
76
  end
75
77
  end
76
78
 
@@ -86,8 +88,7 @@ module Fastlane
86
88
  default_value: ''),
87
89
  FastlaneCore::ConfigItem.new(key: :channel,
88
90
  env_name: "FL_HIPCHAT_CHANNEL",
89
- description: "The room or @username",
90
- optional: true),
91
+ description: "The room or @username"),
91
92
  FastlaneCore::ConfigItem.new(key: :api_token,
92
93
  env_name: "HIPCHAT_API_TOKEN",
93
94
  description: "Hipchat API Token",
@@ -8,7 +8,7 @@ module Fastlane
8
8
  require 'shellwords'
9
9
 
10
10
  def self.is_supported?(platform)
11
- platform == :ios
11
+ [:ios, :mac].include?platform
12
12
  end
13
13
 
14
14
  def self.run(params)
@@ -8,7 +8,7 @@ module Fastlane
8
8
  require 'shellwords'
9
9
 
10
10
  def self.is_supported?(platform)
11
- platform == :ios
11
+ [:ios, :mac].include?platform
12
12
  end
13
13
 
14
14
  def self.run(params)
@@ -10,7 +10,7 @@ module Fastlane
10
10
  end
11
11
 
12
12
  def self.is_supported?(platform)
13
- platform == :ios
13
+ [:ios, :mac].include?platform
14
14
  end
15
15
  end
16
16
  end
@@ -80,7 +80,7 @@ module Fastlane
80
80
  end),
81
81
  FastlaneCore::ConfigItem.new(key: :team_id,
82
82
  env_name: "FASTLANE_TEAM_ID",
83
- description: "optional: Your team ",
83
+ description: "optional: Your team ID",
84
84
  optional: true),
85
85
  FastlaneCore::ConfigItem.new(key: :username,
86
86
  env_name: "CUPERTINO_USERNAME",
@@ -41,7 +41,7 @@ module Fastlane
41
41
  end
42
42
 
43
43
  def self.is_supported?(platform)
44
- platform == :ios
44
+ [:ios, :mac].include?platform
45
45
  end
46
46
  end
47
47
  end
@@ -27,7 +27,7 @@ module Fastlane
27
27
  end
28
28
 
29
29
  def self.is_supported?(platform)
30
- platform == :ios
30
+ [:ios, :mac].include?platform
31
31
  end
32
32
  end
33
33
  end
@@ -1,3 +1,3 @@
1
1
  module Fastlane
2
- VERSION = '1.1.0'
2
+ VERSION = '1.2.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-15 00:00:00.000000000 Z
11
+ date: 2015-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -383,6 +383,7 @@ files:
383
383
  - lib/fastlane/actions/actions_helper.rb
384
384
  - lib/fastlane/actions/add_git_tag.rb
385
385
  - lib/fastlane/actions/cert.rb
386
+ - lib/fastlane/actions/chatwork.rb
386
387
  - lib/fastlane/actions/clean_build_artifacts.rb
387
388
  - lib/fastlane/actions/commit_version_bump.rb
388
389
  - lib/fastlane/actions/crashlytics.rb