lockfile 2.0.1 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/README +1 -1
  2. data/lib/lockfile.rb +1 -5
  3. data/lockfile.gemspec +3 -5
  4. data/rakefile +39 -25
  5. metadata +9 -8
  6. checksums.yaml +0 -15
data/README CHANGED
@@ -5,7 +5,7 @@ URLS
5
5
 
6
6
  SYNOPSIS
7
7
 
8
- lib/lockfile.rb : a ruby library for creating perfect and NFS safe lockfiles
8
+ lib/lockfile.rb : a ruby library for creating NFS safe lockfiles
9
9
 
10
10
  bin/rlock : ruby command line tool which uses this library to create lockfiles
11
11
  and to run arbitrary commands while holding them.
@@ -6,14 +6,10 @@ unless(defined?($__lockfile__) or defined?(Lockfile))
6
6
 
7
7
  class Lockfile
8
8
 
9
- VERSION = '2.0.1'
9
+ VERSION = '2.1.0'
10
10
  def Lockfile.version() Lockfile::VERSION end
11
11
  def version() Lockfile::VERSION end
12
12
 
13
- def Lockfile.description
14
- 'a ruby library for creating perfect and NFS safe lockfiles'
15
- end
16
-
17
13
  class LockError < StandardError; end
18
14
  class StolenLockError < LockError; end
19
15
  class StackingLockError < LockError; end
@@ -3,11 +3,10 @@
3
3
 
4
4
  Gem::Specification::new do |spec|
5
5
  spec.name = "lockfile"
6
- spec.version = "2.0.1"
6
+ spec.version = "2.1.0"
7
7
  spec.platform = Gem::Platform::RUBY
8
8
  spec.summary = "lockfile"
9
- spec.description = "a ruby library for creating perfect and NFS safe lockfiles"
10
- spec.license = "same as ruby's"
9
+ spec.description = "description: lockfile kicks the ass"
11
10
 
12
11
  spec.files =
13
12
  ["README",
@@ -34,8 +33,7 @@ Gem::Specification::new do |spec|
34
33
 
35
34
  spec.test_files = nil
36
35
 
37
- ### spec.add_dependency 'lib', '>= version'
38
- #### spec.add_dependency 'map'
36
+
39
37
 
40
38
  spec.extensions.push(*[])
41
39
 
data/rakefile CHANGED
@@ -3,9 +3,6 @@ This.author = "Ara T. Howard"
3
3
  This.email = "ara.t.howard@gmail.com"
4
4
  This.homepage = "https://github.com/ahoward/#{ This.lib }"
5
5
 
6
- task :license do
7
- open('LICENSE', 'w'){|fd| fd.puts "same as ruby's"}
8
- end
9
6
 
10
7
  task :default do
11
8
  puts((Rake::Task.tasks.map{|task| task.name.gsub(/::/,':')} - ['default']).sort)
@@ -32,7 +29,7 @@ def run_tests!(which = nil)
32
29
 
33
30
  test_rbs.each_with_index do |test_rb, index|
34
31
  testno = index + 1
35
- command = "#{ This.ruby } -w -I ./lib -I ./test/lib #{ test_rb }"
32
+ command = "#{ This.ruby } -I ./lib -I ./test/lib #{ test_rb }"
36
33
 
37
34
  puts
38
35
  say(div, :color => :cyan, :bold => true)
@@ -63,7 +60,7 @@ end
63
60
  task :gemspec do
64
61
  ignore_extensions = ['git', 'svn', 'tmp', /sw./, 'bak', 'gem']
65
62
  ignore_directories = ['pkg']
66
- ignore_files = ['test/log']
63
+ ignore_files = ['test/log', 'a.rb'] + Dir['db/*'] + %w'db'
67
64
 
68
65
  shiteless =
69
66
  lambda do |list|
@@ -90,10 +87,9 @@ task :gemspec do
90
87
  files = shiteless[Dir::glob("**/**")]
91
88
  executables = shiteless[Dir::glob("bin/*")].map{|exe| File.basename(exe)}
92
89
  #has_rdoc = true #File.exist?('doc')
93
- test_files = "test/#{ lib }.rb" if File.file?("test/#{ lib }.rb")
90
+ test_files = test(?e, "test/#{ lib }.rb") ? "test/#{ lib }.rb" : nil
94
91
  summary = object.respond_to?(:summary) ? object.summary : "summary: #{ lib } kicks the ass"
95
92
  description = object.respond_to?(:description) ? object.description : "description: #{ lib } kicks the ass"
96
- license = object.respond_to?(:license) ? object.license : "same as ruby's"
97
93
 
98
94
  if This.extensions.nil?
99
95
  This.extensions = []
@@ -104,39 +100,51 @@ task :gemspec do
104
100
  end
105
101
  extensions = [extensions].flatten.compact
106
102
 
103
+ # TODO
104
+ if This.dependencies.nil?
105
+ dependencies = []
106
+ else
107
+ case This.dependencies
108
+ when Hash
109
+ dependencies = This.dependencies.values
110
+ when Array
111
+ dependencies = This.dependencies
112
+ end
113
+ end
114
+
107
115
  template =
108
116
  if test(?e, 'gemspec.erb')
109
117
  Template{ IO.read('gemspec.erb') }
110
118
  else
111
119
  Template {
112
120
  <<-__
113
- ## #{ lib }.gemspec
121
+ ## <%= lib %>.gemspec
114
122
  #
115
123
 
116
124
  Gem::Specification::new do |spec|
117
- spec.name = #{ lib.inspect }
118
- spec.version = #{ version.inspect }
125
+ spec.name = <%= lib.inspect %>
126
+ spec.version = <%= version.inspect %>
119
127
  spec.platform = Gem::Platform::RUBY
120
- spec.summary = #{ lib.inspect }
121
- spec.description = #{ description.inspect }
122
- spec.license = #{ license.inspect }
128
+ spec.summary = <%= lib.inspect %>
129
+ spec.description = <%= description.inspect %>
123
130
 
124
- spec.files =\n#{ files.sort.pretty_inspect }
125
- spec.executables = #{ executables.inspect }
131
+ spec.files =\n<%= files.sort.pretty_inspect %>
132
+ spec.executables = <%= executables.inspect %>
126
133
 
127
134
  spec.require_path = "lib"
128
135
 
129
- spec.test_files = #{ test_files.inspect }
136
+ spec.test_files = <%= test_files.inspect %>
130
137
 
131
- ### spec.add_dependency 'lib', '>= version'
132
- #### spec.add_dependency 'map'
138
+ <% dependencies.each do |lib_version| %>
139
+ spec.add_dependency(*<%= Array(lib_version).flatten.inspect %>)
140
+ <% end %>
133
141
 
134
- spec.extensions.push(*#{ extensions.inspect })
142
+ spec.extensions.push(*<%= extensions.inspect %>)
135
143
 
136
- spec.rubyforge_project = #{ This.rubyforge_project.inspect }
137
- spec.author = #{ This.author.inspect }
138
- spec.email = #{ This.email.inspect }
139
- spec.homepage = #{ This.homepage.inspect }
144
+ spec.rubyforge_project = <%= This.rubyforge_project.inspect %>
145
+ spec.author = <%= This.author.inspect %>
146
+ spec.email = <%= This.email.inspect %>
147
+ spec.homepage = <%= This.homepage.inspect %>
140
148
  end
141
149
  __
142
150
  }
@@ -180,8 +188,8 @@ task :readme do
180
188
  end
181
189
 
182
190
  template =
183
- if test(?e, 'README.erb')
184
- Template{ IO.read('README.erb') }
191
+ if test(?e, 'readme.erb')
192
+ Template{ IO.read('readme.erb') }
185
193
  else
186
194
  Template {
187
195
  <<-__
@@ -272,6 +280,12 @@ BEGIN {
272
280
  end
273
281
  This.version = version
274
282
 
283
+ # see if dependencies are export by the module
284
+ #
285
+ if This.object.respond_to?(:dependencies)
286
+ This.dependencies = This.object.dependencies
287
+ end
288
+
275
289
  # we need to know the name of the lib an it's version
276
290
  #
277
291
  abort('no lib') unless This.lib
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lockfile
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.1.0
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Ara T. Howard
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2014-02-15 00:00:00.000000000 Z
12
+ date: 2011-10-24 00:00:00.000000000 Z
12
13
  dependencies: []
13
- description: a ruby library for creating perfect and NFS safe lockfiles
14
+ description: ! 'description: lockfile kicks the ass'
14
15
  email: ara.t.howard@gmail.com
15
16
  executables:
16
17
  - rlock
@@ -31,27 +32,27 @@ files:
31
32
  - samples/nfsstore.rb
32
33
  - samples/out
33
34
  homepage: https://github.com/ahoward/lockfile
34
- licenses:
35
- - same as ruby's
36
- metadata: {}
35
+ licenses: []
37
36
  post_install_message:
38
37
  rdoc_options: []
39
38
  require_paths:
40
39
  - lib
41
40
  required_ruby_version: !ruby/object:Gem::Requirement
41
+ none: false
42
42
  requirements:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
46
  required_rubygems_version: !ruby/object:Gem::Requirement
47
+ none: false
47
48
  requirements:
48
49
  - - ! '>='
49
50
  - !ruby/object:Gem::Version
50
51
  version: '0'
51
52
  requirements: []
52
53
  rubyforge_project: codeforpeople
53
- rubygems_version: 2.0.3
54
+ rubygems_version: 1.8.10
54
55
  signing_key:
55
- specification_version: 4
56
+ specification_version: 3
56
57
  summary: lockfile
57
58
  test_files: []
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ODM0M2E0ODAyNDY5MzJhZDJhNjU1ZDc5MmMzM2JkN2I4MTA4YjMwNw==
5
- data.tar.gz: !binary |-
6
- NThjOTI1M2JjNzYyMjQ4YWIxOGQ4OGNmZWE0NGI0YTI1M2FlMWVlNg==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MDU2ZGQwMzA0ZWUwMWNjY2Q4MjFiMmNhY2MxNDIwODIyMmRiOGJlZDQ1N2Fk
10
- YTJlZWUwMTg2ZTc5OWQ3YjgwYzY5OTFmYWFiZjQwYTFkYjk5OWVjY2I2OTFk
11
- N2M0MzRmYTY3OTlhOTQyYWNiYTUzNjY1ZGRmZGJjMmEyMTE3NDk=
12
- data.tar.gz: !binary |-
13
- NzAyNjFjYzk3YjgzZmE3M2YyNjZmNjhkZTliZTdhMmFjNDFlNDdhZmIwNzIw
14
- OTM2NWI3ZWNhNzI3ZmIzOTU4NGIzNjcyOTUwNmMyNWFhNThiNTAzMTIyYTY1
15
- ZmRhYTViMzc0Zjc3MTA1ZmYwMzBlYmFlYjlkNTA3ZTY0OGI1NjE=