pluto 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,5 @@
1
+ # encoding: utf-8
2
+
1
3
  module Pluto
2
4
 
3
5
  class Opts
@@ -66,7 +68,8 @@ class Opts
66
68
  end
67
69
 
68
70
  def load_shortcuts
69
- @shortcuts = YAML.load_file( "#{Pluto.root}/config/pluto.index.yml" )
71
+ ### Note: for now shortcuts packed w/ pluto-merge - move to pluto (this gem??) why? why not?
72
+ @shortcuts = YAML.load_file( "#{PlutoMerge.root}/config/pluto.index.yml" )
70
73
  end
71
74
 
72
75
  def map_fetch_shortcut( key )
@@ -0,0 +1,24 @@
1
+ # encoding: utf-8
2
+
3
+ module PlutoCli
4
+
5
+ MAJOR = 1
6
+ MINOR = 1
7
+ PATCH = 0
8
+ VERSION = [MAJOR,MINOR,PATCH].join('.')
9
+
10
+ def self.version
11
+ VERSION
12
+ end
13
+
14
+ def self.banner
15
+ ### todo: add RUBY_PATCHLEVEL or RUBY_PATCH_LEVEL e.g. -p124
16
+ "pluto/#{VERSION} on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
17
+ end
18
+
19
+ def self.root
20
+ "#{File.expand_path( File.dirname(File.dirname(File.dirname(File.dirname(__FILE__)))) )}"
21
+ end
22
+
23
+ end # module PlutoCli
24
+
metadata CHANGED
@@ -1,126 +1,127 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pluto
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
5
- prerelease:
4
+ version: 1.1.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Gerald Bauer
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2014-02-28 00:00:00.000000000 Z
11
+ date: 2014-12-13 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
- name: pakman
16
- requirement: &72026150 !ruby/object:Gem::Requirement
17
- none: false
14
+ name: pluto-models
15
+ requirement: !ruby/object:Gem::Requirement
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
- version: '0.5'
19
+ version: 1.2.2
22
20
  type: :runtime
23
21
  prerelease: false
24
- version_requirements: *72026150
25
- - !ruby/object:Gem::Dependency
26
- name: fetcher
27
- requirement: &72025920 !ruby/object:Gem::Requirement
28
- none: false
22
+ version_requirements: !ruby/object:Gem::Requirement
29
23
  requirements:
30
- - - ! '>='
24
+ - - ">="
31
25
  - !ruby/object:Gem::Version
32
- version: 0.4.3
33
- type: :runtime
34
- prerelease: false
35
- version_requirements: *72025920
26
+ version: 1.2.2
36
27
  - !ruby/object:Gem::Dependency
37
- name: logutils
38
- requirement: &72025620 !ruby/object:Gem::Requirement
39
- none: false
28
+ name: pluto-update
29
+ requirement: !ruby/object:Gem::Requirement
40
30
  requirements:
41
- - - ! '>='
31
+ - - ">="
42
32
  - !ruby/object:Gem::Version
43
- version: '0.6'
33
+ version: 1.1.0
44
34
  type: :runtime
45
35
  prerelease: false
46
- version_requirements: *72025620
47
- - !ruby/object:Gem::Dependency
48
- name: feedutils
49
- requirement: &72025240 !ruby/object:Gem::Requirement
50
- none: false
36
+ version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - ! '>='
38
+ - - ">="
53
39
  - !ruby/object:Gem::Version
54
- version: 0.4.0
55
- type: :runtime
56
- prerelease: false
57
- version_requirements: *72025240
40
+ version: 1.1.0
58
41
  - !ruby/object:Gem::Dependency
59
- name: props
60
- requirement: &72024910 !ruby/object:Gem::Requirement
61
- none: false
42
+ name: pluto-merge
43
+ requirement: !ruby/object:Gem::Requirement
62
44
  requirements:
63
- - - ! '>='
45
+ - - ">="
64
46
  - !ruby/object:Gem::Version
65
- version: 1.0.3
47
+ version: 1.1.0
66
48
  type: :runtime
67
49
  prerelease: false
68
- version_requirements: *72024910
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: 1.1.0
69
55
  - !ruby/object:Gem::Dependency
70
- name: textutils
71
- requirement: &72024550 !ruby/object:Gem::Requirement
72
- none: false
56
+ name: pluto-tasks
57
+ requirement: !ruby/object:Gem::Requirement
73
58
  requirements:
74
- - - ! '>='
59
+ - - ">="
75
60
  - !ruby/object:Gem::Version
76
- version: '0.7'
61
+ version: 1.1.0
77
62
  type: :runtime
78
63
  prerelease: false
79
- version_requirements: *72024550
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: 1.1.0
80
69
  - !ruby/object:Gem::Dependency
81
- name: activityutils
82
- requirement: &72024270 !ruby/object:Gem::Requirement
83
- none: false
70
+ name: gli
71
+ requirement: !ruby/object:Gem::Requirement
84
72
  requirements:
85
- - - ! '>='
73
+ - - ">="
86
74
  - !ruby/object:Gem::Version
87
- version: 0.1.0
75
+ version: 2.12.2
88
76
  type: :runtime
89
77
  prerelease: false
90
- version_requirements: *72024270
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: 2.12.2
91
83
  - !ruby/object:Gem::Dependency
92
- name: gli
93
- requirement: &72024020 !ruby/object:Gem::Requirement
94
- none: false
84
+ name: sqlite3
85
+ requirement: !ruby/object:Gem::Requirement
95
86
  requirements:
96
- - - ! '>='
87
+ - - ">="
97
88
  - !ruby/object:Gem::Version
98
- version: 2.5.6
89
+ version: '0'
99
90
  type: :runtime
100
91
  prerelease: false
101
- version_requirements: *72024020
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
102
97
  - !ruby/object:Gem::Dependency
103
98
  name: rdoc
104
- requirement: &72023760 !ruby/object:Gem::Requirement
105
- none: false
99
+ requirement: !ruby/object:Gem::Requirement
106
100
  requirements:
107
- - - ~>
101
+ - - "~>"
108
102
  - !ruby/object:Gem::Version
109
- version: '3.10'
103
+ version: '4.0'
110
104
  type: :development
111
105
  prerelease: false
112
- version_requirements: *72023760
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '4.0'
113
111
  - !ruby/object:Gem::Dependency
114
112
  name: hoe
115
- requirement: &72023540 !ruby/object:Gem::Requirement
116
- none: false
113
+ requirement: !ruby/object:Gem::Requirement
117
114
  requirements:
118
- - - ~>
115
+ - - "~>"
119
116
  - !ruby/object:Gem::Version
120
- version: '3.3'
117
+ version: '3.13'
121
118
  type: :development
122
119
  prerelease: false
123
- version_requirements: *72023540
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: '3.13'
124
125
  description: pluto - Another Planet Generator (Lets You Build Web Pages from Published
125
126
  Web Feeds)
126
127
  email: feedreader@googlegroups.com
@@ -128,68 +129,43 @@ executables:
128
129
  - pluto
129
130
  extensions: []
130
131
  extra_rdoc_files:
132
+ - HISTORY.md
131
133
  - Manifest.txt
134
+ - README.md
132
135
  files:
133
136
  - HISTORY.md
134
137
  - Manifest.txt
135
138
  - README.md
136
139
  - Rakefile
137
140
  - bin/pluto
138
- - config/pluto.index.yml
139
141
  - lib/pluto.rb
140
- - lib/pluto/activerecord.rb
141
142
  - lib/pluto/cli/main.rb
142
143
  - lib/pluto/cli/opts.rb
143
- - lib/pluto/connecter.rb
144
- - lib/pluto/fetcher.rb
145
- - lib/pluto/formatter.rb
146
- - lib/pluto/installer.rb
147
- - lib/pluto/lister.rb
148
- - lib/pluto/manifest_helpers.rb
149
- - lib/pluto/models/activity.rb
150
- - lib/pluto/models/feed.rb
151
- - lib/pluto/models/item.rb
152
- - lib/pluto/models/site.rb
153
- - lib/pluto/models/subscription.rb
154
- - lib/pluto/models/utils.rb
155
- - lib/pluto/refresher.rb
156
- - lib/pluto/schema.rb
157
- - lib/pluto/subscriber.rb
158
- - lib/pluto/tasks/env.rake
159
- - lib/pluto/tasks/setup.rake
160
- - lib/pluto/tasks/stats.rake
161
- - lib/pluto/tasks/update.rake
162
- - lib/pluto/updater.rb
163
- - lib/pluto/version.rb
164
- - test/helper.rb
165
- - test/test_helpers.rb
166
- - .gemtest
144
+ - lib/pluto/cli/version.rb
167
145
  homepage: https://github.com/feedreader/pluto
168
146
  licenses:
169
147
  - Public Domain
148
+ metadata: {}
170
149
  post_install_message:
171
150
  rdoc_options:
172
- - --main
151
+ - "--main"
173
152
  - README.md
174
153
  require_paths:
175
154
  - lib
176
155
  required_ruby_version: !ruby/object:Gem::Requirement
177
- none: false
178
156
  requirements:
179
- - - ! '>='
157
+ - - ">="
180
158
  - !ruby/object:Gem::Version
181
159
  version: 1.9.2
182
160
  required_rubygems_version: !ruby/object:Gem::Requirement
183
- none: false
184
161
  requirements:
185
- - - ! '>='
162
+ - - ">="
186
163
  - !ruby/object:Gem::Version
187
164
  version: '0'
188
165
  requirements: []
189
- rubyforge_project: pluto
190
- rubygems_version: 1.8.17
166
+ rubyforge_project:
167
+ rubygems_version: 2.4.2
191
168
  signing_key:
192
- specification_version: 3
169
+ specification_version: 4
193
170
  summary: pluto - Another Planet Generator
194
- test_files:
195
- - test/test_helpers.rb
171
+ test_files: []
data/.gemtest DELETED
File without changes
@@ -1,23 +0,0 @@
1
- #########################################
2
- # Pluto Update Index for Template Packs
3
-
4
-
5
- #############
6
- # shortcuts for fetching template packs
7
- # maps shortcut to URI
8
-
9
- blank: https://raw.github.com/feedreader/pluto.blank/master/blank.txt
10
-
11
- top: https://raw.github.com/feedreader/pluto.top/master/top.txt
12
-
13
- news: https://raw.github.com/feedreader/pluto.news/master/news.txt
14
-
15
- feeds: https://raw.github.com/feedreader/pluto.feeds/master/feeds.txt
16
-
17
- classic: https://raw.github.com/feedreader/pluto.classic/master/classic.txt
18
-
19
-
20
- ####
21
- # all:
22
- # - add why? why not??
23
- #
@@ -1,18 +0,0 @@
1
- module Pluto
2
-
3
- module ActiveRecordMethods
4
-
5
- def read_attribute_w_fallbacks( *keys )
6
- ### todo: use a different name e.g.:
7
- ## read_attribute_cascade ?? - does anything like this exists already?
8
- ## why? why not?
9
- keys.each do |key|
10
- value = read_attribute( key )
11
- return value unless value.nil?
12
- end
13
- value # fallthrough? return latest value (will be nil)
14
- end
15
-
16
-
17
- end # module ActiveRecordMethods
18
- end # module Pluto
@@ -1,96 +0,0 @@
1
- module Pluto
2
-
3
-
4
- # DB Connecter / Connection Manager
5
- # lets you establish connection
6
-
7
- class Connecter
8
-
9
- include LogUtils::Logging
10
-
11
- def initialize
12
- # do nothing for now
13
- end
14
-
15
-
16
- def debug=(value)
17
- @debug = value
18
- end
19
-
20
- def debug?
21
- @debug || false
22
- end
23
-
24
-
25
- def connect!( config = nil )
26
-
27
- if config.nil? # use/try DATABASE_URL from environment
28
-
29
- logger.debug "ENV['DATBASE_URL'] - >#{ENV['DATABASE_URL']}<"
30
-
31
- db = URI.parse( ENV['DATABASE_URL'] || 'sqlite3:///pluto.db' )
32
-
33
- if db.scheme == 'postgres'
34
- config = {
35
- adapter: 'postgresql',
36
- host: db.host,
37
- port: db.port,
38
- username: db.user,
39
- password: db.password,
40
- database: db.path[1..-1],
41
- encoding: 'utf8'
42
- }
43
- else # assume sqlite3
44
- config = {
45
- adapter: db.scheme, # sqlite3
46
- database: db.path[1..-1] # pluto.db (NB: cut off leading /, thus 1..-1)
47
- }
48
- end
49
- end # if config.nil?
50
-
51
- puts 'db settings:'
52
- pp config
53
-
54
- ### for dbbrowser and other tools add to ActiveRecord
55
-
56
- if ActiveRecord::Base.configurations.nil? # todo/check: can this ever happen? remove?
57
- puts "ActiveRecord configurations nil - set to empty hash"
58
- ActiveRecord::Base.configurations = {} # make it an empty hash
59
- end
60
-
61
- if debug?
62
- puts 'ar configurations (before):'
63
- pp ActiveRecord::Base.configurations
64
- end
65
-
66
- # note: for now always use pluto key for config storage
67
- ActiveRecord::Base.configurations['pluto'] = config
68
-
69
- if debug?
70
- puts 'ar configurations (after):'
71
- pp ActiveRecord::Base.configurations
72
- end
73
-
74
-
75
- # for debugging - disable for production use
76
- if debug?
77
- ActiveRecord::Base.logger = Logger.new( STDOUT )
78
- end
79
-
80
-
81
- ActiveRecord::Base.establish_connection( config )
82
-
83
- # first time? - auto-run db migratation, that is, create db tables
84
- unless ActivityDb::Models::Activity.table_exists?
85
- ActivityDb::CreateDb.new.up
86
- end
87
-
88
- unless Models::Feed.table_exists?
89
- CreateDb.new.up
90
- end
91
- end # method connect!
92
-
93
-
94
- end # class Connecter
95
-
96
- end # module Pluto