jaguar 0.1.2 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/jaguar/dsl/keyboard.rb +3 -3
- data/lib/jaguar/dsl/keyboard/type.rb +10 -10
- data/lib/jaguar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9421621a8458c6e8859481ac560c55392f1e6bf29773149b0b1dc37d95a7773e
|
4
|
+
data.tar.gz: 4ae4715c52acde826cc2413caab25740e224f49256cb8db4b11af5b18d2ec651
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f54c609d4190205367c087e638ea9a50ad00bf1b2ba9af2e8b510a9ef57b015cfe70a39140b6e7ddc1f81679828fdc4096aac743dec5a204d0e5889887435209
|
7
|
+
data.tar.gz: 83e5e18682a7f1a452bb7513e9d5b85d35953cbdf731faa403eb7a513b21927bb6de497983aaafed1addf5861089251076f2e8478a90dc1bf8a0ae64f324bd4a
|
data/lib/jaguar/dsl/keyboard.rb
CHANGED
@@ -3,9 +3,9 @@ module Jaguar
|
|
3
3
|
module Keyboard
|
4
4
|
include Contracts::Core
|
5
5
|
|
6
|
-
Contract Jaguar::C::Args[Jaguar::C::Or[String,Array,
|
7
|
-
def self.type(*
|
8
|
-
Type.type *
|
6
|
+
Contract Jaguar::C::Args[Jaguar::C::Or[Integer,String,Symbol,Array,Hash]] => self.class
|
7
|
+
def self.type(*integer_or_string_or_symbol_or_array_or_hashes)
|
8
|
+
Type.type *integer_or_string_or_symbol_or_array_or_hashes
|
9
9
|
self
|
10
10
|
end
|
11
11
|
end
|
@@ -4,9 +4,9 @@ module Jaguar
|
|
4
4
|
module Type
|
5
5
|
include Contracts::Core
|
6
6
|
|
7
|
-
Contract Jaguar::C::Args[Jaguar::C::Or[String,Array,
|
8
|
-
def self.type(*
|
9
|
-
opts, type_sequence = parse_type_args_to_opts_and_type_sequence
|
7
|
+
Contract Jaguar::C::Args[Jaguar::C::Or[Integer,String,Symbol,Array,Hash]] => self.class
|
8
|
+
def self.type(*integer_or_string_or_symbol_or_arrays_or_hashes)
|
9
|
+
opts, type_sequence = parse_type_args_to_opts_and_type_sequence integer_or_string_or_symbol_or_arrays_or_hashes
|
10
10
|
|
11
11
|
sequence = unpack_type_sequence type_sequence
|
12
12
|
delay = opts[:delay]
|
@@ -17,7 +17,7 @@ module Jaguar
|
|
17
17
|
already_delayed = false
|
18
18
|
|
19
19
|
case s
|
20
|
-
when String
|
20
|
+
when String,Integer
|
21
21
|
Jaguar.debug "direct_write_instead_of_key_presses?(delay)", direct_write_instead_of_key_presses?(delay)
|
22
22
|
|
23
23
|
if direct_write_instead_of_key_presses?(delay)
|
@@ -67,16 +67,16 @@ module Jaguar
|
|
67
67
|
|
68
68
|
private
|
69
69
|
|
70
|
-
Contract Jaguar::C::Args[Jaguar::C::Or[String,Array,
|
70
|
+
Contract Jaguar::C::Args[Jaguar::C::Or[Integer,String,Symbol,Array,Hash]] => Array[Hash,Array]
|
71
71
|
def self.parse_type_args_to_opts_and_type_sequence(args)
|
72
72
|
opts = {}
|
73
73
|
type_sequence = []
|
74
|
-
args.each do |
|
75
|
-
case
|
76
|
-
when "String", "Array", "Symbol"
|
77
|
-
type_sequence <<
|
74
|
+
args.each do |integer_or_string_or_symbol_or_array_or_hash|
|
75
|
+
case integer_or_string_or_symbol_or_array_or_hash.class.name
|
76
|
+
when "Integer","String", "Array", "Symbol"
|
77
|
+
type_sequence << integer_or_string_or_symbol_or_array_or_hash
|
78
78
|
when "Hash"
|
79
|
-
opts.merge!(
|
79
|
+
opts.merge!(integer_or_string_or_symbol_or_array_or_hash)
|
80
80
|
end
|
81
81
|
end
|
82
82
|
[opts, type_sequence]
|
data/lib/jaguar/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jaguar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Superbot HQ
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|