inventory 0.2.3 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,13 +1,17 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
+ require 'lookout/rake/tasks-3.0'
4
+
3
5
  $:.unshift File.expand_path('../lib', __FILE__)
4
- require 'lookout/rake/tasks'
5
- require 'inventory/rake/tasks'
6
- require 'inventory/version'
6
+ require 'inventory/rake/tasks-1.0'
7
+ require 'inventory-1.0'
7
8
 
8
9
  Inventory::Rake::Tasks.define Inventory::Version, :gem => proc{ |_, s|
9
10
  s.author = 'Nikolai Weibull'
10
11
  s.email = 'now@bitwi.se'
11
12
  s.homepage = 'https://github.com/now/inventory'
13
+
14
+ s.add_development_dependency 'lookout', '~> 3.0'
15
+ s.add_development_dependency 'yard', '~> 0.7.0'
12
16
  }
13
17
  Lookout::Rake::Tasks::Test.new
@@ -7,7 +7,8 @@ class Inventory
7
7
  @major, @minor, @patch = major, minor, patch
8
8
  raise ArgumentError, 'default value of path argument could not be calculated' unless path
9
9
  @path = path
10
- @srcdir, _, @package_require = File.dirname(File.expand_path(path)).rpartition('/lib/')
10
+ @srcdir, _, @package_path = File.dirname(File.expand_path(path)).rpartition('/lib/')
11
+ @package_require = '%s-%d.0' % [package, major]
11
12
  raise ArgumentError,
12
13
  'path is not of the form PATH/lib/PACKAGE/version.rb: %s' % path if
13
14
  @srcdir.empty?
@@ -15,11 +16,11 @@ class Inventory
15
16
  end
16
17
 
17
18
  def package
18
- package_require.gsub('/', '-')
19
+ package_path.gsub('/', '-')
19
20
  end
20
21
 
21
22
  def version_require
22
- File.join(package_require, 'version')
23
+ File.join(package_path, 'version')
23
24
  end
24
25
 
25
26
  def lib_directories
@@ -103,5 +104,8 @@ class Inventory
103
104
  '#<%s: %s %s>' % [self.class, package, self]
104
105
  end
105
106
 
106
- attr_reader :major, :minor, :patch, :path, :srcdir, :package_require
107
+ attr_reader :major, :minor, :patch, :path, :srcdir, :package_path, :package_require
108
+
109
+ load File.expand_path('../inventory/version.rb', __FILE__)
107
110
  end
111
+
File without changes
@@ -1,4 +1,4 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
- desc 'Check that the package meets its expecatations'
3
+ desc 'Check that the package meets its expectations'
4
4
  task :check
@@ -1,12 +1,10 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
- require 'inventory'
4
-
5
3
  class Inventory
6
- Version = Inventory.new(0, 2, 3){
4
+ Version = Inventory.new(1, 0, 0){
7
5
  def additional_libs
8
6
  super + %w'
9
- inventory/rake/tasks.rb
7
+ inventory/rake/tasks-1.0.rb
10
8
  inventory/rake/tasks/check.rb
11
9
  inventory/rake/tasks/clean.rb
12
10
  inventory/rake/tasks/gem.rb
@@ -0,0 +1,11 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ Expectations do
4
+ expect 'a' do
5
+ Inventory.new(1, 0, 0, 'a/lib/a/version.rb').package
6
+ end
7
+
8
+ expect 'a-1.0' do
9
+ Inventory.new(1, 0, 0, 'a/lib/a/version.rb').package_require
10
+ end
11
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inventory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,8 +9,30 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-19 00:00:00.000000000 Z
13
- dependencies: []
12
+ date: 2012-04-25 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: lookout
16
+ requirement: &15885192 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: '3.0'
22
+ type: :development
23
+ prerelease: false
24
+ version_requirements: *15885192
25
+ - !ruby/object:Gem::Dependency
26
+ name: yard
27
+ requirement: &15886860 !ruby/object:Gem::Requirement
28
+ none: false
29
+ requirements:
30
+ - - ~>
31
+ - !ruby/object:Gem::Version
32
+ version: 0.7.0
33
+ type: :development
34
+ prerelease: false
35
+ version_requirements: *15886860
14
36
  description: ! " Inventory\n\n Inventory allows
15
37
  you to create inventories of your Ruby projects. These\n inventories can then
16
38
  be used to load the project, create gem specifications\n and gems, run unit tests,
@@ -20,16 +42,16 @@ executables: []
20
42
  extensions: []
21
43
  extra_rdoc_files: []
22
44
  files:
23
- - lib/inventory.rb
45
+ - lib/inventory-1.0.rb
24
46
  - lib/inventory/version.rb
25
- - lib/inventory/rake/tasks.rb
47
+ - lib/inventory/rake/tasks-1.0.rb
26
48
  - lib/inventory/rake/tasks/check.rb
27
49
  - lib/inventory/rake/tasks/clean.rb
28
50
  - lib/inventory/rake/tasks/gem.rb
29
51
  - lib/inventory/rake/tasks/inventory.rb
30
- - test/unit/inventory.rb
52
+ - test/unit/inventory-1.0.rb
31
53
  - test/unit/inventory/version.rb
32
- - test/unit/inventory/rake/tasks.rb
54
+ - test/unit/inventory/rake/tasks-1.0.rb
33
55
  - test/unit/inventory/rake/tasks/check.rb
34
56
  - test/unit/inventory/rake/tasks/clean.rb
35
57
  - test/unit/inventory/rake/tasks/gem.rb
@@ -38,6 +60,7 @@ files:
38
60
  - Rakefile
39
61
  homepage: https://github.com/now/inventory
40
62
  licenses: []
63
+ metadata: {}
41
64
  post_install_message:
42
65
  rdoc_options: []
43
66
  require_paths:
@@ -56,8 +79,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
79
  version: '0'
57
80
  requirements: []
58
81
  rubyforge_project:
59
- rubygems_version: 1.8.11
82
+ rubygems_version: 1.8.10
60
83
  signing_key:
61
- specification_version: 3
84
+ specification_version: 4
62
85
  summary: Inventory allows you to create inventories of your Ruby projects.
63
86
  test_files: []
@@ -1,4 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- Expectations do
4
- end