pluto 1.1.0 → 1.2.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6abc1a01aefe35e7b10d572f0b30b4fb33bace31
4
- data.tar.gz: e48200337087ae33c2184cecad91ef6d5b4bedab
3
+ metadata.gz: 501f33f77b501c98c479fac286684ee16b6fdd86
4
+ data.tar.gz: ac3938a62330dc883d1c0b81db1716da0e45560e
5
5
  SHA512:
6
- metadata.gz: ff3d03a5848e7e27198d3541ee795a97b6b28947cdb23db36a0f45ebb5f15883f5aae530984bfa45e4c1dac278e58f0fccd7dd1ccce787bb5a5c549aa1c2413d
7
- data.tar.gz: 68d0d2f37f6cbd2ed5da1e3f7de53db691e27d57ada9aecf0a44df6258a80ee58786926a46d9a2ab5f54d49d297fb5c6d3835089493c351d542905de6280bfc7
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.2.2'],
22
- ['pluto-update', '>= 1.1.0'],
21
+ ['pluto-models', '>= 1.3.2'],
22
+ ['pluto-update', '>= 1.5.0'],
23
23
  ['pluto-merge', '>= 1.1.0'],
24
- ['pluto-tasks', '>= 1.1.0'],
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
@@ -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
- extname = File.extname( name ) # return '' or '.ini' or '.yml' etc.
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
- 'pluto.yml',
94
- 'planet.ini',
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 '.yml' etc.
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', '.yml' ]
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::Fetcher.new
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.feed_by_rec( feed_rec )
160
+ feed = fetcher.fetch( feed_rec )
215
161
  ## pp feed
216
162
  end
217
163
 
@@ -3,7 +3,7 @@
3
3
  module PlutoCli
4
4
 
5
5
  MAJOR = 1
6
- MINOR = 1
6
+ MINOR = 2
7
7
  PATCH = 0
8
8
  VERSION = [MAJOR,MINOR,PATCH].join('.')
9
9
 
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.1.0
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: 2014-12-13 00:00:00.000000000 Z
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.2.2
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.2.2
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.1.0
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.1.0
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.1.0
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.1.0
68
+ version: 1.5.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: gli
71
71
  requirement: !ruby/object:Gem::Requirement