tyrantmanager 1.7.5 → 1.7.6

Sign up to get free protection for your applications and to get access to all the features.
data/HISTORY.rdoc CHANGED
@@ -1,4 +1,9 @@
1
1
  = Changelog
2
+ == Version 1.7.6 2012-02-17
3
+
4
+ * Update to newer versions of all dependencies
5
+ * Cleanup ruby -w output
6
+
2
7
  == Version 1.7.5 2011-09-06
3
8
 
4
9
  * Update to newer versions of all dependencies
data/Rakefile CHANGED
@@ -19,10 +19,10 @@ Bones {
19
19
  name "tyrantmanager"
20
20
  authors "Jeremy Hinegardner"
21
21
  email "jeremy@copiousfreetime.org"
22
- url "http://www.copiousfreetime.org/projects/tyrant_manager"
22
+ url "https://github.com/copiousfreetime/tyrantmanager"
23
23
  version TyrantManager::VERSION
24
24
 
25
- ruby_opts %w[ -W0 -rubygems ]
25
+ ruby_opts %w[ -w -rubygems ]
26
26
  readme_file "README.rdoc"
27
27
  ignore_file ".gitignore"
28
28
  history_file "HISTORY.rdoc"
@@ -37,17 +37,17 @@ all on the same machine. The commands can be applied to a single or multiple
37
37
  instances.
38
38
  _
39
39
 
40
- depend_on "loquacious" ,"~> 1.8.1"
40
+ depend_on "loquacious" ,"~> 1.9.1"
41
41
  depend_on "rufus-tokyo" ,"~> 1.0.7"
42
42
  depend_on "logging" ,"~> 1.6.1"
43
43
  depend_on "main" ,"~> 4.6.0"
44
44
  depend_on "ffi" ,"~> 1.0.9" #unsure why this doesn't get resolved with rufus-tokyo
45
45
 
46
46
 
47
- depend_on "bones" , "~> 3.7.1", :development
47
+ depend_on "bones" , "~> 3.7.3", :development
48
48
  depend_on "bones-rspec" , "~> 2.0.1", :development
49
- depend_on "rspec" , "~> 2.6.0", :development
50
- depend_on "rake" , "~> 0.9.2", :development
49
+ depend_on "rspec" , "~> 2.8.0", :development
50
+ depend_on "rake" , "~> 0.9.2.2", :development
51
51
 
52
52
  spec.opts << "--colour" << "--format documentation"
53
53
  }
@@ -49,7 +49,7 @@ class TyrantManager
49
49
  attr_reader :home_dir
50
50
 
51
51
  # the name of this instance
52
- attr_reader :name
52
+ attr_reader :name
53
53
 
54
54
  # the manager that is associated with this instance
55
55
  attr_accessor :manager
@@ -82,7 +82,7 @@ class TyrantManager
82
82
  # load the configuration
83
83
  #
84
84
  def configuration
85
- unless @configuration then
85
+ unless defined? @configuration then
86
86
  eval( IO.read( self.config_file ) )
87
87
  @configuration = Loquacious::Configuration.for( name )
88
88
  end
@@ -135,7 +135,7 @@ class TyrantManager
135
135
  # The full path to the database file.
136
136
  #
137
137
  def db_file( type = configuration.type )
138
- unless @db_file then
138
+ unless defined? @db_file then
139
139
  @db_file = case type
140
140
  when "memory-hash" then "*"
141
141
  when "memory-tree" then "+"
@@ -164,20 +164,6 @@ class TyrantManager
164
164
  Dir.glob( "#{ulog_dir}/*.ulog" ).sort
165
165
  end
166
166
 
167
- #
168
- # The lua extension file
169
- #
170
- def lua_extension_file
171
- @lua_extension_file ||= append_to_home_if_not_absolute( configuration.lua_extension_file )
172
- end
173
-
174
- #
175
- # The replication timestamp file
176
- #
177
- def replication_timestamp_file
178
- @replication_timestamp_file ||= append_to_home_if_not_absolute( configuration.replication_timestamp_file )
179
- end
180
-
181
167
  #
182
168
  # Valid index styles as defined by Tokyo Cabinet
183
169
  #
@@ -197,7 +183,7 @@ class TyrantManager
197
183
  # into one big commandline item.
198
184
  #
199
185
  def start_command
200
- unless @start_command then
186
+ unless defined? @start_command then
201
187
  ##-- ttserver executable
202
188
  parts = [ manager.configuration.ttserver ]
203
189
 
@@ -7,7 +7,7 @@ class TyrantManager
7
7
  module Version
8
8
  MAJOR = 1
9
9
  MINOR = 7
10
- BUILD = 5
10
+ BUILD = 6
11
11
 
12
12
  def to_a
13
13
  [MAJOR, MINOR, BUILD]
@@ -160,7 +160,7 @@ class TyrantManager
160
160
  # setting the home directory.
161
161
  #
162
162
  def initialize( directory = TyrantManager.default_directory )
163
- self.home_dir = File.expand_path( directory )
163
+ self.home_dir = File.expand_path( directory )
164
164
  if File.exist?( self.config_file ) then
165
165
  configuration # force a load
166
166
  else
@@ -176,14 +176,14 @@ class TyrantManager
176
176
  # The configuration file for the manager
177
177
  #
178
178
  def config_file
179
- @config_file ||= File.join( home_dir, TyrantManager.config_file_basename )
179
+ @config_file ||= File.join( home_dir, TyrantManager.config_file_basename )
180
180
  end
181
181
 
182
182
  #
183
183
  # load the configuration
184
184
  #
185
185
  def configuration
186
- unless @configuration
186
+ unless defined? @configuration
187
187
  eval( IO.read( self.config_file ) )
188
188
  @configuration = Loquacious::Configuration.for("manager")
189
189
  end
@@ -201,7 +201,7 @@ class TyrantManager
201
201
  # Return the list of instances that the manager knows about
202
202
  #
203
203
  def instances
204
- unless @instances then
204
+ unless defined? @instances then
205
205
  candidates = [ self.instances_path ]
206
206
  if configuration.instances then
207
207
  candidates = configuration.instances
data/spec/command_spec.rb CHANGED
@@ -31,7 +31,7 @@ describe TyrantManager::Command do
31
31
 
32
32
  it "classes cannot be run without implementing 'run'" do
33
33
  j = Junk.new( nil )
34
- j.respond_to?(:run).should == true
34
+ j.respond_to?(:run).should be == true
35
35
  lambda { j.run }.should raise_error( NotImplementedError, /The #run method must be implemented/)
36
36
  end
37
37
  end
@@ -50,12 +50,12 @@ describe TyrantManager::TyrantInstance do
50
50
  end
51
51
 
52
52
  it "#config_file" do
53
- @instances['standalone'].config_file.should == File.join( @tyrant_manager_dir, "instances", "standalone", "config.rb" )
54
- File.exist?( @instances['standalone'].config_file ).should == true
53
+ @instances['standalone'].config_file.should be == File.join( @tyrant_manager_dir, "instances", "standalone", "config.rb" )
54
+ File.exist?( @instances['standalone'].config_file ).should be == true
55
55
  end
56
56
 
57
57
  it "#configuration" do
58
- @instances['standalone'].configuration.nil?.should == false
58
+ @instances['standalone'].configuration.nil?.should be == false
59
59
  end
60
60
 
61
61
  it "#pid_file" do
@@ -118,26 +118,26 @@ describe TyrantManager::TyrantInstance do
118
118
  end
119
119
 
120
120
  it "#is_slave? when it is NOT a slave" do
121
- @instances['standalone'].running?.should == true
122
- @instances['standalone'].is_slave?.should == false
121
+ @instances['standalone'].running?.should be == true
122
+ @instances['standalone'].is_slave?.should be == false
123
123
  end
124
124
 
125
125
  it "#is_slave? when it IS a slave" do
126
- @instances['slave_1'].running?.should == true
127
- @instances['slave_1'].is_slave?.should == true
126
+ @instances['slave_1'].running?.should be == true
127
+ @instances['slave_1'].is_slave?.should be == true
128
128
  end
129
129
 
130
130
  it "#is_master_master? when it is NOT in a master_master relationship" do
131
- @instances['slave_1'].running?.should == true
132
- @instances['slave_1'].is_master_master?.should == false
131
+ @instances['slave_1'].running?.should be == true
132
+ @instances['slave_1'].is_master_master?.should be == false
133
133
  end
134
134
 
135
135
  it "#is_master_master? when it IS in a master_master relationship" do
136
- @instances['master_master_1'].running?.should == true
137
- @instances['master_master_1'].is_master_master?.should == true
136
+ @instances['master_master_1'].running?.should be== true
137
+ @instances['master_master_1'].is_master_master?.should be == true
138
138
 
139
- @instances['master_master_2'].running?.should == true
140
- @instances['master_master_2'].is_master_master?.should == true
139
+ @instances['master_master_2'].running?.should be == true
140
+ @instances['master_master_2'].is_master_master?.should be == true
141
141
  end
142
142
  end
143
143
 
@@ -61,8 +61,8 @@ describe TyrantManager do
61
61
  end
62
62
 
63
63
  it "#config_file" do
64
- @mgr.config_file.should == File.join( @tdir, "config.rb" )
65
- File.exist?( @mgr.config_file ).should == true
64
+ @mgr.config_file.should be == File.join( @tdir, "config.rb" )
65
+ File.exist?( @mgr.config_file ).should be == true
66
66
  end
67
67
 
68
68
  it "#configuration" do
@@ -79,7 +79,7 @@ describe TyrantManager do
79
79
  TyrantManager::TyrantInstance.setup( idir )
80
80
  end
81
81
 
82
- @mgr.instances.size.should == 3
82
+ @mgr.instances.size.should be == 3
83
83
  names = []
84
84
  @mgr.each_instance do |i|
85
85
  i.name.should =~ /test\d/
@@ -95,7 +95,7 @@ describe TyrantManager do
95
95
  TyrantManager::TyrantInstance.setup( idir )
96
96
  end
97
97
 
98
- @mgr.instances.size.should == 3
98
+ @mgr.instances.size.should be == 3
99
99
  names = []
100
100
  @mgr.each_instance( %w[ test0 test2] ) do |i|
101
101
  i.name.should =~ /test\d/
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tyrantmanager
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 7
9
- - 5
10
- version: 1.7.5
9
+ - 6
10
+ version: 1.7.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jeremy Hinegardner
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-10 00:00:00 Z
18
+ date: 2012-02-17 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: loquacious
@@ -25,12 +25,12 @@ dependencies:
25
25
  requirements:
26
26
  - - ~>
27
27
  - !ruby/object:Gem::Version
28
- hash: 53
28
+ hash: 49
29
29
  segments:
30
30
  - 1
31
- - 8
31
+ - 9
32
32
  - 1
33
- version: 1.8.1
33
+ version: 1.9.1
34
34
  type: :runtime
35
35
  version_requirements: *id001
36
36
  - !ruby/object:Gem::Dependency
@@ -105,12 +105,12 @@ dependencies:
105
105
  requirements:
106
106
  - - ~>
107
107
  - !ruby/object:Gem::Version
108
- hash: 25
108
+ hash: 29
109
109
  segments:
110
110
  - 3
111
111
  - 7
112
- - 1
113
- version: 3.7.1
112
+ - 3
113
+ version: 3.7.3
114
114
  type: :runtime
115
115
  version_requirements: *id006
116
116
  - !ruby/object:Gem::Dependency
@@ -137,12 +137,12 @@ dependencies:
137
137
  requirements:
138
138
  - - ~>
139
139
  - !ruby/object:Gem::Version
140
- hash: 23
140
+ hash: 47
141
141
  segments:
142
142
  - 2
143
- - 6
143
+ - 8
144
144
  - 0
145
- version: 2.6.0
145
+ version: 2.8.0
146
146
  type: :runtime
147
147
  version_requirements: *id008
148
148
  - !ruby/object:Gem::Dependency
@@ -153,12 +153,13 @@ dependencies:
153
153
  requirements:
154
154
  - - ~>
155
155
  - !ruby/object:Gem::Version
156
- hash: 63
156
+ hash: 11
157
157
  segments:
158
158
  - 0
159
159
  - 9
160
160
  - 2
161
- version: 0.9.2
161
+ - 2
162
+ version: 0.9.2.2
162
163
  type: :runtime
163
164
  version_requirements: *id009
164
165
  - !ruby/object:Gem::Dependency
@@ -226,7 +227,7 @@ files:
226
227
  - spec/tyrant_instance_spec.rb
227
228
  - spec/tyrant_manager_spec.rb
228
229
  - spec/version_spec.rb
229
- homepage: http://www.copiousfreetime.org/projects/tyrant_manager
230
+ homepage: https://github.com/copiousfreetime/tyrantmanager
230
231
  licenses: []
231
232
 
232
233
  post_install_message:
@@ -256,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
257
  requirements: []
257
258
 
258
259
  rubyforge_project: tyrantmanager
259
- rubygems_version: 1.8.7
260
+ rubygems_version: 1.8.16
260
261
  signing_key:
261
262
  specification_version: 3
262
263
  summary: A command line tool for managing Tokyo Tyrant instances.