ariva 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ariva.rb +6 -1
  3. data/lib/run.rb +22 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a94216aca9762a6eb46bd19e2362c7fd35a237a3b44d099d875978082eb51727
4
- data.tar.gz: bf179aa5a18cd25694b1c119623ae66f210c00d546727353154f472f33b83edc
3
+ metadata.gz: f640f10c238e1ea46a36e223456c04dd7281cbe13c538aa9a6dad4dfe2db014d
4
+ data.tar.gz: 7a6db58f1ef38e4c09a2741e9dd70d560b0e183815feb5dc38ad1dee81ab2f73
5
5
  SHA512:
6
- metadata.gz: 6bb5d76fc0b33d635621f8f2364b9723ab5f85290481c868d29112891fd2669dbaf66990cb8991b11e0ec9af6040f0b1ba6d1155bc69eacf38194db39a306f4a
7
- data.tar.gz: ad0a10226588bb00b5f658a76b0142313dbada4a129c796bd3da08c040f822c0aa48d2cade34836dc4c226c643390a47206ee2f5a20999b2b49f36122996a945
6
+ metadata.gz: 3be0bc30f141a40050c7b86455ac724cccd21eefe9dbeffae9f931a265450ad9e0ab1f4af389b6cae5beac6d8261268dc67046cea8cb7b0bf0d6903a5ef0263a
7
+ data.tar.gz: c3ff61e18d8f1fa81877cae0a88c9f3a978198ad8ed0cd3ba6176d2110fbef3e97c57dee6a1df7d56e112f2bc472d5b379e9d34023261e9d3875dea82259ffb4
@@ -24,6 +24,11 @@ class Ariv
24
24
  end
25
25
 
26
26
  def self.run(name)
27
- require_relative 'run'
27
+ if $arivs.include? name
28
+ ENV['ar'] = $arivs[name]
29
+ require_relative 'run'
30
+ else
31
+ return false
32
+ end
28
33
  end
29
34
  end
data/lib/run.rb CHANGED
@@ -1 +1,22 @@
1
- #Here will be Ariv run script...
1
+ ar = ENV.fetch('ar').split()
2
+ vars = {'~v' => '0.0.4'}
3
+ i = 0
4
+
5
+ while i < ar.length do
6
+ case ar[i]
7
+ when 'show'
8
+ if vars.include? ar[i + 1]
9
+ puts vars[ar[i + 1]]
10
+ i += 2
11
+ else
12
+ puts 'ERROR at word : ' + i.to_s
13
+ break
14
+ end
15
+ when 'set'
16
+ vars[ar[i + 1]] = ar[i + 2]
17
+ i += 3
18
+ else
19
+ puts 'ERROR at word : ' + i.to_s
20
+ break
21
+ end
22
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ariva
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gusarich