lita-onewheel-unstagram 0.0.0 → 0.0.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
  SHA256:
3
- metadata.gz: fcd2cb8f9c42c6b388e8dbdfc8025c870b6f191daa8cedd2587c33156096780c
4
- data.tar.gz: 900d1a8cc7d793483f10f8c308842f0d4c692d698ae8cbb0424bf6c6de82d11b
3
+ metadata.gz: f313465016d11bfa97000aa287088196da05265fb7bf9a8aba0847beec8b97c5
4
+ data.tar.gz: 882e14db4e0d487e82703e461f84f8dadb486fee463e5a738c4221be763f8250
5
5
  SHA512:
6
- metadata.gz: bdbe9799a9bcda88b4227f69c5d031b910d21fa7cfad025a3172c2ea771a531a261b25831035d401ece434354954ab95c4a9a2d325937d22c69544af208321b3
7
- data.tar.gz: f2b4cffbf7d80c59cc839d09200a4e73a3fa059305966d631fefb53daec43573028a852313d59de103de444e412dd261a6f355b62575284c8511beb288c325a5
6
+ metadata.gz: 36e13f4e669406258bfc348bf6b3dd0a716624b5f7abae3bd1934776babf74c1184b3ae4d1330b208ac42a112f41a125ea1b5e6ceec3e44136341256c5969c88
7
+ data.tar.gz: 361d4ea257cb54485f634292b5c6c476af08433a687db981d2fe95247929fbff683708b744d04e072d4fb622d7ffad4f275d32b4836502bc283e9f7b7ff07b21
data/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![Build Status](https://travis-ci.org/onewheelskyward/lita-onewheel-unstagram.png?branch=main)](https://travis-ci.org/onewheelskyward/lita-onewheel-unstagram)
4
4
  [![Coverage Status](https://coveralls.io/repos/onewheelskyward/lita-onewheel-unstagram/badge.png)](https://coveralls.io/r/onewheelskyward/lita-onewheel-unstagram)
5
5
 
6
- removes the igshid because duh and posts the image because I hate tracking and linkouts
6
+ removes the igshid and grabs the image for unfurling.
7
7
 
8
8
  ## Installation
9
9
 
@@ -9,11 +9,16 @@ module Lita
9
9
  fetch_url = response.matches[0][0]
10
10
  Lita.logger.info("Fetching #{fetch_url}")
11
11
 
12
- resp = RestClient.get(fetch_url)
12
+ resp = RestClient.get(fetch_url, user_agent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:21.0) Gecko/20100101 Firefox/21.0')
13
13
  quick_down = fetch_url
14
14
 
15
15
  if m = /window._sharedData = ({.*})\;/.match(resp)
16
16
  json = JSON.parse m[1]
17
+ Lita.logger.info json['entry_data']
18
+ Lita.logger.info json['entry_data']['PostPage']
19
+ Lita.logger.info json['entry_data']['PostPage'][0]
20
+ Lita.logger.info json['entry_data']['PostPage'][0]['graphql']
21
+ Lita.logger.info json['entry_data']['PostPage'][0]['graphql']['shortcode_media']
17
22
  quick_down += " #{json['entry_data']['PostPage'][0]['graphql']['shortcode_media']['display_url']}"
18
23
  end
19
24
 
@@ -1,9 +1,9 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-onewheel-unstagram"
3
- spec.version = "0.0.0"
3
+ spec.version = "0.0.1"
4
4
  spec.authors = ["Andrew Kreps"]
5
5
  spec.email = ["andrew.kreps@gmail.com"]
6
- spec.description = "Wee li'l instagram dereferencer since... it's dumb how they do it"
6
+ spec.description = "Wee li'l instagram dereferencer since... I hate igshids"
7
7
  spec.summary = "....."
8
8
  spec.homepage = "https://github.com/onewheelskyward/lita-onewheel-unstagram"
9
9
  spec.license = "MIT"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-onewheel-unstagram
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Kreps
@@ -122,7 +122,7 @@ dependencies:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0.8'
125
- description: Wee li'l instagram dereferencer since... it's dumb how they do it
125
+ description: Wee li'l instagram dereferencer since... I hate igshids
126
126
  email:
127
127
  - andrew.kreps@gmail.com
128
128
  executables: []
@@ -139,7 +139,7 @@ files:
139
139
  - lita-onewheel-unstagram.gemspec
140
140
  - spec/fixtures/fufb.html
141
141
  - spec/fixtures/t.json
142
- - spec/lita/handlers/onewheel_applenews_spec.rb
142
+ - spec/lita/handlers/onewheel_unstagram_spec.rb
143
143
  - spec/spec_helper.rb
144
144
  homepage: https://github.com/onewheelskyward/lita-onewheel-unstagram
145
145
  licenses:
@@ -168,5 +168,5 @@ summary: "....."
168
168
  test_files:
169
169
  - spec/fixtures/fufb.html
170
170
  - spec/fixtures/t.json
171
- - spec/lita/handlers/onewheel_applenews_spec.rb
171
+ - spec/lita/handlers/onewheel_unstagram_spec.rb
172
172
  - spec/spec_helper.rb