pluto 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +3 -3
- data/lib/pluto.rb +3 -0
- data/lib/pluto/cli/main.rb +10 -64
- data/lib/pluto/cli/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 501f33f77b501c98c479fac286684ee16b6fdd86
|
4
|
+
data.tar.gz: ac3938a62330dc883d1c0b81db1716da0e45560e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a658b5ade5742afd867c5391a99508fc189df89203b564b03d0b24468d40a5f477ea4552cd6f9d42ca1b815227e09344e6c25a1861bb354a34df34dd3e76fb0
|
7
|
+
data.tar.gz: e4fb0cee5ec56bcbc59986cb4935e39549db64e76f4187c967aa9217d0787327e17d8e979e50ab7b8a6bae63e6408f6aab13bab7b62e12a0c7cbb844f4f1170a
|
data/Rakefile
CHANGED
@@ -18,10 +18,10 @@ Hoe.spec 'pluto' do
|
|
18
18
|
self.history_file = 'HISTORY.md'
|
19
19
|
|
20
20
|
self.extra_deps = [
|
21
|
-
['pluto-models', '>= 1.
|
22
|
-
['pluto-update', '>= 1.
|
21
|
+
['pluto-models', '>= 1.3.2'],
|
22
|
+
['pluto-update', '>= 1.5.0'],
|
23
23
|
['pluto-merge', '>= 1.1.0'],
|
24
|
-
['pluto-tasks', '>= 1.
|
24
|
+
['pluto-tasks', '>= 1.5.0'],
|
25
25
|
['gli', '>= 2.12.2'],
|
26
26
|
['sqlite3'],
|
27
27
|
]
|
data/lib/pluto.rb
CHANGED
@@ -13,6 +13,9 @@ require 'pluto/tasks'
|
|
13
13
|
|
14
14
|
require 'pluto/cli/version' # note: let version always get first
|
15
15
|
require 'pluto/cli/opts' ## fix: make sure fetcher/updater etc. do not depend on cli/opts
|
16
|
+
require 'pluto/cli/sysinfo'
|
17
|
+
require 'pluto/cli/updater'
|
18
|
+
|
16
19
|
|
17
20
|
|
18
21
|
module Pluto
|
data/lib/pluto/cli/main.rb
CHANGED
@@ -20,66 +20,12 @@ opts = Pluto::Opts.new
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
-
class SysInfo
|
24
|
-
|
25
|
-
## todo/fix:
|
26
|
-
## pass in/use config (props)
|
27
|
-
|
28
|
-
def initialize( opts )
|
29
|
-
@opts = opts
|
30
|
-
end
|
31
|
-
|
32
|
-
attr_reader :opts
|
33
|
-
|
34
|
-
|
35
|
-
def dump
|
36
|
-
puts <<EOS
|
37
|
-
|
38
|
-
#{Pluto.banner}
|
39
|
-
|
40
|
-
Gems versions:
|
41
|
-
- pakman #{Pakman::VERSION}
|
42
|
-
- fetcher #{Fetcher::VERSION}
|
43
|
-
- feedutils #{FeedUtils::VERSION}
|
44
|
-
- textutils #{TextUtils::VERSION}
|
45
|
-
- logutils #{LogKernel::VERSION}
|
46
|
-
- props #{Props::VERSION}
|
47
|
-
|
48
|
-
- pluto #{PlutoCli::VERSION}
|
49
|
-
- pluto-models #{Pluto::VERSION}
|
50
|
-
- pluto-update #{PlutoUpdate::VERSION}
|
51
|
-
- pluto-merge #{PlutoMerge::VERSION}
|
52
|
-
- pluto-tasks #{PlutoTasks::VERSION}
|
53
|
-
|
54
|
-
Env home: #{Env.home}
|
55
|
-
Pluto config: #{opts.config_path}
|
56
|
-
Pluto root: #{Pluto.root}
|
57
|
-
|
58
|
-
EOS
|
59
|
-
|
60
|
-
# dump Pluto settings
|
61
|
-
# config.dump
|
62
|
-
# puts
|
63
|
-
|
64
|
-
|
65
|
-
## todo: add more gem version info
|
66
|
-
# todo: add logutils version
|
67
|
-
# add gli2 version
|
68
|
-
end
|
69
|
-
|
70
|
-
end # class SysInfo
|
71
|
-
|
72
|
-
|
73
|
-
|
74
23
|
######
|
75
24
|
# begin
|
76
25
|
# move to pluto for reuse (e.g. in rakefile)
|
77
26
|
|
78
27
|
def load_config( name )
|
79
|
-
|
80
|
-
|
81
|
-
config = extname == '.ini' ? INI.load_file( name ) :
|
82
|
-
YAML.load_file( name )
|
28
|
+
config = INI.load_file( name )
|
83
29
|
|
84
30
|
puts "dump >#{name}<:"
|
85
31
|
pp config
|
@@ -90,9 +36,8 @@ end
|
|
90
36
|
|
91
37
|
def find_default_config_path
|
92
38
|
candidates = [ 'pluto.ini',
|
93
|
-
'
|
94
|
-
|
95
|
-
'planet.yml' ]
|
39
|
+
'planet.ini'
|
40
|
+
]
|
96
41
|
|
97
42
|
candidates.each do |candidate|
|
98
43
|
return candidate if File.exists?( candidate ) ## todo: use ./candidate -- why? why not??
|
@@ -104,11 +49,11 @@ end
|
|
104
49
|
|
105
50
|
|
106
51
|
def find_config_path( name )
|
107
|
-
extname = File.extname( name ) # return '' or '.ini' or '.
|
52
|
+
extname = File.extname( name ) # return '' or '.ini' or '.conf' or '.cfg' or '.txt -???' etc.
|
108
53
|
|
109
54
|
return name if extname.present? # nothing to do; extension already present
|
110
55
|
|
111
|
-
candidates = [ '.ini'
|
56
|
+
candidates = [ '.ini' ]
|
112
57
|
|
113
58
|
candidates.each do |candidate|
|
114
59
|
return "#{name}#{candidate}" if File.exists?( "#{name}#{candidate}" )
|
@@ -125,12 +70,13 @@ end
|
|
125
70
|
###########################
|
126
71
|
|
127
72
|
|
73
|
+
|
128
74
|
def expand_config_args( args )
|
129
75
|
|
130
76
|
# 1) no args - try to find default config e.g. pluto.ini etc.
|
131
|
-
if args.length == 0
|
77
|
+
if args.length == 0
|
132
78
|
new_arg = find_default_config_path
|
133
|
-
|
79
|
+
|
134
80
|
return [] if new_arg.nil?
|
135
81
|
return [new_arg] # create a new args w/ one item e.g. ['pluto.yml']
|
136
82
|
end
|
@@ -208,10 +154,10 @@ command [:fetch, :f] do |c|
|
|
208
154
|
puts "feed_rec:"
|
209
155
|
pp feed_rec
|
210
156
|
|
211
|
-
fetcher = Pluto::
|
157
|
+
fetcher = Pluto::FeedFetcherBasic.new
|
212
158
|
fetcher.debug = true # by default debug is true (only used for debuggin! - save feed to file, etc.)
|
213
159
|
|
214
|
-
feed = fetcher.
|
160
|
+
feed = fetcher.fetch( feed_rec )
|
215
161
|
## pp feed
|
216
162
|
end
|
217
163
|
|
data/lib/pluto/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pluto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerald Bauer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pluto-models
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 1.
|
19
|
+
version: 1.3.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 1.
|
26
|
+
version: 1.3.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pluto-update
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 1.
|
33
|
+
version: 1.5.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 1.
|
40
|
+
version: 1.5.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: pluto-merge
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,14 +58,14 @@ dependencies:
|
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.
|
61
|
+
version: 1.5.0
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.
|
68
|
+
version: 1.5.0
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: gli
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|