grailbird_updater 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 247f2aebfc95feb7b5940490810f185e2b604172
4
+ data.tar.gz: c81361008b3c91e1cbf5490754dbfe98523c8659
5
+ SHA512:
6
+ metadata.gz: aedc862dcf58dae6aa349ff161062a8142f752a78480ba6963c0ef8d4b2b8565ac684487174c3c089707938eb0ebb678c1cb77f26345511f70077fc509c18c1a
7
+ data.tar.gz: 45279f4c9099a268f21c1de13ea4ecff20a15c9f55a4ef26fb9a21032933c01e83a85dbd446e0327f010084406b68d8c10dcf17ec771045b4ee249458fe8c278
data/README.md CHANGED
@@ -1,112 +1,112 @@
1
- # GrailbirdUpdater
2
-
3
- For the most of the people who know me online, I've been dying to get a copy of
4
- my Twitter archive from Twitter for forever. I was finally given one and
5
- decided to write a quick script to keep my own archive up-to-date.
6
-
7
- Turns out the contents in the archive are partial/trimmed API responses from
8
- the Twitter API, so it is actually possible to drop a whole API response in
9
- there, do some sorting and update the archive.
10
-
11
-
12
- ## Installation
13
-
14
- Install it yourself as:
15
-
16
- $ gem install grailbird_updater
17
-
18
- Or add this line to your application's Gemfile:
19
-
20
- gem 'grailbird_updater'
21
-
22
- And then execute:
23
-
24
- $ bundle
25
-
26
- ## Usage
27
-
28
- ```
29
- grailbird_updater /path/to/twitter/archive
30
- ```
31
-
32
- ## Contributing
33
-
34
- 1. Fork it
35
- 2. Create your feature branch (`git checkout -b my-new-feature`)
36
- 3. Commit your changes (`git commit -am 'Add some feature'`)
37
- 4. Push to the branch (`git push origin my-new-feature`)
38
- 5. Create new Pull Request
39
-
40
- ## FAQ
41
-
42
- * _I have a protected Twitter account, can I still use this updater with my Twitter archive?_
43
-
44
- Actually, yes! However, you will need to create your own "application" on
45
- Twitter and then use your own consumer key/secret pair to let the application
46
- use the oauth tokens for a user and then follow the authorization steps for
47
- a given protected user.
48
-
49
- Once you have auth'd the application for a protected user, you do not have to do
50
- it again, the consumer key/secret and oauth token/secret are stored in a YAML file
51
- at the root of your tweet archive.
52
-
53
- __IMPORTANT__ Do NOT commit or post your own consumer key/secret or your oauth
54
- token/secret anywhere.
55
-
56
- Note: you will only need to create a single application on Twitter even if you
57
- are using this to update multiple protected account. You can reuse the consumer
58
- key/secret and just authorize each account individually.
59
-
60
- Please see [this wiki article](https://github.com/DeMarko/grailbird_updater/wiki/Authorizing-grailbird_updater-to-work-with-Protected-Twitter-accounts) for step-by-step instructions.
61
-
62
- * _How do I know if I have a Twitter archive?_
63
-
64
- Hopefully, you downloaded it from Twitter once the feature was made available
65
- to you and have their web application which can consume it.
66
-
67
- This gem only modifies what's in the `data` directory for a given archive,
68
- the rest of the files are provided by Twitter.
69
-
70
- To check if you can download a copy of your Twitter archive, go to your
71
- [Account Settings](https://twitter.com/settings/account) and scroll all
72
- the way to the bottom. If the feature is enabled for you, you should see
73
- a section labeled "Your Twitter Archive".
74
-
75
- The file structure looks somewhat like this (as of 19.12.12):
76
-
77
-
78
- ```
79
- tweets
80
- ├── README.txt
81
- ├── css
82
- │   └─ ... // provided by Twitter
83
- ├── data
84
- │   ├── csv
85
- │   │   ├── 2007_03.csv
86
- │   │   ├── 2007_04.csv
87
- │   │   ├── 2007_05.csv
88
- │   │   ├─ ...
89
- │   │   ├── 2012_10.csv
90
- │   │   ├── 2012_11.csv
91
-    │   └── 2012_12.csv
92
-    └── js
93
- │   ├── payload_details.js
94
- │   ├── tweet_index.js
95
- │   ├── tweets
96
- │   │   ├── 2007_03.js
97
- │   │   ├── 2007_04.js
98
- │   │   ├── 2007_05.js
99
- │   │   ├─ ... // you get the idea, I've been on Twitter a while
100
- │   │   ├── 2012_10.js
101
- │   │   ├── 2012_11.js
102
- │   │   └── 2012_12.js
103
-    └── user_details.js
104
- ├── img
105
- │   └─ ... // provided by Twitter
106
- ├── index.html
107
- ├── js
108
-    └─ ... // provided by Twitter
109
- └── lib
110
- └─ ... // provided by Twitter
111
- ```
112
-
1
+ # GrailbirdUpdater
2
+
3
+ For the most of the people who know me online, I've been dying to get a copy of
4
+ my Twitter archive from Twitter for forever. I was finally given one and
5
+ decided to write a quick script to keep my own archive up-to-date.
6
+
7
+ Turns out the contents in the archive are partial/trimmed API responses from
8
+ the Twitter API, so it is actually possible to drop a whole API response in
9
+ there, do some sorting and update the archive.
10
+
11
+
12
+ ## Installation
13
+
14
+ Install it yourself as:
15
+
16
+ $ gem install grailbird_updater
17
+
18
+ Or add this line to your application's Gemfile:
19
+
20
+ gem 'grailbird_updater'
21
+
22
+ And then execute:
23
+
24
+ $ bundle
25
+
26
+ ## Usage
27
+
28
+ ```
29
+ grailbird_updater /path/to/twitter/archive
30
+ ```
31
+
32
+ To run as a cronjob, with the gem installed using rvm (at `/home/username/grailbird` in this example)
33
+
34
+ ```
35
+ @daily /bin/bash -l -c 'cd /home/username/grailbird && grailbird_updater /path/to/twitter/archive'
36
+ ```
37
+
38
+ ## Contributing
39
+
40
+ 1. Fork it
41
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
42
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
43
+ 4. Push to the branch (`git push origin my-new-feature`)
44
+ 5. Create new Pull Request
45
+
46
+ ## FAQ
47
+
48
+ * _I have a protected Twitter account, can I still use this updater with my Twitter archive?_
49
+
50
+ Actually, yes! Like with any account, as of v0.5.0, you will need to create your own "application" on
51
+ Twitter and then use your own consumer key/secret pair to let the application
52
+ use the oauth tokens for a user and then follow the authorization steps for
53
+ a given user.
54
+
55
+ Once you have auth'd the application for a user, you do not have to do
56
+ it again, the consumer key/secret and oauth token/secret are stored in a YAML file
57
+ at the root of your tweet archive (or a user specified locationo, if the --key-path flag is used).
58
+
59
+ __IMPORTANT__ Do NOT commit or post your own consumer key/secret or your oauth
60
+ token/secret anywhere.
61
+
62
+ Note: you will only need to create a single application on Twitter even if you
63
+ are using this to update multiple accounts. You can reuse the consumer
64
+ key/secret and just authorize each account individually.
65
+
66
+ Please see [this wiki article](https://github.com/DeMarko/grailbird_updater/wiki/Authorizing-grailbird_updater) for step-by-step instructions.
67
+
68
+ * _How do I know if I have a Twitter archive?_
69
+
70
+ Hopefully, you downloaded it from Twitter once the feature was made available
71
+ to you and have their web application which can consume it.
72
+
73
+ This gem only modifies what's in the `data` directory for a given archive,
74
+ the rest of the files are provided by Twitter.
75
+
76
+ To check if you can download a copy of your Twitter archive, go to your
77
+ [Account Settings](https://twitter.com/settings/account) and scroll all
78
+ the way to the bottom. If the feature is enabled for you, you should see
79
+ a section labeled "Your Twitter Archive".
80
+
81
+ The file structure looks somewhat like this (as of 09.04.13):
82
+
83
+
84
+ ```
85
+ tweets
86
+ ├── README.txt
87
+ ├── css
88
+ │   └─ application.min.css
89
+ ├── data
90
+ │   └── js
91
+    ├── payload_details.js
92
+    ├── tweet_index.js
93
+ │   ├── tweets
94
+ │   │   ├── 2007_03.js
95
+ │   │   ├── 2007_04.js
96
+ │   │   ├── 2007_05.js
97
+ │   │   ├─ ... // you get the idea, I've been on Twitter a while
98
+ │   │   ├── 2013_02.js
99
+ │   │   ├── 2013_03.js
100
+ │   │   └── 2013_04.js
101
+ │   └── user_details.js
102
+ ├── img
103
+    └─ ... // provided by Twitter
104
+ ├── index.html
105
+ ├── js
106
+ │   └─ ... // provided by Twitter
107
+ ├── lib
108
+ └─ ... // provided by Twitter
109
+ ├── README.txt
110
+ └── tweets.csv
111
+ ```
112
+
@@ -20,5 +20,4 @@ Gem::Specification.new do |gem|
20
20
  gem.add_dependency "oauth"
21
21
  gem.add_dependency "trollop"
22
22
  gem.add_dependency "colorize"
23
- gem.add_dependency "minitest"
24
23
  end
@@ -147,7 +147,7 @@ class GrailbirdUpdater
147
147
  end
148
148
 
149
149
  def get_twitter_user_timeline_response(screen_name, user_id, last_tweet_id)
150
- twitter_url = "http://api.twitter.com/1.1/statuses/user_timeline.json"
150
+ twitter_url = "https://api.twitter.com/1.1/statuses/user_timeline.json"
151
151
  twitter_uri = URI(twitter_url)
152
152
 
153
153
  params = {
@@ -236,7 +236,7 @@ EOS
236
236
  consumer = OAuth::Consumer.new(
237
237
  consumer_key,
238
238
  consumer_secret,
239
- { :site => 'http://api.twitter.com/',
239
+ { :site => 'https://api.twitter.com/',
240
240
  :request_token_path => '/oauth/request_token',
241
241
  :access_token_path => '/oauth/access_token',
242
242
  :authorize_path => '/oauth/authorize' }
@@ -271,7 +271,7 @@ EOS
271
271
 
272
272
  def prepare_access_token(consumer_key, consumer_secret, oauth_token, oauth_token_secret)
273
273
  consumer = OAuth::Consumer.new(consumer_key, consumer_secret,
274
- { :site => "http://api.twitter.com",
274
+ { :site => "https://api.twitter.com",
275
275
  :scheme => :header
276
276
  })
277
277
  # now create the access token object from passed values
@@ -1,3 +1,3 @@
1
1
  class GrailbirdUpdater
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,78 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grailbird_updater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
5
- prerelease:
4
+ version: 0.5.1
6
5
  platform: ruby
7
6
  authors:
8
7
  - Dannel Jurado
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-03-04 00:00:00.000000000 Z
11
+ date: 2014-01-16 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: oauth
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ! '>='
17
+ - - ">="
20
18
  - !ruby/object:Gem::Version
21
19
  version: '0'
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ! '>='
24
+ - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: '0'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: trollop
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: colorize
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :runtime
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- - !ruby/object:Gem::Dependency
63
- name: minitest
64
- requirement: !ruby/object:Gem::Requirement
65
- none: false
66
- requirements:
67
- - - ! '>='
68
- - !ruby/object:Gem::Version
69
- version: '0'
70
- type: :runtime
71
- prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
52
+ - - ">="
76
53
  - !ruby/object:Gem::Version
77
54
  version: '0'
78
55
  description: Twitter now allows you to download your tweets. This tool lets you keep
@@ -84,7 +61,7 @@ executables:
84
61
  extensions: []
85
62
  extra_rdoc_files: []
86
63
  files:
87
- - .gitignore
64
+ - ".gitignore"
88
65
  - Gemfile
89
66
  - LICENSE.txt
90
67
  - README.md
@@ -93,32 +70,27 @@ files:
93
70
  - grailbird_updater.gemspec
94
71
  - lib/grailbird_updater.rb
95
72
  - lib/grailbird_updater/version.rb
96
- - test/grailbird_updater_test.rb
97
- - test/test_helper.rb
98
73
  homepage: https://github.com/DeMarko/grailbird_updater
99
74
  licenses: []
75
+ metadata: {}
100
76
  post_install_message:
101
77
  rdoc_options: []
102
78
  require_paths:
103
79
  - lib
104
80
  required_ruby_version: !ruby/object:Gem::Requirement
105
- none: false
106
81
  requirements:
107
- - - ! '>='
82
+ - - ">="
108
83
  - !ruby/object:Gem::Version
109
84
  version: '0'
110
85
  required_rubygems_version: !ruby/object:Gem::Requirement
111
- none: false
112
86
  requirements:
113
- - - ! '>='
87
+ - - ">="
114
88
  - !ruby/object:Gem::Version
115
89
  version: '0'
116
90
  requirements: []
117
91
  rubyforge_project:
118
- rubygems_version: 1.8.23
92
+ rubygems_version: 2.2.0
119
93
  signing_key:
120
- specification_version: 3
94
+ specification_version: 4
121
95
  summary: A way to keep an updated archive of Twitter tweets.
122
- test_files:
123
- - test/grailbird_updater_test.rb
124
- - test/test_helper.rb
96
+ test_files: []
@@ -1,12 +0,0 @@
1
- require 'minitest/autorun'
2
-
3
- require 'grailbird_updater'
4
-
5
- class GrailbirdUpdaterTest < Minitest::Unit::TestCase
6
-
7
- # this test is stupid, just there to demonstrate infrastructure
8
- def test_creation
9
- assert_kind_of GrailbirdUpdater, GrailbirdUpdater.new(".", 10, true)
10
- end
11
- end
12
-
File without changes