hiki2yard 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Rakefile +4 -0
- data/lib/hiki2yard.rb +10 -4
- data/lib/hiki2yard/new_rakefile +4 -0
- data/lib/hiki2yard/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dea9d3f8d30290d68b415caa381334cda8bbc80
|
4
|
+
data.tar.gz: 1d8329b5fa7a7bc39b5c52181283d23f1c8747f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b10974eb32c5e43b61c6b801762ffee5cb1cb54b071bb5b87d3db06de22fc752c1f5754b81e29b019adbb39ad82d7b7d062eb348257188722ab4977e9dac46c
|
7
|
+
data.tar.gz: 12558bb962caf426b3e6dde17fa1d9dd0a1a0621f3a05f8a8d8e33d6ce5622f3354830be8aba2dd638d539419a95dac9bb073646c810d17633f7080e135672e4
|
data/Rakefile
CHANGED
data/lib/hiki2yard.rb
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
require 'optparse'
|
3
|
+
require 'fileutils'
|
3
4
|
require "hiki2yard/version"
|
4
|
-
|
5
|
+
|
5
6
|
|
6
7
|
module Hiki2yard
|
7
8
|
class Command
|
@@ -13,8 +14,9 @@ module Hiki2yard
|
|
13
14
|
@argv = argv
|
14
15
|
@source_path = File.expand_path('..', __FILE__)
|
15
16
|
@target_path = Dir.pwd
|
16
|
-
|
17
|
-
|
17
|
+
@base_name=File.basename(@target_path)
|
18
|
+
print "source_path= \'#{@source_path}\'\n"
|
19
|
+
print "target_path= \'#{@target_path}\'\n"
|
18
20
|
@opts={}
|
19
21
|
end
|
20
22
|
|
@@ -50,6 +52,7 @@ module Hiki2yard
|
|
50
52
|
def rev_rakefile
|
51
53
|
source=File.join(@source_path,'hiki2yard','new_rakefile')
|
52
54
|
target=File.join(@target_path,'Rakefile')
|
55
|
+
p @opts[:force]
|
53
56
|
if @opts[:force] then
|
54
57
|
copy_file_even_if_exists(source, target)
|
55
58
|
else
|
@@ -68,7 +71,10 @@ module Hiki2yard
|
|
68
71
|
end
|
69
72
|
|
70
73
|
def copy_file_if_not_exists(source, target)
|
71
|
-
|
74
|
+
if File::exists?(target)
|
75
|
+
print "File #{target} exists, not copy.\n"
|
76
|
+
return
|
77
|
+
end
|
72
78
|
FileUtils.cp(source,target,:verbose=>true) # :noop=>true)
|
73
79
|
end
|
74
80
|
|
data/lib/hiki2yard/new_rakefile
CHANGED
data/lib/hiki2yard/version.rb
CHANGED