rubyino 0.1.0 → 0.1.1e

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +21 -0
  3. metadata +9 -9
  4. data/lib/rubyino.rb +0 -49
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7ff9f7fadfe910752ba9ede07c6ea6debb9f9c2b115f37991b8f127bb18e1bf1
4
- data.tar.gz: 305de24afcc888085243233d151af7132f79fc3ca3b7cc59c85bee0b59846100
3
+ metadata.gz: 7fe67b23b72d0f6385ff2633f4f104aae83cc72f66009e1b82ddb00c2610b1dd
4
+ data.tar.gz: 603fc5a526e784a093cf0677a511cc44bf3fe76cdd37111f2f2bdbb6cdf35d9e
5
5
  SHA512:
6
- metadata.gz: 8ce95f949eecdbe0cce4a79f6ef4042c4bc815455e975d32b50cb41686b5e3d25746daa5ef48af82401f05c36046b35a6d164dd5954dbde488e0886281e466e7
7
- data.tar.gz: 4ccbac5d47c2835ccfeaa0d064eb44d42582c51fb3f7d564c1b2b953c3eb341902443b3db9ffa1ac6a175e63ecada39c8aef7c9cc8fbb70a33b43675c99d88d0
6
+ metadata.gz: c4263a48ad92e20cc31d52a01499b7f0c8bcef2c6a709c8ab5a298ee8dd29286433ec7aa090e1fea300caeb5596881537714f7f570c05b617c68c945a9215b80
7
+ data.tar.gz: b71ced33332d67d895522099594941510739fd3f62101f02b42957f4335c80783ef60bc6ae0f29411c6d4d6b79ec58d45843540075b02107c8277bda85f43249
data/README.md ADDED
@@ -0,0 +1,21 @@
1
+ # Rubyino
2
+ Translate ruby to arduino
3
+ ## install with gem
4
+ ``` gem install rubyino ```
5
+
6
+ ### or
7
+
8
+ ```
9
+ git clone https://github.com/nimacpp/Rubyino.git
10
+ cd Rubyino
11
+ bundle install
12
+ ```
13
+ # use Rubyino
14
+ ## start use
15
+ ``` rb = Rubyino.new("namefile") ```
16
+ ## for print
17
+ ``` rb.puts "hello world" #=> Keyboard.print("hello world"); ```
18
+ ## for delay
19
+ ``` rb.delay 500 #=> delay(500); ```
20
+ ## for translate
21
+ ``` rb.ter # for give output ```
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyino
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1e
5
5
  platform: ruby
6
6
  authors:
7
7
  - nima cpp
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-05-20 00:00:00.000000000 Z
11
+ date: 2022-07-06 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: teranslate ruby to arduino
14
14
  email: swithwebb31@email.com
@@ -16,13 +16,13 @@ executables: []
16
16
  extensions: []
17
17
  extra_rdoc_files: []
18
18
  files:
19
- - lib/rubyino.rb
19
+ - README.md
20
20
  homepage: https://rubygems.org/gems/hola
21
21
  licenses:
22
22
  - MIT
23
23
  metadata:
24
24
  source_code_uri: https://github.com/nimacpp/Rubyino
25
- post_install_message:
25
+ post_install_message:
26
26
  rdoc_options: []
27
27
  require_paths:
28
28
  - lib
@@ -33,12 +33,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
33
33
  version: '0'
34
34
  required_rubygems_version: !ruby/object:Gem::Requirement
35
35
  requirements:
36
- - - ">="
36
+ - - ">"
37
37
  - !ruby/object:Gem::Version
38
- version: '0'
38
+ version: 1.3.1
39
39
  requirements: []
40
- rubygems_version: 3.3.5
41
- signing_key:
40
+ rubygems_version: 3.2.22
41
+ signing_key:
42
42
  specification_version: 4
43
43
  summary: teranslate ruby to arduino
44
44
  test_files: []
data/lib/rubyino.rb DELETED
@@ -1,49 +0,0 @@
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 puts(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 select(array)
28
- for i in array
29
- @@lines.push "Keyboard.press('#{i}');"
30
- end
31
- @@lines.push "Keyboard.releaseAll();"
32
- end
33
- def show
34
- return " #{@@path}||#{@@lines}"
35
- end
36
- def delay(num)
37
- @@lines.push "delay(#{num});"
38
- end
39
- def ter
40
- @@lines.push " // Ending stream \nKeyboard.end();\n}\n/* Unused endless loop */\nvoid loop() {}"
41
- file = File.open(@@path, "w")
42
- for i in @@lines
43
- file.puts "#{i}\n"
44
- end
45
- end
46
- def arduino(text)
47
- @@lines.push text
48
- end
49
- end