retr0h-that 0.0.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.
- data/LICENSE +20 -0
- data/README.rdoc +11 -0
- data/VERSION.yml +4 -0
- data/VERSION_to_PUBDATE.yml +2 -0
- data/bin/that +7 -0
- data/lib/that.rb +48 -0
- data/spec/spec_helper.rb +9 -0
- data/spec/that_spec.rb +7 -0
- metadata +81 -0
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2009 retr0h
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
data/VERSION.yml
ADDED
data/bin/that
ADDED
data/lib/that.rb
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'simple-rss'
|
2
|
+
require 'open-uri'
|
3
|
+
|
4
|
+
module That
|
5
|
+
extend self
|
6
|
+
|
7
|
+
BLOG_URL = 'http://geminstallthat.wordpress.com/feed/'
|
8
|
+
GEM_PATH = File.join(*File.expand_path(__FILE__).split(File::Separator)[0..-3])
|
9
|
+
FEED = SimpleRSS.parse(open(BLOG_URL))
|
10
|
+
|
11
|
+
require 'date'
|
12
|
+
def recent
|
13
|
+
FEED.items.each do |f|
|
14
|
+
if f[:pubDate] >= (YAML.load_file(version_to_pubdate_filename)[current_version])
|
15
|
+
puts "#" * 30
|
16
|
+
puts f[:pubDate]
|
17
|
+
puts f[:description]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def build
|
23
|
+
version_to_pubdate_mapping
|
24
|
+
end
|
25
|
+
|
26
|
+
private
|
27
|
+
|
28
|
+
def version_string
|
29
|
+
y = YAML.load_file(version_filename)
|
30
|
+
"#{y[:minor]}.#{y[:patch]}.#{y[:major]}"
|
31
|
+
end
|
32
|
+
alias :current_version :version_string
|
33
|
+
|
34
|
+
def version_filename
|
35
|
+
File.join(That::GEM_PATH, 'VERSION.yml')
|
36
|
+
end
|
37
|
+
|
38
|
+
def version_to_pubdate_mapping
|
39
|
+
File.open(version_to_pubdate_filename, 'w+') do |f|
|
40
|
+
hash = {version_string => FEED.items.first[:pubDate]}
|
41
|
+
YAML.dump(hash, f)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def version_to_pubdate_filename
|
46
|
+
File.join(That::GEM_PATH, 'VERSION_to_PUBDATE.yml')
|
47
|
+
end
|
48
|
+
end
|
data/spec/spec_helper.rb
ADDED
data/spec/that_spec.rb
ADDED
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: retr0h-that
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- retr0h
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-04-11 00:00:00 -07:00
|
13
|
+
default_executable: that
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rake
|
17
|
+
type: :runtime
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: "0"
|
24
|
+
version:
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: simple-rss
|
27
|
+
type: :runtime
|
28
|
+
version_requirement:
|
29
|
+
version_requirements: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: "0"
|
34
|
+
version:
|
35
|
+
description:
|
36
|
+
email: john@dewey.ws
|
37
|
+
executables:
|
38
|
+
- that
|
39
|
+
extensions: []
|
40
|
+
|
41
|
+
extra_rdoc_files:
|
42
|
+
- README.rdoc
|
43
|
+
- LICENSE
|
44
|
+
files:
|
45
|
+
- README.rdoc
|
46
|
+
- VERSION.yml
|
47
|
+
- VERSION_to_PUBDATE.yml
|
48
|
+
- bin/that
|
49
|
+
- lib/that.rb
|
50
|
+
- spec/spec_helper.rb
|
51
|
+
- spec/that_spec.rb
|
52
|
+
- LICENSE
|
53
|
+
has_rdoc: true
|
54
|
+
homepage: http://github.com/retr0h/that
|
55
|
+
post_install_message:
|
56
|
+
rdoc_options:
|
57
|
+
- --inline-source
|
58
|
+
- --charset=UTF-8
|
59
|
+
require_paths:
|
60
|
+
- lib
|
61
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
62
|
+
requirements:
|
63
|
+
- - ">="
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: "0"
|
66
|
+
version:
|
67
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
|
+
requirements:
|
69
|
+
- - ">="
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
version: "0"
|
72
|
+
version:
|
73
|
+
requirements: []
|
74
|
+
|
75
|
+
rubyforge_project:
|
76
|
+
rubygems_version: 1.2.0
|
77
|
+
signing_key:
|
78
|
+
specification_version: 2
|
79
|
+
summary: A gem which used to read the last update of my blog.
|
80
|
+
test_files: []
|
81
|
+
|