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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 739b8f05c62d9c8ed24f8ed390a7da03e7beb979
4
- data.tar.gz: edf231c07c1931c8a086fa33c505079bb86bd172
3
+ metadata.gz: 8e6aa7766846020e312b57b11ad0a44de5446ebb
4
+ data.tar.gz: 45502d022555d5d9d5efbd9e7ee560c508a8b247
5
5
  SHA512:
6
- metadata.gz: e1abce2104cb401ac2a71c5cf841dfd6fe89454aad006041947915871de478fc0cb7165c70321d6f5399a6e641f2e597ccf09d56e264a56e606b8b68bd5e4373
7
- data.tar.gz: 8746f32377bc4df4345d636e31c886192211f25ff3e8a159f1e55c1363baf19febedf0c608aebbce3e43abbf6ed3f6f8676ea4a57eb1d24bed12e94bcaf0bea4
6
+ metadata.gz: 3f1b9bd5819eed3309765a102ef01bc4be4863388aad05085751890e1788b15147744da308bba4896e5ec9aea5d9b09c46edd1685f57bfc5b85547e021f3281b
7
+ data.tar.gz: e8d41c9387fbdf8bb08094fdb4249cf9f0098a3b21d9c9efe50dd5ef5ebbc77569c0255107c4b7872092cc27258f9edf6c9e90bc7201a0779a56bc76bbac81a5
data/.rspec CHANGED
@@ -1,2 +1,3 @@
1
1
  --format documentation
2
2
  --color
3
+ --require spec_helper
data/Gemfile CHANGED
@@ -9,4 +9,9 @@ end
9
9
 
10
10
  group :development, :test do
11
11
  gem 'rspec'
12
+ gem 'pry-byebug'
13
+ end
14
+
15
+ group :test do
16
+ gem 'webmock'
12
17
  end
@@ -1,8 +1,10 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
+ Bundler.setup
4
5
  require "galya"
5
6
 
7
+
6
8
  # You can add fixtures and/or initialization code here to make experimenting
7
9
  # with your gem easier. You can also use a different console, if you like.
8
10
 
@@ -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 = ["Nikita Chernukhin"]
10
- spec.email = ["nuinuhin@gmail.com"]
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 = "https://github.com/Nu-hin/galya"
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 = "bin"
17
+ spec.bindir = 'bin'
18
18
  spec.executables = 'galya'
19
- spec.require_paths = ["lib"]
19
+ spec.require_paths = ['lib']
20
20
 
21
21
  spec.add_runtime_dependency 'nokogiri'
22
22
  spec.add_runtime_dependency 'cowsay'
@@ -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('.message p').map do |para|
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?)
@@ -1,3 +1,3 @@
1
1
  module Galya
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
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.0
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-02-10 00:00:00.000000000 Z
11
+ date: 2016-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri