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.
|
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
|
data/lib/ritsu/template.rb
CHANGED
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:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 1
|
10
|
+
version: 0.3.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- dragonmeteor
|