ritsu 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.0
1
+ 0.3.1
@@ -170,8 +170,12 @@ module Ritsu
170
170
  @install_template = InstallTemplate.new(@target)
171
171
  contents << @install_template
172
172
  end
173
+
174
+ def position_to_insert(block, new_block)
175
+ block.contents.length
176
+ end
173
177
  end
174
-
178
+
175
179
  def initialize(target)
176
180
  super("#{target.name}/CMakeLists.txt", target,
177
181
  :block_start_prefix=>'##<<',
@@ -24,7 +24,9 @@ module Ritsu::SrcFiles
24
24
  block = template.create_block(
25
25
  :block_start_prefix => block_start_prefix,
26
26
  :block_end_prefix => block_end_prefix)
27
- template.update_block(block)
27
+ template.update_block(block,
28
+ :block_start_prefix => block_start_prefix,
29
+ :block_end_prefix => block_end_prefix)
28
30
  Ritsu::Utility::FileRobot.create_file(abs_path, block.to_s(:no_delimiter=>true) + "\n")
29
31
  end
30
32
 
@@ -33,7 +35,9 @@ module Ritsu::SrcFiles
33
35
  block = Ritsu::Block.parse(file_content,
34
36
  :block_start_prefix => block_start_prefix,
35
37
  :block_end_prefix => block_end_prefix)
36
- template.update_block(block)
38
+ template.update_block(block,
39
+ :block_start_prefix => block_start_prefix,
40
+ :block_end_prefix => block_end_prefix)
37
41
 
38
42
  new_content = block.to_s(:no_delimiter=>true) + "\n"
39
43
  if new_content != file_content
@@ -51,7 +51,7 @@ module Ritsu
51
51
  end
52
52
 
53
53
  def update_block(block, options={})
54
- raise NotImplmentedError.new
54
+ raise NotImplementedError.new
55
55
  end
56
56
 
57
57
  def add_template(template)
@@ -127,7 +127,7 @@ module Ritsu::TemplatePolicies
127
127
  # @return (Integer) the position in block.contents to
128
128
  # insert the given new block
129
129
  def position_to_insert(block, new_block)
130
- raise NotImplmentedError
130
+ raise NotImplementedError
131
131
  end
132
132
  end
133
133
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ritsu
3
3
  version: !ruby/object:Gem::Version
4
- hash: 19
4
+ hash: 17
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 0
10
- version: 0.3.0
9
+ - 1
10
+ version: 0.3.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - dragonmeteor