nu 0.1.18 → 0.1.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/bin/nu +0 -0
  2. data/lib/nu.rb +10 -10
  3. data/lib/nu/config.rb +36 -36
  4. data/lib/nu/loader.rb +5 -1
  5. metadata +3 -3
data/bin/nu CHANGED
File without changes
data/lib/nu.rb CHANGED
@@ -1,10 +1,10 @@
1
- here = File.expand_path(File.dirname(__FILE__))
2
-
3
- $LOAD_PATH << "#{here}"
4
-
5
- require 'nu/cli'
6
- require 'nu/loader'
7
- require 'nu/config'
8
- require 'nu/project'
9
-
10
- #other fancy stuff
1
+ here = File.expand_path(File.dirname(__FILE__))
2
+
3
+ $LOAD_PATH << "#{here}"
4
+
5
+ require 'nu/cli'
6
+ require 'nu/loader'
7
+ require 'nu/config'
8
+ require 'nu/project'
9
+
10
+ #other fancy stuff
@@ -1,37 +1,37 @@
1
- require 'yaml'
2
- require 'thor'
3
- require 'FileUtils'
4
-
5
- module Nu
6
- #class Config < Thor::Group
7
- #include Thor::Actions
8
-
9
- #@config_file = ".nu/options.yaml"
10
-
11
- #def self.get_config
12
- # unless File.exists? @config_file
13
- # FileUtils.touch @config_file
14
- # append_file @config_file, YAML::dump({})
15
- # end
16
- # cd = YAML.load_file @config_file
17
- # cd = ask_about_libdir cd
18
- #
19
- # save_file cd
20
- # cd
21
- #end
22
-
23
- #def self.ask_about_libdir(config)
24
- # if config['lib'].nil?
25
- # loc = ask "Where do you want me to copy things to?"
26
- # config = {'lib'=>loc}
27
- # end
28
- # config
29
- #end
30
-
31
- #def self.save_file(config)
32
- # File.open(@config_file, 'w') do |out|
33
- # YAML.dump( config, out)
34
- # end
35
- #end
36
- #end
1
+ require 'yaml'
2
+ require 'thor'
3
+ require 'FileUtils'
4
+
5
+ module Nu
6
+ #class Config < Thor::Group
7
+ #include Thor::Actions
8
+
9
+ #@config_file = ".nu/options.yaml"
10
+
11
+ #def self.get_config
12
+ # unless File.exists? @config_file
13
+ # FileUtils.touch @config_file
14
+ # append_file @config_file, YAML::dump({})
15
+ # end
16
+ # cd = YAML.load_file @config_file
17
+ # cd = ask_about_libdir cd
18
+ #
19
+ # save_file cd
20
+ # cd
21
+ #end
22
+
23
+ #def self.ask_about_libdir(config)
24
+ # if config['lib'].nil?
25
+ # loc = ask "Where do you want me to copy things to?"
26
+ # config = {'lib'=>loc}
27
+ # end
28
+ # config
29
+ #end
30
+
31
+ #def self.save_file(config)
32
+ # File.open(@config_file, 'w') do |out|
33
+ # YAML.dump( config, out)
34
+ # end
35
+ #end
36
+ #end
37
37
  end
@@ -52,7 +52,11 @@ module Nu
52
52
  end
53
53
 
54
54
  def gem_available?
55
- Gem.available? @gem_name, @version
55
+ if @version.nil?
56
+ Gem.available? @gem_name
57
+ else
58
+ Gem.available? @gem_name, @version
59
+ end
56
60
  end
57
61
 
58
62
  def copy_source
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: 63
4
+ hash: 61
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 18
10
- version: 0.1.18
9
+ - 19
10
+ version: 0.1.19
11
11
  platform: ruby
12
12
  authors:
13
13
  - Dru Sellers