nu 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/bin/nu CHANGED
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env ruby
1
+ #!/usr/bin/ruby
2
2
 
3
3
  require 'nu'
4
4
 
@@ -7,4 +7,4 @@ begin
7
7
  rescue Interrupt
8
8
  puts 'quitting'
9
9
  exit 1
10
- end
10
+ end
data/lib/nu/cli.rb CHANGED
@@ -37,4 +37,4 @@ module Nu
37
37
  end
38
38
 
39
39
  end
40
- end
40
+ end
data/lib/nu/loader.rb CHANGED
@@ -34,9 +34,11 @@ module Nu
34
34
 
35
35
  def self.get_libdir(name)
36
36
  g = get_gemspec name
37
- l = Gem.searcher.lib_dirs_for g
38
- #scrub and return?
39
- l
37
+ #puts "GemSpec #{g.full_gem_path}"
38
+ l = g.full_gem_path
39
+ d = File.join(l,"lib")
40
+ #puts d
41
+ d
40
42
  end
41
43
 
42
44
  def self.get_gemspec(name)
data/lib/nu/project.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require 'FileUtils'
2
+
1
3
  module Nu
2
4
  class Project
3
5
 
@@ -9,9 +11,9 @@ module Nu
9
11
  if File.exist? @config_file
10
12
  return
11
13
  end
12
- add_file @config_file
14
+
13
15
  content = YAML::dump( {'lib'=>'lib'} )
14
- append_file @config_file, content
16
+ add_file @config_file, content
15
17
  end
16
18
 
17
19
  def get_location
@@ -26,5 +28,11 @@ module Nu
26
28
 
27
29
  File.open(@config_file, 'w') {|f| f.write(content) }
28
30
  end
31
+
32
+ def add_file(name, content)
33
+ FileUtils.mkdir_p(File.dirname(name))
34
+ File.open(name, 'w'){|f| f.write(content)}
35
+ end
36
+
29
37
  end
30
38
  end
data/lib/nu.rb CHANGED
@@ -1,3 +1,7 @@
1
+ here = File.expand_path(File.dirname(__FILE__))
2
+
3
+ $LOAD_PATH << "#{here}"
4
+
1
5
  require 'nu/cli'
2
6
  require 'nu/loader'
3
7
  require 'nu/config'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nu
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 13
10
- version: 0.1.13
9
+ - 14
10
+ version: 0.1.14
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dru Sellers
@@ -17,7 +17,7 @@ autorequire:
17
17
  bindir: bin
18
18
  cert_chain: []
19
19
 
20
- date: 2010-07-18 00:00:00 -05:00
20
+ date: 2010-07-21 00:00:00 -05:00
21
21
  default_executable:
22
22
  dependencies:
23
23
  - !ruby/object:Gem::Dependency
@@ -75,12 +75,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  requirements:
76
76
  - - ">="
77
77
  - !ruby/object:Gem::Version
78
- hash: 23
78
+ hash: 17
79
79
  segments:
80
80
  - 1
81
81
  - 3
82
- - 6
83
- version: 1.3.6
82
+ - 5
83
+ version: 1.3.5
84
84
  requirements: []
85
85
 
86
86
  rubyforge_project: nu