cinch-reddit 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,5 +18,5 @@ Gem::Specification.new do |gem|
18
18
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
19
19
  gem.name = "cinch-reddit"
20
20
  gem.require_paths = ["lib"]
21
- gem.version = "1.1.0"
21
+ gem.version = "1.1.1"
22
22
  end
@@ -108,6 +108,7 @@ module Cinch
108
108
 
109
109
  match /link (\S+)/, method: :linkLookup
110
110
  def linkLookup(m, query)
111
+ return nil unless URI.parse(query).host.end_with?('reddit.com')
111
112
  thing_id = URI.parse(query).path.split('/')[4]
112
113
  url = "%s/api/info.json?id=t3_%s" % [RedditBaseUrl, thing_id]
113
114
  data = JSON.parse(urlload url)["data"]["children"][0]["data"] rescue nil
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cinch-reddit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-16 00:00:00.000000000 Z
12
+ date: 2012-05-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cinch
16
- requirement: &70309974332900 !ruby/object:Gem::Requirement
16
+ requirement: &70248301153720 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70309974332900
24
+ version_requirements: *70248301153720
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: json
27
- requirement: &70309974093780 !ruby/object:Gem::Requirement
27
+ requirement: &70248301153120 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70309974093780
35
+ version_requirements: *70248301153120
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: actionpack
38
- requirement: &70309974093360 !ruby/object:Gem::Requirement
38
+ requirement: &70248301152100 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,7 +43,7 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70309974093360
46
+ version_requirements: *70248301152100
47
47
  description: ! " This is a simple reddit plugin for the excellent cinch irc bot
48
48
  framework.\n It provides a few simple commands, !karma, !mods, and !readers.\n
49
49
  \ See the github page for more details\n"