ids_please 1.1.3 → 1.1.4

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: e5eca1145eebcc3de34629dfb04d82a733c1a737
4
- data.tar.gz: 36b3e6f8320c943ede668c906c4b08aeeb5b10c0
3
+ metadata.gz: abfd8471d6f8945530b16e56a69bbf70e81dac85
4
+ data.tar.gz: d22cb8dcd737384f6ca2ee0ef45c8f0662fc602f
5
5
  SHA512:
6
- metadata.gz: e8894284b0833ef54e1e2b66da26938955329afb3457b11aab9768ed11ecb080eda0ff99053fdcf3d4bd720b7441ca7822198c41ab149ff8c008b064d2382622
7
- data.tar.gz: 01a9e20f8ac53f8e776e17f04b7fb86bc713b38cf54aad8a0ae378e70e724878461bdea12f25cc302d395a6c3a646ace44dffbc03089898375680b14b0e6458a
6
+ metadata.gz: 1d354d9a275bc2147977e6d6a5c6cf6463d1aaab46e5ceba85fc2bf2f30804c1c811440031f68d006bd408a8169254cefb9c3f775eec00eec2a5d0ea8e5c1541
7
+ data.tar.gz: 4a6d187804d5ead3f0bb3a9b9d436a28d2953d32d35643ddee45325be53493a3401d045f90fc90e9962cc012dd63053859b52d13688d9896783403502b848775
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.0
6
+ - 2.1.1
7
+ - jruby-19mode # JRuby in 1.9 mode
8
+ - rbx
9
+ matrix:
10
+ allow_failures:
11
+ - rvm: rbx
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2014 Alexey Gaziev
3
+ Copyright (c) 2014-2015 Alexey Gaziev
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -18,4 +18,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
18
  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
19
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
20
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
21
+ SOFTWARE.
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # IDs, please
2
2
 
3
+ [![Build Status](https://travis-ci.org/gazay/ids_please.svg)](https://codeclimate.com/github/gazay/ids_please) [![ids_please API Documentation](https://www.omniref.com/ruby/gems/ids_please.png)](https://www.omniref.com/ruby/gems/ids_please)
4
+
3
5
  Get social network IDs or screen names from links to social network accounts.
4
6
 
5
7
  Sometimes you need to get a social network account name from a link —
@@ -8,7 +10,9 @@ or maybe to work with these accounts using social network APIs (as I do).
8
10
  Would be easier to have a library that extracts this kind of information
9
11
  from all known social networks for your pleasure.
10
12
 
11
- Sponsored by [Evil Martians](http://evilmartians.com).
13
+ <a href="https://evilmartians.com/?utm_source=ids_please">
14
+ <img src="https://evilmartians.com/badges/sponsored-by-evil-martians.svg" alt="Sponsored by Evil Martians" width="236" height="54">
15
+ </a>
12
16
 
13
17
  ## Installation
14
18
 
data/ids_please.gemspec CHANGED
@@ -19,5 +19,4 @@ Gem::Specification.new do |s|
19
19
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
20
  s.add_development_dependency 'rake'
21
21
  s.add_development_dependency 'rspec'
22
- s.add_development_dependency 'byebug'
23
22
  end
@@ -13,6 +13,8 @@ class IdsPlease
13
13
  query['id'].first
14
14
  elsif link.path =~ /\/in\//
15
15
  link.path.split('/')[2]
16
+ elsif link.path =~ /\/company\//
17
+ link.path.split('/')[2]
16
18
  end
17
19
  end
18
20
  end
@@ -11,7 +11,7 @@ class IdsPlease
11
11
  id = link.path.sub(/\A\/%23!\//, '')
12
12
  id.split(/[\/\?#]/).first
13
13
  else
14
- link.path.split('/')[1]
14
+ super
15
15
  end
16
16
  end
17
17
  end
@@ -15,7 +15,7 @@ class IdsPlease
15
15
  id = link.path.sub(/\A\/id|\A\/club|\A\/public/, '')
16
16
  id.split(/[\/\?#]/).first
17
17
  else
18
- link.path.split('/')[1]
18
+ super
19
19
  end
20
20
  end
21
21
  end
data/lib/ids_please.rb CHANGED
@@ -22,7 +22,7 @@ require_relative 'ids_please/moikrug'
22
22
 
23
23
  class IdsPlease
24
24
 
25
- VERSION = '1.1.3'
25
+ VERSION = '1.1.4'
26
26
 
27
27
  attr_accessor :original, :unrecognized, :parsed
28
28
 
@@ -48,8 +48,7 @@ class IdsPlease
48
48
  ]
49
49
 
50
50
  def initialize(*args)
51
- duped_args = args.dup
52
- @original = duped_args
51
+ @original = args.dup
53
52
  end
54
53
 
55
54
  def recognize
@@ -15,6 +15,7 @@ describe IdsPlease do
15
15
  https://www.blogger.com/blogger.g?blogID=12341234#overview/src=dashboard
16
16
  http://vk.com/vk_acc
17
17
  http://linkedin.com/in/xnutsive
18
+ http://www.linkedin.com/company/evil-martians
18
19
  http://www.linkedin.com/profile/view?id=12341234&trk=nav_responsive_tab_profile
19
20
  http://Ameblo.jp/ameba_acc
20
21
  http://reddit.com/user/reddit_acc
@@ -69,7 +70,7 @@ describe IdsPlease do
69
70
  end
70
71
 
71
72
  it 'recognizes linkedin link' do
72
- expect(@recognizer.recognized[:linkedin].count).to eq(2)
73
+ expect(@recognizer.recognized[:linkedin].count).to eq(3)
73
74
  end
74
75
 
75
76
  it 'recognizes livejournal link' do
@@ -167,7 +168,7 @@ describe IdsPlease do
167
168
  end
168
169
 
169
170
  it 'get right id from linkedin link' do
170
- expect(@recognizer.parsed[:linkedin]).to eq(['xnutsive', '12341234'])
171
+ expect(@recognizer.parsed[:linkedin]).to eq(['xnutsive', 'evil-martians', '12341234'])
171
172
  end
172
173
 
173
174
  it 'get right id from instagram link' do
data/spec/spec_helper.rb CHANGED
@@ -1,2 +1 @@
1
1
  require 'ids_please'
2
- require 'byebug'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ids_please
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - gazay
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-26 00:00:00.000000000 Z
11
+ date: 2015-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -38,20 +38,6 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: byebug
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
41
  description: Helps to get ids or screen names from links to social network accounts
56
42
  email: alex.gaziev@gmail.com
57
43
  executables: []
@@ -60,6 +46,7 @@ extra_rdoc_files:
60
46
  - LICENSE
61
47
  files:
62
48
  - ".gitignore"
49
+ - ".travis.yml"
63
50
  - Gemfile
64
51
  - LICENSE
65
52
  - README.md
@@ -108,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
108
95
  version: '0'
109
96
  requirements: []
110
97
  rubyforge_project:
111
- rubygems_version: 2.2.2
98
+ rubygems_version: 2.4.5
112
99
  signing_key:
113
100
  specification_version: 4
114
101
  summary: Helps to get ids or screen names from links to social network accounts