yap-shell 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0dd93a58914bed99609652e05c82c3f90fb11af3
4
- data.tar.gz: 685276b3f2f829e8252c82490c30cb443bde61b9
3
+ metadata.gz: 87a1ed22865947c8ef75b2a16007dc72270dab7a
4
+ data.tar.gz: 38e78b4b608f6ec74c922472d6e965ef0fcccd1e
5
5
  SHA512:
6
- metadata.gz: 580220fe950fbc8cb393f1b783315a2af677177907951851b0d9c44ef7d9e7dd05f6dc0fea2aec3b436e2f187d0e27ca96a3b28449781c99a92689d405b90108
7
- data.tar.gz: d037e820050e596a596891133b1bf18736ea9953850978d736505f6f32eee67e1b6e017d529a2dd9860ca69373b7b4006faa09aa953c18fd72816a4d80b4265e
6
+ metadata.gz: 66989ed7684b9327859f04c655991b49bbeefeb83706bb14889395e32b75d08ad81a6858d780ac78ad75bb0fc1a35b3b99b8467eac1275d35a51bdca114a65a8
7
+ data.tar.gz: ed9d4d26e65195606b817ac1f6c46d7ac490cf147cb6e74471e7ce192f41c7e5082ffba2e58e931b61fa83013dfc5f1bcc14b46c39389d24ef4d93159a2cd645
data/Gemfile CHANGED
@@ -1,9 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- # Specify your gem's dependencies in yap.gemspec
4
3
  gemspec
5
- # gem 'terminal-layout', path: "../terminal-layout"
6
- # gem 'yap-shell-parser', path: "../yap-shell-parser"
7
- # gem 'yap-shell-parser', git: 'git@github.com:zdennis/yap-shell-parser.git'
8
- # gem "yap-rawline", path: '/Users/zdennis/source/opensource_projects/rawline'
9
- # gem "terminal-layout", path: '/Users/zdennis/source/playground/terminal-layout'
4
+
5
+ gem 'treefell', path: '../treefell'
6
+ gem 'yap-shell-parser', path: '../yap-shell-parser'
7
+ gem 'terminal-layout', path: '../terminal-layout'
8
+ gem 'yap-rawline', path: '../yap-rawline'
@@ -6,14 +6,12 @@ class RightPrompt < Addon
6
6
  def initialize_world(world)
7
7
  @world = world
8
8
 
9
- @world.subscribe(:refresh_right_prompt) do |event|
10
- @world.right_prompt_text = Time.now.strftime("%H:%M:%S")
11
- end
12
-
13
- @world.events.recur(
14
- name: "refresh_right_prompt",
15
- interval_in_ms: 1_000,
16
- source: self
17
- )
9
+ # @world.subscribe(:refresh_right_prompt) do |event|
10
+ # @world.right_prompt_text = Time.now.strftime("%H:%M:%S")
11
+ # end
12
+ #
13
+ # @world.events.recur(
14
+ # name: "refresh_right_prompt", source: self, interval_in_ms: 1_000
15
+ # )
18
16
  end
19
17
  end
@@ -1,29 +1,28 @@
1
-
2
-
3
- class PromptUpdates < Addon
4
- def initialize_world(world)
5
- @world = world
6
-
7
- current_branch = determine_branch
8
-
9
- @world.events.recur(
10
- name: 'prompt_updates',
11
- source: self,
12
- interval_in_ms: 100
13
- ) do
14
- new_branch = determine_branch
15
- if current_branch != new_branch
16
- current_branch = new_branch
17
- @world.refresh_prompt
18
- end
19
- end
20
-
1
+ class PromptUpdates < Addon
2
+ attr_reader :world
3
+
4
+ def initialize_world(world)
5
+ current_branch = determine_branch
6
+
7
+ @world = world
8
+ @world.events.recur(
9
+ name: 'prompt_updates',
10
+ source: self,
11
+ interval_in_ms: 100
12
+ ) do
13
+ new_branch = determine_branch
14
+ if current_branch != new_branch
15
+ current_branch = new_branch
16
+ @world.refresh_prompt
21
17
  end
18
+ end
22
19
 
23
- private
20
+ end
24
21
 
25
- def determine_branch
26
- `git branch 2>/dev/null`.scan(/\*\s*(.*)$/).flatten.first
27
- end
22
+ private
28
23
 
29
- end
24
+ def determine_branch
25
+ `git branch 2>/dev/null`.scan(/\*\s*(.*)$/).flatten.first
26
+ end
27
+
28
+ end
data/bin/yap-dev CHANGED
@@ -4,5 +4,6 @@ require 'bundler'
4
4
  Bundler.setup
5
5
  require 'pry'
6
6
 
7
+ ENV['YAP_SHELL'] = 'active'
7
8
  $LOAD_PATH.unshift File.dirname(__FILE__) + '/../lib'
8
9
  load File.dirname(__FILE__) + '/yap'
@@ -172,7 +172,6 @@ module Yap::Shell
172
172
  }
173
173
 
174
174
  if node.params.any?
175
- Treefell['shell'].puts "block node params: #{node.params.inspect}"
176
175
  values.each_slice(node.params.length).each do |_slice|
177
176
  with_env do
178
177
  Hash[ node.params.zip(_slice) ].each_pair do |k,v|
@@ -1,5 +1,5 @@
1
1
  module Yap
2
2
  module Shell
3
- VERSION = "0.5.1"
3
+ VERSION = "0.5.2"
4
4
  end
5
5
  end
data/yap-shell.gemspec CHANGED
@@ -69,7 +69,7 @@ Gem::Specification.new do |spec|
69
69
  spec.add_dependency "term-ansicolor", "~> 1.3"
70
70
  spec.add_dependency "ruby-termios", "~> 0.9.6"
71
71
  spec.add_dependency "ruby-terminfo", "~> 0.1.1"
72
- spec.add_dependency "yap-rawline", "~> 0.4.0"
72
+ spec.add_dependency "yap-rawline", "~> 0.4.1"
73
73
  spec.add_dependency "treefell", "~> 0.2.3"
74
74
 
75
75
  spec.add_development_dependency "bundler", "~> 1.6"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yap-shell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Zach Dennis
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: 0.4.0
89
+ version: 0.4.1
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: 0.4.0
96
+ version: 0.4.1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: treefell
99
99
  requirement: !ruby/object:Gem::Requirement