chillax 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/bin/chillax +3 -0
- data/lib/twitter_scrape.rb +23 -0
- metadata +49 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8288215fa086247b4a6c110d60e3aad902cdac74
|
4
|
+
data.tar.gz: fe615750fcc4b63dc272963dc2166ab447cd4251
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2b0a7fde90d4bb7c52118c4dd24068191c40fcb56746a674eda86ca98024a16fbc433a1797d54ec39dee806076576e269096118a88b8230de9f8eb88a6be7c39
|
7
|
+
data.tar.gz: 72ea880717d43e49b8037eeb4a978cdaf17439b2ef8046ec6fabc050199caf2c5f0ecc1e31c3d35ada1edbb8b4462238b9fce3dd32cddbc17a54dae78060e67e
|
data/bin/chillax
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
require 'open-uri'
|
2
|
+
require 'nokogiri'
|
3
|
+
|
4
|
+
domain_url = "https://twitter.com/ZenQuotes3"
|
5
|
+
|
6
|
+
|
7
|
+
scrape_page = Nokogiri::HTML(open(domain_url))
|
8
|
+
|
9
|
+
def get_data(scrape_page)
|
10
|
+
@data = scrape_page.css('p.tweet-text').text
|
11
|
+
end
|
12
|
+
|
13
|
+
def split_data
|
14
|
+
@zen_tweets = @data.split("#quotes")
|
15
|
+
end
|
16
|
+
|
17
|
+
def call_tweet
|
18
|
+
@zen_tweets[0]
|
19
|
+
end
|
20
|
+
|
21
|
+
get_data(scrape_page)
|
22
|
+
split_data
|
23
|
+
puts call_tweet
|
metadata
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: chillax
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Rosie Hoyem
|
8
|
+
- Charlotte Chang
|
9
|
+
- David Cameron
|
10
|
+
- Sonja Hall
|
11
|
+
autorequire:
|
12
|
+
bindir: bin
|
13
|
+
cert_chain: []
|
14
|
+
date: 2013-10-20 00:00:00.000000000 Z
|
15
|
+
dependencies: []
|
16
|
+
description: A simple quote-driven, zen-filled way to relax.
|
17
|
+
email: sonejah21@hotmail.com
|
18
|
+
executables:
|
19
|
+
- chillax
|
20
|
+
extensions: []
|
21
|
+
extra_rdoc_files: []
|
22
|
+
files:
|
23
|
+
- lib/twitter_scrape.rb
|
24
|
+
- bin/chillax
|
25
|
+
homepage: http://rubygems.org/gems/chillax
|
26
|
+
licenses:
|
27
|
+
- MIT
|
28
|
+
metadata: {}
|
29
|
+
post_install_message:
|
30
|
+
rdoc_options: []
|
31
|
+
require_paths:
|
32
|
+
- lib
|
33
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
34
|
+
requirements:
|
35
|
+
- - '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '0'
|
43
|
+
requirements: []
|
44
|
+
rubyforge_project:
|
45
|
+
rubygems_version: 2.0.6
|
46
|
+
signing_key:
|
47
|
+
specification_version: 4
|
48
|
+
summary: Phrases to make you chill out.
|
49
|
+
test_files: []
|