twitter2vk 0.3.9 → 0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/ChangeLog +5 -0
  2. data/bin/twitter2vk +10 -6
  3. metadata +6 -8
data/ChangeLog CHANGED
@@ -1,3 +1,8 @@
1
+ == 0.4 (Тефтели)
2
+ * Fix Twitter OAuth in reposter.
3
+ * Add --debug option to reposter.
4
+ * Show error messages from Twitter on reposting.
5
+
1
6
  == 0.3.9 (Мармелад)
2
7
  * Remove Twitter OAuth consumer key and secret from sources. Twitter policy deny
3
8
  open API keys in sources, so now you must create your own Twitter app to use
data/bin/twitter2vk CHANGED
@@ -42,12 +42,13 @@ rescue Vkontakte::VkontakteError => e
42
42
  end
43
43
  config['vk_session'] = vk.session
44
44
 
45
- # TODO. Install twitter2vk by web-service to hide API keys.
46
45
  say i18n.twitter_oauth.create('https://dev.twitter.com/apps/new')
47
- KEY = ask(i18n.twitter_oauth.key)
48
- SECRET = ask(i18n.twitter_oauth.secret)
46
+ config['twitter_consumer_key'] = ask(i18n.twitter_oauth.key)
47
+ config['twitter_consumer_secret'] = ask(i18n.twitter_oauth.secret)
49
48
 
50
- consumer = OAuth::Consumer.new(KEY, SECRET, :site => 'http://twitter.com/')
49
+ consumer = OAuth::Consumer.new(config['twitter_consumer_key'],
50
+ config['twitter_consumer_secret'],
51
+ :site => 'http://twitter.com/')
51
52
  request = consumer.get_request_token
52
53
  pin = ask(i18n.twitter(request.authorize_url))
53
54
  access = request.get_access_token(:oauth_verifier => pin)
@@ -55,8 +56,11 @@ access = request.get_access_token(:oauth_verifier => pin)
55
56
  config['twitter_token'] = access.token
56
57
  config['twitter_secret'] = access.secret
57
58
 
58
- twitter = TwitterOAuth::Client.new(:consumer_key => KEY,
59
- :consumer_secret => SECRET, :token => access.token, :secret => access.secret)
59
+ twitter = TwitterOAuth::Client.new(
60
+ :consumer_key => config['twitter_consumer_key'],
61
+ :consumer_secret => config['twitter_consumer_secret'],
62
+ :token => access.token,
63
+ :secret => access.secret)
60
64
 
61
65
  screen_name = twitter.info['screen_name']
62
66
  path = ask(i18n.config) { |q| q.default = "./#{screen_name}.yml" }
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: twitter2vk
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 3
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
- - 3
9
- - 9
10
- version: 0.3.9
8
+ - 4
9
+ version: "0.4"
11
10
  platform: ruby
12
11
  authors:
13
12
  - Andrey "A.I." Sitnik
@@ -26,12 +25,11 @@ dependencies:
26
25
  requirements:
27
26
  - - "="
28
27
  - !ruby/object:Gem::Version
29
- hash: 1
28
+ hash: 3
30
29
  segments:
31
30
  - 0
32
- - 3
33
- - 9
34
- version: 0.3.9
31
+ - 4
32
+ version: "0.4"
35
33
  type: :runtime
36
34
  version_requirements: *id001
37
35
  - !ruby/object:Gem::Dependency