fastlane-plugin-demo_mode 1.0.0 → 1.0.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
2
  SHA1:
3
- metadata.gz: 475661cc4a265fdf65d26e2bd0f31eafc59f2630
4
- data.tar.gz: 433dea75df223f654cd3201db92dbfb593c299cb
3
+ metadata.gz: 159311c387b83004bcd225497cf16587081f916d
4
+ data.tar.gz: fa7089a3445272bb78536106fb54753a01755d62
5
5
  SHA512:
6
- metadata.gz: 40e0a1b5e3fefd24d08630d66a7821497eea7c7cfb23872d63e3b91a47934f2cf010d764cb4739952742ed880057ee65d4008423c9e36f29d3a24e66487dc649
7
- data.tar.gz: c03b334889d3e4147435bc9e1015e6e00b44c70c700f4d6a19c06aa6bafc53abe325c5032da2c0a81cda15f11cc1731304f9581cecae963811665deaf21f03c2
6
+ metadata.gz: 34cbf498e5e475c55368ac81c4b1996ab7740cfae744c23835119f891e3fe22c26a55caf80ec45cac9a9c5eba1652485f44fe7a2ef71e783715940ba1106f752
7
+ data.tar.gz: 3eac97edd110e1083ed07b9b9834c768746bb63c7d4dfcbfde80c89e8e222277d5af785c622e71b216d26af4b64acd8daeb5d67f31408d40c9c92424f3680754
@@ -3,25 +3,32 @@ module Fastlane
3
3
  module Actions
4
4
  class DemoModeAction < Action
5
5
  def self.run(config)
6
+ devices = Actions.sh("adb devices | tail -n +2 | cut -f1")
6
7
 
7
- command = "adb shell am broadcast -a com.android.systemui.demo -e command "
8
- showWifi = config[:wifi] ? "show" : "hide"
9
- showMobile = config[:mobile] ? "show" : "hide"
8
+ for device in devices.each_line
9
+ device = device.strip
10
+ next if device.empty?
10
11
 
11
- Actions.sh("adb shell settings put global sysui_demo_allowed 1")
12
+ UI.message("Set demo mode on " + device)
12
13
 
13
- if config[:deactivate]
14
- Actions.sh(command + "exit")
15
- else
16
- Actions.sh(command + "enter")
17
- Actions.sh(command + "clock -e hhmm #{config[:clock]}")
18
- Actions.sh(command + "battery -e level #{config[:battery]}")
19
- Actions.sh(command + "battery -e plugged #{config[:plugged]}")
20
- Actions.sh(command + "network -e wifi #{showWifi} -e level #{config[:wifi_level]}")
21
- Actions.sh(command + "network -e mobile #{showMobile} -e datatype none -e level #{config[:mobile_level]}")
22
- Actions.sh(command + "notifications -e visible #{config[:notifications]}")
23
- end
14
+ command = "adb -s #{device} shell am broadcast -a com.android.systemui.demo -e command "
15
+ showWifi = config[:wifi] ? "show" : "hide"
16
+ showMobile = config[:mobile] ? "show" : "hide"
17
+
18
+ Actions.sh("adb -s #{device} shell settings put global sysui_demo_allowed 1")
24
19
 
20
+ if config[:deactivate]
21
+ Actions.sh(command + "exit")
22
+ else
23
+ Actions.sh(command + "enter")
24
+ Actions.sh(command + "clock -e hhmm #{config[:clock]}")
25
+ Actions.sh(command + "battery -e level #{config[:battery]}")
26
+ Actions.sh(command + "battery -e plugged #{config[:plugged]}")
27
+ Actions.sh(command + "network -e wifi #{showWifi} -e level #{config[:wifi_level]}")
28
+ Actions.sh(command + "network -e mobile #{showMobile} -e datatype none -e level #{config[:mobile_level]}")
29
+ Actions.sh(command + "notifications -e visible #{config[:notifications]}")
30
+ end
31
+ end
25
32
  end
26
33
 
27
34
  def self.description
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module DemoMode
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-demo_mode
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Florian Rauscha
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-10 00:00:00.000000000 Z
11
+ date: 2017-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rubocop
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - '>='
80
+ - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: fastlane
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: 2.3.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 2.3.0
97
97
  description:
@@ -116,17 +116,17 @@ require_paths:
116
116
  - lib
117
117
  required_ruby_version: !ruby/object:Gem::Requirement
118
118
  requirements:
119
- - - '>='
119
+ - - ">="
120
120
  - !ruby/object:Gem::Version
121
121
  version: '0'
122
122
  required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  requirements:
124
- - - '>='
124
+ - - ">="
125
125
  - !ruby/object:Gem::Version
126
126
  version: '0'
127
127
  requirements: []
128
128
  rubyforge_project:
129
- rubygems_version: 2.6.10
129
+ rubygems_version: 2.6.13
130
130
  signing_key:
131
131
  specification_version: 4
132
132
  summary: Sets your connected android devices to demo mode