yggdrasil 0.0.8 → 0.0.9

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.
data/bin/ygg CHANGED
File without changes
data/bin/yggdrasil CHANGED
File without changes
data/bin/yggserve CHANGED
File without changes
@@ -14,7 +14,7 @@ class Yggdrasil
14
14
  `rm -rf #@checker_result_dir`
15
15
  Dir.mkdir @checker_result_dir, 0755
16
16
  if File.exist?(@checker_dir)
17
- Find.find(@checker_dir).each do |file|
17
+ Find.find(@checker_dir) do |file|
18
18
  if File.file?(file) && File.executable?(file)
19
19
  if file =~ %r{^#@checker_dir(.*)$}
20
20
  file_body = $1
@@ -91,7 +91,7 @@ class Yggdrasil
91
91
  input_user_pass
92
92
  `rm -rf #@mirror_dir`
93
93
  system3 "#{svn} checkout --no-auth-cache --non-interactive" +
94
- " --username '#{@options[:username]}' --password '#{@options[:password]}'" +
94
+ " --username '#{@options[:ro_username]}' --password '#{@options[:ro_password]}'" +
95
95
  " #{url_parts[0...url_parts_num].join('/')} #@mirror_dir"
96
96
  add_paths = Array.new
97
97
  path = @mirror_dir
@@ -121,7 +121,7 @@ class Yggdrasil
121
121
  # make mirror dir
122
122
  `rm -rf #@mirror_dir`
123
123
  cmd = "#{svn} checkout --no-auth-cache --non-interactive #{@options[:repo]} #@mirror_dir"
124
- cmd += " --username '#{@options[:username]}' --password '#{@options[:password]}'" unless anon_access
124
+ cmd += " --username '#{@options[:ro_username]}' --password '#{@options[:ro_password]}'" unless anon_access
125
125
  system3 cmd
126
126
 
127
127
  # make checker dir and checker example
data/lib/yggdrasil/log.rb CHANGED
@@ -21,7 +21,7 @@ class Yggdrasil
21
21
  end
22
22
  end
23
23
 
24
- cmd_arg = "#@svn log --verbose --no-auth-cache --non-interactive"
24
+ cmd_arg = "#@svn log --no-auth-cache --non-interactive"
25
25
  cmd_arg += username_password_options_to_read_repo
26
26
  if @options.has_key?(:revision)
27
27
  cmd_arg += " -r #{@options[:revision]}"
@@ -1,5 +1,5 @@
1
1
  class Yggdrasil
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
 
4
4
  def version
5
5
  puts <<"EOS"
data/spec/init_spec.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require File.dirname(__FILE__) + '/spec_helper'
2
+ require 'yggdrasil_server'
2
3
 
3
4
  describe Yggdrasil, 'init' do
4
5
  it '-------- init' do
@@ -136,7 +137,7 @@ EOS
136
137
 
137
138
  YggdrasilServer.command %w{init} +
138
139
  %w{--port 4000} +
139
- %w{--repo svn://localhost/tmp/yggdrasil-test/svn-repo/servers/{HOST}/} +
140
+ %w{--repo svn://localhost/tmp/yggdrasil-test/svn-repo/servers/{host}/} +
140
141
  %w{--ro-username hoge} +
141
142
  %w{--ro-password foo}
142
143
  fork do
@@ -148,7 +149,19 @@ EOS
148
149
  "Y\nhoge\nfoo\n"
149
150
 
150
151
  File.exist?('/tmp/yggdrasil-test/.yggdrasil/config').should be_true
152
+ end
153
+
154
+ it 'should success init subcommand with server option AGAIN' do
155
+ puts '---- should success init subcommand with server option AGAIN'
156
+ `rm -rf /tmp/yggdrasil-test/.yggdrasil/config`
157
+
158
+ sleep 1
159
+ Yggdrasil.command %w{init --debug --server localhost:4000}
160
+
161
+ File.exist?('/tmp/yggdrasil-test/.yggdrasil/config').should be_true
162
+ end
151
163
 
164
+ after(:all) do
152
165
  sock = TCPSocket.open('localhost', 4000)
153
166
  sock.puts('quit')
154
167
  sock.close
data/spec/log_spec.rb CHANGED
@@ -15,18 +15,10 @@ describe Yggdrasil, 'log' do
15
15
  out.should == <<"EOS"
16
16
  ------------------------------------------------------------------------
17
17
  r3 | hoge | | 1 line
18
- Changed paths:
19
- M /mng-repo/host-name/tmp/yggdrasil-test/A
20
- M /mng-repo/host-name/tmp/yggdrasil-test/B
21
18
 
22
19
  modify
23
20
  ------------------------------------------------------------------------
24
21
  r2 | hoge | | 1 line
25
- Changed paths:
26
- A /mng-repo/host-name/tmp
27
- A /mng-repo/host-name/tmp/yggdrasil-test
28
- A /mng-repo/host-name/tmp/yggdrasil-test/A
29
- A /mng-repo/host-name/tmp/yggdrasil-test/B
30
22
 
31
23
  add files
32
24
  ------------------------------------------------------------------------
@@ -45,18 +37,10 @@ EOS
45
37
  out.should == <<"EOS"
46
38
  ------------------------------------------------------------------------
47
39
  r3 | hoge | | 1 line
48
- Changed paths:
49
- M /mng-repo/host-name/tmp/yggdrasil-test/A
50
- M /mng-repo/host-name/tmp/yggdrasil-test/B
51
40
 
52
41
  modify
53
42
  ------------------------------------------------------------------------
54
43
  r2 | hoge | | 1 line
55
- Changed paths:
56
- A /mng-repo/host-name/tmp
57
- A /mng-repo/host-name/tmp/yggdrasil-test
58
- A /mng-repo/host-name/tmp/yggdrasil-test/A
59
- A /mng-repo/host-name/tmp/yggdrasil-test/B
60
44
 
61
45
  add files
62
46
  ------------------------------------------------------------------------
@@ -75,18 +59,10 @@ EOS
75
59
  out.should == <<"EOS"
76
60
  ------------------------------------------------------------------------
77
61
  r3 | hoge | | 1 line
78
- Changed paths:
79
- M /mng-repo/host-name/tmp/yggdrasil-test/A
80
- M /mng-repo/host-name/tmp/yggdrasil-test/B
81
62
 
82
63
  modify
83
64
  ------------------------------------------------------------------------
84
65
  r2 | hoge | | 1 line
85
- Changed paths:
86
- A /mng-repo/host-name/tmp
87
- A /mng-repo/host-name/tmp/yggdrasil-test
88
- A /mng-repo/host-name/tmp/yggdrasil-test/A
89
- A /mng-repo/host-name/tmp/yggdrasil-test/B
90
66
 
91
67
  add files
92
68
  ------------------------------------------------------------------------
@@ -101,11 +77,6 @@ EOS
101
77
  out.should == <<"EOS"
102
78
  ------------------------------------------------------------------------
103
79
  r2 | hoge | | 1 line
104
- Changed paths:
105
- A /mng-repo/host-name/tmp
106
- A /mng-repo/host-name/tmp/yggdrasil-test
107
- A /mng-repo/host-name/tmp/yggdrasil-test/A
108
- A /mng-repo/host-name/tmp/yggdrasil-test/B
109
80
 
110
81
  add files
111
82
  ------------------------------------------------------------------------
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yggdrasil
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -118,7 +118,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
118
118
  version: '0'
119
119
  segments:
120
120
  - 0
121
- hash: 2090364759273655235
121
+ hash: -670785694215858000
122
122
  required_rubygems_version: !ruby/object:Gem::Requirement
123
123
  none: false
124
124
  requirements:
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  version: '0'
128
128
  segments:
129
129
  - 0
130
- hash: 2090364759273655235
130
+ hash: -670785694215858000
131
131
  requirements: []
132
132
  rubyforge_project:
133
133
  rubygems_version: 1.8.25