open_namespace 0.4.0 → 0.4.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,3 @@
1
+ -
2
+ ChangeLog.md
3
+ LICENSE.txt
data/.yardopts CHANGED
@@ -1 +1 @@
1
- --markup markdown --title 'OpenNamespace Documentation' --protected --files ChangeLog.md,LICENSE.txt
1
+ --markup markdown --title 'OpenNamespace Documentation' --protected
@@ -1,4 +1,4 @@
1
- Copyright (c) 2010-2011 Hal Brodigan
1
+ Copyright (c) 2010-2012 Hal Brodigan
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # OpenNamespace
2
2
 
3
- * [Source](http://github.com/postmodern/open_namespace)
4
- * [Issues](http://github.com/postmodern/open_namespace/issues)
3
+ * [Source](https://github.com/postmodern/open_namespace)
4
+ * [Issues](https://github.com/postmodern/open_namespace/issues)
5
5
  * [Documentation](http://rubydoc.info/gems/open_namespace/frames)
6
6
  * [Email](mailto:postmodern.mod3 at gmail.com)
7
7
 
@@ -68,6 +68,6 @@ Loading constants from alternate namespace root directories:
68
68
 
69
69
  ## License
70
70
 
71
- Copyright (c) 2010-2011 Hal Brodigan
71
+ Copyright (c) 2010-2012 Hal Brodigan
72
72
 
73
73
  See {file:LICENSE.txt} for license information.
data/Rakefile CHANGED
@@ -2,13 +2,13 @@ require 'rubygems'
2
2
  require 'rake'
3
3
 
4
4
  begin
5
- gem 'ore-tasks', '~> 0.4'
6
- require 'ore/tasks'
5
+ gem 'rubygems-tasks', '~> 0.1'
6
+ require 'rubygems/tasks'
7
7
 
8
- Ore::Tasks.new
8
+ Gem::Tasks.new
9
9
  rescue LoadError => e
10
10
  warn e.message
11
- warn "Run `gem install ore-tasks` to install 'ore/tasks'."
11
+ warn "Run `gem install rubygems-tasks` to install 'rubygems/tasks'."
12
12
  end
13
13
 
14
14
  begin
@@ -7,10 +7,10 @@ description:
7
7
  license: MIT
8
8
  authors: Postmodern
9
9
  email: postmodern.mod3@gmail.com
10
- homepage: http://github.com/postmodern/open_namespace
10
+ homepage: https://github.com/postmodern/open_namespace
11
11
  has_yard: true
12
12
 
13
13
  development_dependencies:
14
- ore-tasks: ~> 0.4
14
+ rubygems-tasks: ~> 0.1
15
15
  rspec: ~> 2.4
16
16
  yard: ~> 0.7
@@ -1,4 +1,4 @@
1
1
  module OpenNamespace
2
2
  # open_namespace version
3
- VERSION = '0.4.0'
3
+ VERSION = '0.4.1'
4
4
  end
@@ -3,99 +3,77 @@
3
3
  require 'yaml'
4
4
 
5
5
  Gem::Specification.new do |gemspec|
6
- files = if File.directory?('.git')
7
- `git ls-files`.split($/)
8
- elsif File.directory?('.hg')
9
- `hg manifest`.split($/)
10
- elsif File.directory?('.svn')
11
- `svn ls -R`.split($/).select { |path| File.file?(path) }
12
- else
13
- Dir['{**/}{.*,*}'].select { |path| File.file?(path) }
14
- end
6
+ root = File.dirname(__FILE__)
7
+ lib_dir = File.join(root,'lib')
8
+ files = `git ls-files`.split($/)
15
9
 
16
10
  filter_files = lambda { |paths|
17
- case paths
18
- when Array
19
- (files & paths)
20
- when String
21
- (files & Dir[paths])
22
- end
11
+ files & case paths
12
+ when Array
13
+ paths
14
+ when String
15
+ Dir[paths]
16
+ end
23
17
  }
24
18
 
25
19
  version = {
26
- :file => 'lib/open_namespace/version.rb',
20
+ :file => 'open_namespace/version',
27
21
  :constant => 'OpenNamespace::VERSION'
28
22
  }
29
23
 
30
24
  defaults = {
31
- 'name' => File.basename(File.dirname(__FILE__)),
32
- 'files' => files,
33
- 'executables' => filter_files['bin/*'].map { |path| File.basename(path) },
34
- 'test_files' => filter_files['{test/{**/}*_test.rb,spec/{**/}*_spec.rb}'],
35
- 'extra_doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}'],
25
+ 'name' => File.basename(root),
26
+ 'files' => files,
27
+ 'require_paths' => ['ext', 'lib'].select { |dir| File.directory?(dir) },
28
+ 'executables' => filter_files['bin/*'].map { |path| File.basename(path) },
29
+ 'test_files' => filter_files['{test/{**/}*_test.rb,spec/{**/}*_spec.rb}'],
30
+ 'doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}'],
31
+ 'extra_doc_files' => filter_files['*.{txt,rdoc,md,markdown,tt,textile}']
36
32
  }
37
33
 
38
34
  metadata = defaults.merge(YAML.load_file('gemspec.yml'))
39
35
 
40
- gemspec.name = metadata['name']
36
+ gemspec.name = metadata['name']
41
37
  gemspec.version = if metadata['version']
42
38
  metadata['version']
43
- elsif File.file?(version[:file])
44
- require File.join('.',version[:file])
39
+ else
40
+ $LOAD_PATH << lib_dir unless $LOAD_PATH.include?(lib_dir)
41
+
42
+ require version[:file]
45
43
  eval(version[:constant])
46
44
  end
47
45
 
48
- gemspec.summary = metadata.fetch('summary',metadata['description'])
46
+ gemspec.summary = metadata.fetch('summary',metadata['description'])
49
47
  gemspec.description = metadata.fetch('description',metadata['summary'])
50
48
 
51
- case metadata['license']
52
- when Array
53
- gemspec.licenses = metadata['license']
54
- when String
55
- gemspec.license = metadata['license']
56
- end
57
-
58
- case metadata['authors']
59
- when Array
60
- gemspec.authors = metadata['authors']
61
- when String
62
- gemspec.author = metadata['authors']
63
- end
49
+ gemspec.licenses = Array(metadata['license'])
50
+ gemspec.authors = Array(metadata['authors'])
64
51
 
65
- gemspec.email = metadata['email']
52
+ gemspec.email = metadata['email']
66
53
  gemspec.homepage = metadata['homepage']
67
54
 
68
- case metadata['require_paths']
69
- when Array
70
- gemspec.require_paths = metadata['require_paths']
71
- when String
72
- gemspec.require_path = metadata['require_paths']
73
- end
74
-
75
- gemspec.files = filter_files[metadata['files']]
76
-
77
- gemspec.executables = metadata['executables']
78
- gemspec.extensions = metadata['extensions']
55
+ gemspec.require_paths = Array(metadata['require_paths'])
56
+ gemspec.files = filter_files[metadata['files']]
57
+ gemspec.files += Array(metadata['generated_files'])
58
+ gemspec.executables = metadata['executables']
59
+ gemspec.extensions = metadata['extensions']
79
60
 
80
61
  if Gem::VERSION < '1.7.'
81
62
  gemspec.default_executable = gemspec.executables.first
82
63
  end
83
64
 
84
- gemspec.test_files = filter_files[metadata['test_files']]
85
-
86
- unless gemspec.files.include?('.document')
87
- gemspec.extra_rdoc_files = metadata['extra_doc_files']
88
- end
65
+ gemspec.test_files = filter_files[metadata['test_files']]
66
+ gemspec.extra_rdoc_files = Array(metadata['extra_doc_files'])
89
67
 
90
68
  gemspec.post_install_message = metadata['post_install_message']
91
- gemspec.requirements = metadata['requirements']
69
+ gemspec.requirements = metadata['requirements']
92
70
 
93
71
  if gemspec.respond_to?(:required_ruby_version=)
94
72
  gemspec.required_ruby_version = metadata['required_ruby_version']
95
73
  end
96
74
 
97
75
  if gemspec.respond_to?(:required_rubygems_version=)
98
- gemspec.required_rubygems_version = metadata['required_rubygems_version']
76
+ gemspec.required_rubygems_version = metadata['required_ruby_version']
99
77
  end
100
78
 
101
79
  parse_versions = lambda { |versions|
metadata CHANGED
@@ -1,59 +1,79 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: open_namespace
3
- version: !ruby/object:Gem::Version
4
- version: 0.4.0
3
+ version: !ruby/object:Gem::Version
4
+ hash: 13
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 4
9
+ - 1
10
+ version: 0.4.1
6
11
  platform: ruby
7
- authors:
12
+ authors:
8
13
  - Postmodern
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2011-11-20 00:00:00.000000000 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
15
- name: ore-tasks
16
- requirement: &10491560 !ruby/object:Gem::Requirement
17
+
18
+ date: 2012-05-28 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: yard
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
17
24
  none: false
18
- requirements:
25
+ requirements:
19
26
  - - ~>
20
- - !ruby/object:Gem::Version
21
- version: '0.4'
27
+ - !ruby/object:Gem::Version
28
+ hash: 5
29
+ segments:
30
+ - 0
31
+ - 7
32
+ version: "0.7"
22
33
  type: :development
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: rubygems-tasks
23
37
  prerelease: false
24
- version_requirements: *10491560
25
- - !ruby/object:Gem::Dependency
26
- name: rspec
27
- requirement: &10494620 !ruby/object:Gem::Requirement
38
+ requirement: &id002 !ruby/object:Gem::Requirement
28
39
  none: false
29
- requirements:
40
+ requirements:
30
41
  - - ~>
31
- - !ruby/object:Gem::Version
32
- version: '2.4'
42
+ - !ruby/object:Gem::Version
43
+ hash: 9
44
+ segments:
45
+ - 0
46
+ - 1
47
+ version: "0.1"
33
48
  type: :development
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
51
+ name: rspec
34
52
  prerelease: false
35
- version_requirements: *10494620
36
- - !ruby/object:Gem::Dependency
37
- name: yard
38
- requirement: &10370760 !ruby/object:Gem::Requirement
53
+ requirement: &id003 !ruby/object:Gem::Requirement
39
54
  none: false
40
- requirements:
55
+ requirements:
41
56
  - - ~>
42
- - !ruby/object:Gem::Version
43
- version: '0.7'
57
+ - !ruby/object:Gem::Version
58
+ hash: 11
59
+ segments:
60
+ - 2
61
+ - 4
62
+ version: "2.4"
44
63
  type: :development
45
- prerelease: false
46
- version_requirements: *10370760
47
- description: OpenNamespace allows namespaces to require and find classes and modules
48
- from other RubyGems.
64
+ version_requirements: *id003
65
+ description: OpenNamespace allows namespaces to require and find classes and modules from other RubyGems.
49
66
  email: postmodern.mod3@gmail.com
50
67
  executables: []
68
+
51
69
  extensions: []
52
- extra_rdoc_files:
70
+
71
+ extra_rdoc_files:
53
72
  - ChangeLog.md
54
73
  - LICENSE.txt
55
74
  - README.md
56
- files:
75
+ files:
76
+ - .document
57
77
  - .gemtest
58
78
  - .gitignore
59
79
  - .rspec
@@ -84,31 +104,38 @@ files:
84
104
  - spec/classes/simple_namespace/sub/constant_four.rb
85
105
  - spec/open_namespace_spec.rb
86
106
  - spec/spec_helper.rb
87
- homepage: http://github.com/postmodern/open_namespace
88
- licenses:
107
+ homepage: https://github.com/postmodern/open_namespace
108
+ licenses:
89
109
  - MIT
90
110
  post_install_message:
91
111
  rdoc_options: []
92
- require_paths:
112
+
113
+ require_paths:
93
114
  - lib
94
- required_ruby_version: !ruby/object:Gem::Requirement
115
+ required_ruby_version: !ruby/object:Gem::Requirement
95
116
  none: false
96
- requirements:
97
- - - ! '>='
98
- - !ruby/object:Gem::Version
99
- version: '0'
100
- required_rubygems_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ hash: 3
121
+ segments:
122
+ - 0
123
+ version: "0"
124
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
125
  none: false
102
- requirements:
103
- - - ! '>='
104
- - !ruby/object:Gem::Version
105
- version: '0'
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ hash: 3
130
+ segments:
131
+ - 0
132
+ version: "0"
106
133
  requirements: []
134
+
107
135
  rubyforge_project:
108
- rubygems_version: 1.8.10
136
+ rubygems_version: 1.8.23
109
137
  signing_key:
110
138
  specification_version: 3
111
139
  summary: Allows namespaces to load constants on-demand
112
- test_files:
140
+ test_files:
113
141
  - spec/open_namespace_spec.rb
114
- has_rdoc: