yard_ast_editable 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.3
1
+ 0.1.4
@@ -30,7 +30,7 @@ module YardAstEditable
30
30
  result = block.source
31
31
  case block.type
32
32
  when :do_block then
33
- result.sub!(/\Ado\s*(\|.*?\|)?\n?/, '')
33
+ result.sub!(/\Ado[ \t\f]*(\|.*?\|)?\n?/, '')
34
34
  result.sub!(/end[\s\n]*\Z/, '')
35
35
  when :brace_block then
36
36
  result.sub!(/^\{\s*(\|.*?\|)?\n?/, '')
@@ -147,11 +147,17 @@ describe "YardAst" do
147
147
  describe YardAstEditable::Fcall do
148
148
  before do
149
149
  script = <<-EOS
150
+ # comment1
150
151
  instance("i-12345678") do
152
+ # comment2
151
153
  agent("mm_system_agent") do
154
+ # comment3
152
155
  service("system")
156
+ # comment4
153
157
  end
158
+ # comment5
154
159
  end
160
+ # comment6
155
161
  EOS
156
162
  ast = YARD::Parser::Ruby::RubyParser.new(script, nil).parse.root
157
163
  node = ast.fcall_by_ident(:instance){|fcall|
@@ -173,9 +179,13 @@ EOS
173
179
  @caller.block.nil?.should be_false
174
180
  result = @caller.block_content_source
175
181
  result.should == <<-EXPECT
176
- agent("mm_system_agent") do
182
+ # comment2
183
+ agent("mm_system_agent") do
184
+ # comment3
177
185
  service("system")
186
+ # comment4
178
187
  end
188
+ # comment5
179
189
  EXPECT
180
190
  end
181
191
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{yard_ast_editable}
8
- s.version = "0.1.3"
8
+ s.version = "0.1.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["akimatter"]
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 1
8
- - 3
9
- version: 0.1.3
8
+ - 4
9
+ version: 0.1.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - akimatter
@@ -126,7 +126,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
126
126
  requirements:
127
127
  - - ">="
128
128
  - !ruby/object:Gem::Version
129
- hash: -2766169714054516106
129
+ hash: 3824769518784121840
130
130
  segments:
131
131
  - 0
132
132
  version: "0"