yap-shell-parser 0.0.3 → 0.0.4

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: f1721a734dd55506e55a1d3c5c6749a7d4177b0a
4
- data.tar.gz: 2211073698e05b3cd2d8cb994a396d431dba1880
3
+ metadata.gz: e0f5112fefe27736d9fe13a853af8d68fe0ef467
4
+ data.tar.gz: b878cc0fab5a610f2d9c301bc298ce57ef446b29
5
5
  SHA512:
6
- metadata.gz: 5ab7eee677398b1f24a546f1512aad1fd9b0f4e10d6dfffbca5471b8e477d5bbd33372365f51a74652251dfec6707ea526b388715de0ea10a40b171183b73259
7
- data.tar.gz: a5ed3d26e255794023a8265e807360469b75cb245fac33ac953f72babda1681a87756c353849b31b9a2b171b9d68bdc144d6cc887d8cd26c27c15999e019a004
6
+ metadata.gz: 4ece41ddbb734944259ea26c50c8b3aa1d5ccdfa9592dc348c210ad75af0ac9918bbe872a13dbe2f369a3a5fd7a7ac124f189226c3d369b0cd35588804bc46a5
7
+ data.tar.gz: 15e8978edc514cd0d81a1521b5872d6766e59b710057bfd5e42699b151e742c39d9d38500335658dfbfdc676b5fa84c241b4c5f282d7cef4d1572181294e5258
@@ -3,7 +3,7 @@ require 'yap/shell/parser'
3
3
  module Yap
4
4
  module Shell
5
5
  module Parser
6
- VERSION = "0.0.3"
6
+ VERSION = "0.0.4"
7
7
  end
8
8
  end
9
9
  end
@@ -701,6 +701,19 @@ describe Yap::Shell::Parser::Lexer do
701
701
  ]}
702
702
  end
703
703
 
704
+ describe "backticks can be used as part of an argument: git branch `git cbranch`.bak" do
705
+ let(:str){ "git branch `git cbranch`.bak" }
706
+ it { should eq [
707
+ t(:Command, "git", lineno: 0),
708
+ t(:Argument, "branch", lineno: 0),
709
+ t(:BeginSubcommand, '`', lineno: 0),
710
+ t(:Command, 'git', lineno: 0),
711
+ t(:Argument, 'cbranch', lineno: 0),
712
+ t(:EndSubcommand, '`', lineno: 0),
713
+ t(:Argument, '.bak', lineno: 0)
714
+ ]}
715
+ end
716
+
704
717
  describe "backticks can wrap complex statements: `ls -al && foo bar || baz`" do
705
718
  let(:str){ "`ls -al && foo bar || baz`" }
706
719
  it { should eq [
@@ -755,9 +768,9 @@ describe Yap::Shell::Parser::Lexer do
755
768
  end
756
769
 
757
770
  describe "dollar-sign paren can wrap complex statements: $(ls -al && foo bar || baz)" do
758
- let(:str){ "`ls -al && foo bar || baz`" }
771
+ let(:str){ "$(ls -al && foo bar || baz)" }
759
772
  it { should eq [
760
- t(:BeginSubcommand, "`", lineno: 0),
773
+ t(:BeginSubcommand, "$(", lineno: 0),
761
774
  t(:Command,'ls', lineno: 0),
762
775
  t(:Argument, '-al', lineno: 0),
763
776
  t(:Conditional, '&&', lineno: 0),
@@ -765,7 +778,7 @@ describe Yap::Shell::Parser::Lexer do
765
778
  t(:Argument, 'bar', lineno: 0),
766
779
  t(:Conditional, '||', lineno: 0),
767
780
  t(:Command, 'baz', lineno: 0),
768
- t(:EndSubcommand, "`", lineno: 0)
781
+ t(:EndSubcommand, ")", lineno: 0)
769
782
  ]}
770
783
  end
771
784
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yap-shell-parser
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
  - Zach Dennis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-02 00:00:00.000000000 Z
11
+ date: 2015-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler