galya 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rspec +1 -0
- data/Gemfile +5 -0
- data/bin/console +2 -0
- data/galya.gemspec +5 -5
- data/lib/galya.rb +2 -1
- data/lib/galya/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: 8e6aa7766846020e312b57b11ad0a44de5446ebb
|
4
|
+
data.tar.gz: 45502d022555d5d9d5efbd9e7ee560c508a8b247
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f1b9bd5819eed3309765a102ef01bc4be4863388aad05085751890e1788b15147744da308bba4896e5ec9aea5d9b09c46edd1685f57bfc5b85547e021f3281b
|
7
|
+
data.tar.gz: e8d41c9387fbdf8bb08094fdb4249cf9f0098a3b21d9c9efe50dd5ef5ebbc77569c0255107c4b7872092cc27258f9edf6c9e90bc7201a0779a56bc76bbac81a5
|
data/.rspec
CHANGED
data/Gemfile
CHANGED
data/bin/console
CHANGED
data/galya.gemspec
CHANGED
@@ -6,17 +6,17 @@ require 'galya/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = 'galya'
|
8
8
|
spec.version = Galya::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
9
|
+
spec.authors = ['Nikita Chernukhin']
|
10
|
+
spec.email = ['nuinuhin@gmail.com']
|
11
11
|
|
12
12
|
spec.summary = %q{Galya.ru wrapper library and command-line utility}
|
13
13
|
spec.description = %q{Get galya.ru quotes from command line or use them in your Ruby project}
|
14
|
-
spec.homepage =
|
14
|
+
spec.homepage = 'https://github.com/Nu-hin/galya'
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
-
spec.bindir =
|
17
|
+
spec.bindir = 'bin'
|
18
18
|
spec.executables = 'galya'
|
19
|
-
spec.require_paths = [
|
19
|
+
spec.require_paths = ['lib']
|
20
20
|
|
21
21
|
spec.add_runtime_dependency 'nokogiri'
|
22
22
|
spec.add_runtime_dependency 'cowsay'
|
data/lib/galya.rb
CHANGED
@@ -9,8 +9,9 @@ module Galya
|
|
9
9
|
def self.fetch(id)
|
10
10
|
u = URI.parse(uri(id))
|
11
11
|
html = u.read.force_encoding('cp1251').encode('utf-8')
|
12
|
+
|
12
13
|
parsed = Nokogiri::HTML(html)
|
13
|
-
parsed.css('.
|
14
|
+
parsed.css('.desc p').map do |para|
|
14
15
|
para.text.lines.map do |line|
|
15
16
|
line.strip
|
16
17
|
end.reject(&:empty?)
|
data/lib/galya/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: galya
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nikita Chernukhin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|