free-art-exhibits-cli-gem 0.4.0 → 0.5.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 +4 -4
- data/README.md +7 -7
- data/bin/free-art-exhibits +1 -1
- data/lib/free_art_exhibits/exhibit.rb +7 -7
- data/lib/free_art_exhibits/scraper.rb +5 -1
- data/lib/free_art_exhibits/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 21d0bd42f20673de5cb6b09ad67aff93e4f280db
|
|
4
|
+
data.tar.gz: 69e3b824c06f3ebec1e4cdbc2d5c3699456d287a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6dd5a87f27939f38a7af0d6e7525d0ad5a13b7a2471c979c22f347681c86b9cc4a7e93fb31c9bbfb83bf09e203b9ebc67289fca14f126ab3af868aecace32ef4
|
|
7
|
+
data.tar.gz: b6a7faad933ed6c0ed8128f64bed784cc0eeb5a80fe9231f04d04de078398b5a8241fb9445268ae0a07322c02adda7705695390cd14f943aa8ef2822a38607a1
|
data/README.md
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
# FreeArtExhibits
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
|
3
|
+
This gem provides a list of free art exhibits in New York City, scraped from Time Out New York's website.
|
|
6
4
|
|
|
7
5
|
## Installation
|
|
8
6
|
|
|
9
7
|
Add this line to your application's Gemfile:
|
|
10
8
|
|
|
11
9
|
```ruby
|
|
12
|
-
gem '
|
|
10
|
+
gem 'free-art-exhibits-cli-gem', '~> 0.4.0'
|
|
13
11
|
```
|
|
14
12
|
|
|
15
13
|
And then execute:
|
|
16
14
|
|
|
17
|
-
$ bundle
|
|
15
|
+
$ bundle install
|
|
18
16
|
|
|
19
17
|
Or install it yourself as:
|
|
20
18
|
|
|
21
|
-
$ gem install
|
|
19
|
+
$ gem install free-art-exhibits-cli-gem
|
|
22
20
|
|
|
23
21
|
## Usage
|
|
24
22
|
|
|
25
|
-
|
|
23
|
+
Type the command bellow and follow the on-screen prompts.
|
|
24
|
+
|
|
25
|
+
$ free-art-exhibits
|
|
26
26
|
|
|
27
27
|
## Development
|
|
28
28
|
|
data/bin/free-art-exhibits
CHANGED
|
@@ -4,13 +4,13 @@ class FreeArtExhibits::Exhibit
|
|
|
4
4
|
attr_accessor :url,:title, :description
|
|
5
5
|
@@all = []
|
|
6
6
|
|
|
7
|
-
def self.new_from_index_page(exhibit)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
end
|
|
7
|
+
# def self.new_from_index_page(exhibit)
|
|
8
|
+
# self.new(
|
|
9
|
+
# "http://www.timeout.com" + exhibit.css("a.read-more").attr("href").value + "#tab_panel_2",
|
|
10
|
+
# exhibit.css("h3 a").text,
|
|
11
|
+
# exhibit.css("p.feature_item__annotation--truncated").text
|
|
12
|
+
# )
|
|
13
|
+
# end
|
|
14
14
|
|
|
15
15
|
def initialize(url, title, description)
|
|
16
16
|
@url = url
|
|
@@ -14,7 +14,11 @@ class FreeArtExhibits::Scraper
|
|
|
14
14
|
|
|
15
15
|
def make_exhibits
|
|
16
16
|
scrape_index_page.each do |exhibit|
|
|
17
|
-
|
|
17
|
+
FreeArtExhibits::Exhibit.new(
|
|
18
|
+
"http://www.timeout.com" + exhibit.css("a.read-more").attr("href").value + "#tab_panel_2",
|
|
19
|
+
exhibit.css("h3 a").text,
|
|
20
|
+
exhibit.css("p.feature_item__annotation--truncated").text
|
|
21
|
+
)
|
|
18
22
|
end
|
|
19
23
|
end
|
|
20
24
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: free-art-exhibits-cli-gem
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Prateek Vasireddy
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-06-
|
|
11
|
+
date: 2016-06-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|