arnaldo 0.1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: e4c7f3b3c7ef67bc17fda91d4f2169b3e6e0e75c
4
+ data.tar.gz: 864a1fd849a7ee9254d7fa73fb713bbb236ca0a4
5
+ SHA512:
6
+ metadata.gz: 8a536ecd3c49c7f5d675dadc7ae8fa7effc8d76441d3887812d8b69611df5a46596faf067ce3a5d496097cf238872bd2ed6794569136f0dd4dcd937e360df4f1
7
+ data.tar.gz: d53b29186533bc1bb7650fb90a34d026e596c433cddb0e0a6c4d7fddffa23dc5e18fdeeca778712c402411fb56a3c5e033883bfa9d470ed62089ad1dd26ea06b
@@ -0,0 +1,14 @@
1
+ #--
2
+ # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
+ # Version 2, December 2004
4
+ #
5
+ # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
6
+ # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
7
+ #
8
+ # 0. You just DO WHAT THE FUCK YOU WANT TO.
9
+ #++
10
+ require 'open-uri'
11
+ require 'htmlentities'
12
+
13
+ require 'arnaldo/arnaldo'
14
+ require 'arnaldo/version'
@@ -0,0 +1,18 @@
1
+ #
2
+ # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
+ # Version 2, December 2004
4
+ #
5
+ # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
6
+ # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
7
+ #
8
+ # 0. You just DO WHAT THE FUCK YOU WANT TO.
9
+ #
10
+ class Arnaldo
11
+ class << self
12
+
13
+ def get(url = 'http://arnaldo.informateci.org/proverbia')
14
+ HTMLEntities.new.decode open(url).read.match(/<p id="pproverbio">(.+)<\/p>/m)[1]
15
+ end
16
+
17
+ end
18
+ end
@@ -0,0 +1,13 @@
1
+ #
2
+ # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
3
+ # Version 2, December 2004
4
+ #
5
+ # DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
6
+ # TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
7
+ #
8
+ # 0. You just DO WHAT THE FUCK YOU WANT TO.
9
+ #
10
+
11
+ class Arnaldo
12
+ VERSION = '0.1'
13
+ end
@@ -0,0 +1,8 @@
1
+ #! /usr/bin/env ruby
2
+ require 'arnaldo'
3
+
4
+ describe Arnaldo do
5
+ it 'gets a proverb' do
6
+ Arnaldo.get.length.should be > 10
7
+ end
8
+ end
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: arnaldo
3
+ version: !ruby/object:Gem::Version
4
+ version: '0.1'
5
+ platform: ruby
6
+ authors:
7
+ - Giovanni Capuano
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-02-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: htmlentities
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Get random proverbs from arnaldo.informateci.org
56
+ email: webmaster@giovannicapuano.net
57
+ executables: []
58
+ extensions: []
59
+ extra_rdoc_files: []
60
+ files:
61
+ - lib/arnaldo/arnaldo.rb
62
+ - lib/arnaldo/version.rb
63
+ - lib/arnaldo.rb
64
+ - spec/arnaldo_spec.rb
65
+ homepage: http://www.giovannicapuano.net
66
+ licenses:
67
+ - WTFPL
68
+ metadata: {}
69
+ post_install_message:
70
+ rdoc_options: []
71
+ require_paths:
72
+ - lib
73
+ required_ruby_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ required_rubygems_version: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ requirements: []
84
+ rubyforge_project:
85
+ rubygems_version: 2.0.3
86
+ signing_key:
87
+ specification_version: 4
88
+ summary: The Arnaldo gem.
89
+ test_files:
90
+ - spec/arnaldo_spec.rb