inventory 1.2.3 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ Inventory::Rake::Tasks.define Inventory::Version, :gem => proc{ |_, s|
11
11
  s.homepage = 'https://github.com/now/inventory'
12
12
  }
13
13
 
14
- if (%w'gem:deps:install gem:deps:install:user' & Rake.application.top_level_tasks).empty?
14
+ Inventory::Rake::Tasks.unless_installing_dependencies do
15
15
  require 'lookout/rake-3.0'
16
16
  Lookout::Rake::Tasks::Test.new
17
17
  end
@@ -37,18 +37,18 @@ class Inventory::Dependencies
37
37
 
38
38
  private
39
39
 
40
- def development(name, major, minor, patch)
41
- dependencies << Development.new(name, major, minor, patch)
40
+ def development(name, major, minor, patch, options = {})
41
+ dependencies << Development.new(name, major, minor, patch, options)
42
42
  self
43
43
  end
44
44
 
45
- def runtime(name, major, minor, patch)
46
- dependencies << Runtime.new(name, major, minor, patch)
45
+ def runtime(name, major, minor, patch, options = {})
46
+ dependencies << Runtime.new(name, major, minor, patch, options)
47
47
  self
48
48
  end
49
49
 
50
- def optional(name, major, minor, patch)
51
- dependencies << Optional.new(name, major, minor, patch)
50
+ def optional(name, major, minor, patch, options = {})
51
+ dependencies << Optional.new(name, major, minor, patch, options)
52
52
  self
53
53
  end
54
54
  end
@@ -3,15 +3,12 @@
3
3
  module Inventory::Dependency
4
4
  def initialize(name, major, minor, patch, options = {})
5
5
  @name, @major, @minor, @patch = name, major, minor, patch
6
+ @feature = options.fetch(:feature, '%s-%d.0' % [name.gsub('-', '/'), major])
6
7
  instance_exec(&Proc.new) if block_given?
7
8
  end
8
9
 
9
10
  def to_s
10
- '%d.%d.%d' % [major, minor, patch]
11
- end
12
-
13
- def feature
14
- '%s-%d.0' % [name.gsub('-', '/'), major]
11
+ [major, minor, patch].join('.')
15
12
  end
16
13
 
17
14
  def require
@@ -23,7 +20,7 @@ module Inventory::Dependency
23
20
  self
24
21
  end
25
22
 
26
- attr_reader :name, :major, :minor, :patch
23
+ attr_reader :name, :major, :minor, :patch, :feature
27
24
 
28
25
  private
29
26
 
@@ -1,13 +1,13 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  class Inventory
4
- Version = Inventory.new(1, 2, 3){
4
+ Version = Inventory.new(1, 3, 0){
5
5
  def dependencies
6
6
  Dependencies.new{
7
7
  development 'inventory-rake', 1, 3, 0
8
8
  development 'lookout', 3, 0, 0
9
9
  development 'lookout-rake', 3, 0, 0
10
- development 'yard', 0, 7, 0
10
+ development 'yard', 0, 8, 0
11
11
  }
12
12
  end
13
13
 
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: 1.2.3
4
+ version: 1.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-04-27 00:00:00.000000000 Z
12
+ date: 2012-05-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: inventory-rake
16
- requirement: &4277352 !ruby/object:Gem::Requirement
16
+ requirement: &2156387080 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.3'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *4277352
24
+ version_requirements: *2156387080
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: lookout
27
- requirement: &4276908 !ruby/object:Gem::Requirement
27
+ requirement: &2156385940 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '3.0'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *4276908
35
+ version_requirements: *2156385940
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: lookout-rake
38
- requirement: &4292616 !ruby/object:Gem::Requirement
38
+ requirement: &2156385020 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,18 +43,18 @@ dependencies:
43
43
  version: '3.0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *4292616
46
+ version_requirements: *2156385020
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: yard
49
- requirement: &4292196 !ruby/object:Gem::Requirement
49
+ requirement: &2156384360 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
53
53
  - !ruby/object:Gem::Version
54
- version: 0.7.0
54
+ version: 0.8.0
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *4292196
57
+ version_requirements: *2156384360
58
58
  description: ! " Inventory\n\n Inventory allows
59
59
  you to create inventories of your Ruby projects. These\n inventories can then
60
60
  be used to load the project, create gem specifications\n and gems, run unit tests,
@@ -82,7 +82,6 @@ files:
82
82
  - Rakefile
83
83
  homepage: https://github.com/now/inventory
84
84
  licenses: []
85
- metadata: {}
86
85
  post_install_message:
87
86
  rdoc_options: []
88
87
  require_paths:
@@ -101,8 +100,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
101
100
  version: '0'
102
101
  requirements: []
103
102
  rubyforge_project:
104
- rubygems_version: 1.8.10
103
+ rubygems_version: 1.8.11
105
104
  signing_key:
106
- specification_version: 4
105
+ specification_version: 3
107
106
  summary: Inventory allows you to create inventories of your Ruby projects.
108
107
  test_files: []