rubyino 0.1.1e → 0.1.1

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
  SHA256:
3
- metadata.gz: 7fe67b23b72d0f6385ff2633f4f104aae83cc72f66009e1b82ddb00c2610b1dd
4
- data.tar.gz: 603fc5a526e784a093cf0677a511cc44bf3fe76cdd37111f2f2bdbb6cdf35d9e
3
+ metadata.gz: '05815328e1d01ca3c5678dad0d82d37783638b5f5167d29a348bbd8a9296110c'
4
+ data.tar.gz: 108b1df8cf5291fefd4d7db9e0d09e7e33989fa95e2af3e5cbde180ef4c69409
5
5
  SHA512:
6
- metadata.gz: c4263a48ad92e20cc31d52a01499b7f0c8bcef2c6a709c8ab5a298ee8dd29286433ec7aa090e1fea300caeb5596881537714f7f570c05b617c68c945a9215b80
7
- data.tar.gz: b71ced33332d67d895522099594941510739fd3f62101f02b42957f4335c80783ef60bc6ae0f29411c6d4d6b79ec58d45843540075b02107c8277bda85f43249
6
+ metadata.gz: 30d33d58530cd190e6cfe19e4a71f4a08110dd7048815fd7af57bbe9a4ccf06e26381ad1b7902b3cf214fe5113bb613bdd16132ccfdcc8689e5d08b2bbcaf2ff
7
+ data.tar.gz: 0e3ab7f63e8df4659ae04abee3b9d452fed848803cc962d943e62d567775c488394f65e25d17befb9b307160a68ec4b6e24a21372928ca3a483bd8057e49bd29
File without changes
data/lib/rubyino.rb ADDED
@@ -0,0 +1,56 @@
1
+ class Rubyino
2
+ @@lines = [
3
+ "#include \"Keyboard.h\"\n",
4
+ "void typeKey(uint8_t key)
5
+ {
6
+ Keyboard.press(key);
7
+ delay(50);
8
+ Keyboard.release(key);
9
+ }",
10
+ "/* Init function */
11
+ void setup()
12
+ {
13
+ // Begining the Keyboard stream
14
+ Keyboard.begin();"];
15
+ def initialize(path)
16
+ @@path = path+".ino"
17
+ end
18
+ def print(text)
19
+ @@lines.push "Keyboard.print(\"#{text}\");"
20
+ end
21
+ def enter
22
+ @@line.push "typeKey(KEY_RETURN);"
23
+ end
24
+ def win_pls(key)
25
+ @@lines.push "Keyboard.press(KEY_LEFT_GUI);\nKeyboard.press('#{key[0]}');\nKeyboard.releaseAll();"
26
+ end
27
+ def use(lib)
28
+ @@lines.insert(0, "include <#{lib}>")
29
+ end
30
+ def select(array)
31
+ for i in array
32
+ @@lines.push "Keyboard.press('#{i}');"
33
+ end
34
+ @@lines.push "Keyboard.releaseAll();"
35
+ end
36
+ def show
37
+ puts "Rubyino info"
38
+ puts "--------------------------"
39
+ puts " file name : #{@@path}"
40
+ puts "=========================="
41
+ puts @@lines
42
+ end
43
+ def delay(num)
44
+ @@lines.push "delay(#{num});"
45
+ end
46
+ def ter
47
+ @@lines.push " // Ending stream \nKeyboard.end();\n}\n/* Unused endless loop */\nvoid loop() {}"
48
+ file = File.open(@@path, "w")
49
+ for i in @@lines
50
+ file.puts "#{i}\n"
51
+ end
52
+ end
53
+ def arduino(text)
54
+ @@lines.push text
55
+ end
56
+ end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyino
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1e
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - nima cpp
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2022-07-06 00:00:00.000000000 Z
@@ -14,15 +14,17 @@ description: teranslate ruby to arduino
14
14
  email: swithwebb31@email.com
15
15
  executables: []
16
16
  extensions: []
17
- extra_rdoc_files: []
17
+ extra_rdoc_files:
18
+ - README.org
18
19
  files:
19
- - README.md
20
+ - README.org
21
+ - lib/rubyino.rb
20
22
  homepage: https://rubygems.org/gems/hola
21
23
  licenses:
22
24
  - MIT
23
25
  metadata:
24
26
  source_code_uri: https://github.com/nimacpp/Rubyino
25
- post_install_message:
27
+ post_install_message:
26
28
  rdoc_options: []
27
29
  require_paths:
28
30
  - lib
@@ -33,12 +35,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
33
35
  version: '0'
34
36
  required_rubygems_version: !ruby/object:Gem::Requirement
35
37
  requirements:
36
- - - ">"
38
+ - - ">="
37
39
  - !ruby/object:Gem::Version
38
- version: 1.3.1
40
+ version: '0'
39
41
  requirements: []
40
- rubygems_version: 3.2.22
41
- signing_key:
42
+ rubygems_version: 3.3.5
43
+ signing_key:
42
44
  specification_version: 4
43
45
  summary: teranslate ruby to arduino
44
46
  test_files: []