droid_adbs 0.1.2 → 0.1.3

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: 373c4e52dead49c869d4cc4628f0268a0bf5c25c
4
- data.tar.gz: 7cf25c9bc5a99007c1e6311fddeefdc0c51f8b5f
3
+ metadata.gz: 524babd55878be9a7ccbd0bf7270f9d85633c17a
4
+ data.tar.gz: 92cbced291a93d398375605881d523d714741ee5
5
5
  SHA512:
6
- metadata.gz: a8d616edfb519a5dd5f41867328ab265f6beec44a1b7c1ba499adc07c3f3a9729ed8db675bc585bd70bed5937604acda92ad849eeb2708b08dddcf3d1a7baf00
7
- data.tar.gz: d87207b04a1d329ab79e1a2705fffd8029a2e7b9b6c87a8004a94810629f6b7be201e15327d895bc0e4cdaa91caf00394192b760f96b7c88cc428a823969a375
6
+ metadata.gz: 4904b8dd3f070d28717029063a786872d38a54376cb53c7979d7f7823385263f93fcd0749c09e774bd0781d67ae7260c61417dcdc142bca4d02134dadfcf7840
7
+ data.tar.gz: 960946b765bfa98b14874bd40905b3b6f11a988a87a1db4dcb5d4c6967115096e7c670a954f8d3e57ea1b8f7c3fda5012951c0c04e97a47413d8362b8a9fda88
@@ -0,0 +1,27 @@
1
+ require_relative "../../droid_adbs"
2
+
3
+ module DroidAdbs
4
+ module IME
5
+ class << self
6
+ # @return [String] message from adb command
7
+ def get_ime_list
8
+ `#{::DroidAdbs.shell} ime list`.chomp
9
+ end
10
+
11
+ # @param [String] ime_id ID provided by IME such as "com.google.android.inputmethod.japanese/.MozcService"
12
+ # @return [String] message from adb command
13
+ # if it succeeded to set IME, then it returns "Input method com.google.android.inputmethod.japanese/.MozcService selected"
14
+ # if it failed to set IME because of no ID, then it returns "Error: Unknown id: ime_id"
15
+ def set_ime(ime_id)
16
+ `#{::DroidAdbs.shell} ime set #{ime_id}`.chomp
17
+ end
18
+
19
+ # @param [String] ime_lists
20
+ # @return [Array] Array of IME ID list such as ["com.agilebits.onepassword/.filling.FillingInputMethodService",
21
+ # com.google.android.googlequicksearchbox/com.google.android.voicesearch.ime.VoiceInputMethodService"]
22
+ def parse_ime_list(ime_lists)
23
+ ime_lists.each_line.map { |line| line.chomp.scan(/\A\S+:\z/).first }.compact.map(&:chop)
24
+ end
25
+ end
26
+ end
27
+ end
@@ -1,3 +1,3 @@
1
1
  module DroidAdbs
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
data/lib/droid_adbs.rb CHANGED
@@ -2,6 +2,7 @@ require_relative "droid_adbs/version"
2
2
  require_relative "droid_adbs/commons/settings"
3
3
  require_relative "droid_adbs/commons/devices"
4
4
  require_relative "droid_adbs/commons/backup"
5
+ require_relative "droid_adbs/commons/ime"
5
6
  require_relative "droid_adbs/aapt"
6
7
 
7
8
  module DroidAdbs
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: droid_adbs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-08-08 00:00:00.000000000 Z
11
+ date: 2016-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,6 +72,7 @@ files:
72
72
  - lib/droid_adbs/aapt.rb
73
73
  - lib/droid_adbs/commons/backup.rb
74
74
  - lib/droid_adbs/commons/devices.rb
75
+ - lib/droid_adbs/commons/ime.rb
75
76
  - lib/droid_adbs/commons/settings.rb
76
77
  - lib/droid_adbs/version.rb
77
78
  homepage: https://github.com/KazuCocoa/droid_adbs