milkode 1.8.2 → 1.8.3

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: 456e2e0fa0db21bedaaa72af1cf820dd3de2899f
4
- data.tar.gz: 248e2f1ebf508ebc6ab2ae595418f85fc88d9fa9
3
+ metadata.gz: a432906d7cb9dedf6688b795be9573b66e379c8b
4
+ data.tar.gz: 3d5100c8567be3bb2cc6fa1c3a673c8517ef15a0
5
5
  SHA512:
6
- metadata.gz: 272e9b638e6aab4f208e0c2a7efca9bb90f0195f54523acb4da1c23c03a22e3f09d0c3a93cdc43301c23f288d6ec1aa75b6f8b117e2ed6c514d31637e211d0f1
7
- data.tar.gz: 2b979b9d32ead5d8d9ed26a414e6c741d733c845c4a0f51f003ae86eade414af8295db843636403053f9c17473846ab79c34c782ed2c12d48227f2b88baec0c2
6
+ metadata.gz: 41970fcfa6ba574092643ae8a68a4d0660383a9e626008a4f00273becd3fff7c5b556f15a6533e84b8e196054374ccac6d74b44d07bbc36527ef49bc2b156af8
7
+ data.tar.gz: fe3cb53ed37fd66c2e62bfae30cde65ee220c1116295b2285c6b4772d052091dbfa64df3e7ebd0c027b2c96b7c979b55064e068aa39e715de582069f3d6952a7
@@ -5,11 +5,21 @@ module GrenFileTest
5
5
  IGNORE_DIR = /(\A\.svn\Z)|(\A\.git\Z)|(\ACVS\Z)/
6
6
 
7
7
  def self.ignoreDir?(fpath)
8
- IGNORE_DIR.match(File.basename(fpath))
8
+ begin
9
+ IGNORE_DIR.match(File.basename(fpath))
10
+ rescue ArgumentError => e
11
+ puts "[skip dir] #{fpath}: #{e.to_s}"
12
+ true
13
+ end
9
14
  end
10
15
 
11
16
  def self.ignoreFile?(fpath)
12
- IGNORE_FILE.match(File.basename(fpath))
17
+ begin
18
+ IGNORE_FILE.match(File.basename(fpath))
19
+ rescue ArgumentError => e
20
+ puts "[skip] #{fpath}: #{e.to_s}"
21
+ true
22
+ end
13
23
  end
14
24
 
15
25
  def self.binary?(fpath)
@@ -1,3 +1,3 @@
1
1
  module Milkode
2
- VERSION = "1.8.2"
2
+ VERSION = "1.8.3"
3
3
  end
@@ -7,7 +7,6 @@
7
7
 
8
8
  require 'test_helper'
9
9
  require 'milkode/cdstk/milkode_yaml.rb'
10
- require 'milkode/common/util'
11
10
 
12
11
  class TestMilkodeYaml < Test::Unit::TestCase
13
12
  include Milkode
@@ -32,25 +31,9 @@ contents:
32
31
  - directory: /path/to/dir
33
32
  EOF
34
33
 
35
- # YAML#dumpの出力形式が1.8と1.9で変わってしまったので、1.8の時はテストしない
36
-
37
34
  def test_dump
38
35
  obj = MilkodeYaml.new(SRC)
39
- if Milkode::Util.ruby20?
40
- assert_equal SRC, obj.dump
41
- elsif Milkode::Util.ruby19?
42
- assert_equal <<EOF, obj.dump
43
- ---
44
- version: '0.2'
45
- contents:
46
- - directory: /a/dir1
47
- - directory: /path/to/dir
48
- ignore:
49
- - ! '*.bak'
50
- - /rdoc
51
- - directory: /a/b/c
52
- EOF
53
- end
36
+ assert_equal YAML.load(SRC), YAML.load(obj.dump)
54
37
  end
55
38
 
56
39
  def test_version
@@ -75,7 +58,7 @@ EOF
75
58
 
76
59
  assert_equal 1, obj.contents.size
77
60
 
78
- assert_equal <<EOF, obj.dump if Milkode::Util.ruby19?
61
+ assert_equal YAML.load(<<EOF), YAML.load(obj.dump)
79
62
  ---
80
63
  version: '0.2'
81
64
  contents:
@@ -89,8 +72,7 @@ EOF
89
72
 
90
73
  assert_equal 2, obj.contents.size
91
74
 
92
- if Milkode::Util.ruby20?
93
- assert_equal <<EOF, obj.dump
75
+ assert_equal YAML.load(<<EOF), YAML.load(obj.dump)
94
76
  ---
95
77
  version: '0.2'
96
78
  contents:
@@ -100,19 +82,6 @@ contents:
100
82
  - '*.bak'
101
83
  - /rdoc
102
84
  EOF
103
- elsif Milkode::Util.ruby19?
104
- assert_equal <<EOF, obj.dump
105
- ---
106
- version: '0.2'
107
- contents:
108
- - directory: /a/dir1
109
- - directory: /path/to/dir
110
- ignore:
111
- - ! '*.bak'
112
- - /rdoc
113
- EOF
114
- end
115
-
116
85
  end
117
86
 
118
87
  def test_migrate
@@ -122,14 +91,13 @@ EOF
122
91
  obj = MilkodeYaml.new(V_0_1)
123
92
  assert_equal true, obj.migrate
124
93
 
125
- assert_equal <<EOF, obj.dump if Milkode::Util.ruby19?
94
+ assert_equal YAML.load(<<EOF), YAML.load(obj.dump)
126
95
  ---
127
96
  version: '0.2'
128
97
  contents:
129
98
  - directory: /a/dir1
130
99
  - directory: /path/to/dir
131
100
  EOF
132
-
133
101
  end
134
102
 
135
103
  def test_find_name
@@ -145,8 +113,7 @@ EOF
145
113
  p = Package.create(p.directory, p.ignore + ['*.a'])
146
114
  obj.update(p)
147
115
 
148
- if Milkode::Util.ruby20?
149
- assert_equal <<EOF, obj.dump
116
+ assert_equal YAML.load(<<EOF), YAML.load(obj.dump)
150
117
  ---
151
118
  version: '0.2'
152
119
  contents:
@@ -158,21 +125,6 @@ contents:
158
125
  - '*.a'
159
126
  - directory: /a/b/c
160
127
  EOF
161
- elsif Milkode::Util.ruby19?
162
- assert_equal <<EOF, obj.dump
163
- ---
164
- version: '0.2'
165
- contents:
166
- - directory: /a/dir1
167
- - directory: /path/to/dir
168
- ignore:
169
- - ! '*.bak'
170
- - /rdoc
171
- - ! '*.a'
172
- - directory: /a/b/c
173
- EOF
174
- end
175
-
176
128
 
177
129
  p = Package.create("not_found")
178
130
  assert_raise(RuntimeError) { obj.update(p) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: milkode
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.2
4
+ version: 1.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - ongaeshi