scene_player 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/main.rb +6 -0
  3. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 487aff1a763013e27b35270376797438d8a7cefb54a9ea07b87603c452cc3c5a
4
- data.tar.gz: 40990b60a3818a478568bd3c31615d4e7efecbb914b950d7bef55cecf4b82b8c
3
+ metadata.gz: ff6bfe31cb193894ff18abd2c0f748ab6e02de3791cf8c640c88639da9a7507e
4
+ data.tar.gz: 208c2f60862b126bf9779865660afec45b5a1e1941feb0dfcd7f8259667a3e08
5
5
  SHA512:
6
- metadata.gz: 370a5271c984eed8a8539749a00de2e9d0d1599f9b2c56f6be219a89ace4c586096720de5ff2b394bc12a32ac65e9e34b4360eea40625fd36feda96eee2b2152
7
- data.tar.gz: d1196cc080ba82bbcecc30c723d6bdca1521309ebd5d4750dd9f90070b5571e9067cefe38c91a27e1426713c9bbc2c04db4e1257fba13a2b118fd853ca58c8c1
6
+ metadata.gz: a590858aeed2b328d75a60b9b426761c5b402067e3636280613d91571f0c13d6eaf7278f532cd6c7d7ee74cc531108009e626d2c99d2a8b7bb826c0982a00f63
7
+ data.tar.gz: 33f09e3e7d23402225ef5daddb865ab3b2a7f33350733d324ee779f7f60c8c0eee494b95267110acf8e07309e012910b5ed81bad050013849123adf7c5635f5d
data/lib/main.rb CHANGED
@@ -3,6 +3,11 @@ require_relative "domain/scene.rb"
3
3
  require "pp"
4
4
 
5
5
  def run(scene_name)
6
+ if scene_name == "-v"
7
+ puts "0.0.3"
8
+ return
9
+ end
10
+
6
11
  dir_pwd = Dir.pwd
7
12
  filepath = File.join(dir_pwd, 'playbook.toml')
8
13
  playbook = TOML.load_file(filepath)
@@ -14,6 +19,7 @@ def run(scene_name)
14
19
  else
15
20
  place = scene.place
16
21
  goToPlace = "cd #{place}"
22
+ goToPlace = (place.start_with? "~") ? "cd #{dir_pwd + place[1..-1]}" : "cd #{place}"
17
23
  actions = scene.actions
18
24
  commands = Array.new
19
25
  props = scene.props
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scene_player
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shi Yanxun
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-29 00:00:00.000000000 Z
11
+ date: 2019-03-21 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A simple hello world gem
14
14
  email: jy01095902@126.com
@@ -41,7 +41,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
41
41
  version: '0'
42
42
  requirements: []
43
43
  rubyforge_project:
44
- rubygems_version: 2.7.3
44
+ rubygems_version: 2.7.6
45
45
  signing_key:
46
46
  specification_version: 4
47
47
  summary: Scene Player!