GetToken4Twitter 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 1269fcf9b367ee28ee4280ec6d321a1fcda0646b
4
+ data.tar.gz: 772043a4952cc5b5744c86cefd80c15ef0febc1b
5
+ SHA512:
6
+ metadata.gz: 346e18c4d69c02ce3261045137e3ba17912e7cda21ab82e8ca2e5d6d31ed58b539acefcfbf472c606a040c2211f7d1f0602a0acf3f5459a00d98e3294d6c158d
7
+ data.tar.gz: 562b0c9673137f7908176cf3b65653efcc36f2636503043c01777febe90f2cd3e18e0bcf0a0c4e7b3b2dad076647fff6a0fc0b4d81786f23fd413bfc8ce473bb
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.project ADDED
@@ -0,0 +1,23 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <projectDescription>
3
+ <name>GetToken4Twitter</name>
4
+ <comment></comment>
5
+ <projects>
6
+ </projects>
7
+ <buildSpec>
8
+ <buildCommand>
9
+ <name>com.aptana.ide.core.unifiedBuilder</name>
10
+ <arguments>
11
+ </arguments>
12
+ </buildCommand>
13
+ <buildCommand>
14
+ <name>org.eclipse.dltk.core.scriptbuilder</name>
15
+ <arguments>
16
+ </arguments>
17
+ </buildCommand>
18
+ </buildSpec>
19
+ <natures>
20
+ <nature>org.eclipse.dltk.ruby.core.nature</nature>
21
+ <nature>com.aptana.ruby.core.rubynature</nature>
22
+ </natures>
23
+ </projectDescription>
data/.travis.yml ADDED
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.0.0
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in GetToken4Twitter.gemspec
4
+ gemspec
@@ -0,0 +1,24 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'GetToken4Twitter/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "GetToken4Twitter"
8
+ spec.version = GetToken4Twitter::VERSION
9
+ spec.authors = ["flum1025"]
10
+ spec.email = ["flum.1025@gmail.com"]
11
+
12
+ spec.summary = %q{Get twitter token}
13
+ spec.description = spec.summary
14
+ spec.homepage = "https://github.com/flum1025/GetToken4Twitter"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_development_dependency "bundler", "~> 1.9"
22
+ spec.add_development_dependency "rake", "~> 10.0"
23
+ spec.add_dependency 'oauth'
24
+ end
data/README.md ADDED
@@ -0,0 +1,40 @@
1
+ # GetToken4Twitter
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/GetToken4Twitter`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TwitterのAccessTokenとAccessTokenSecretを取得するプログラムです。 いちいちコンシューマーキーごとにトークン取得するのが面倒だったので作りました。
6
+ 質問等ありましたらTwitter:[@flum_](https://twitter.com/flum_)までお願いします。
7
+
8
+ ## Installation
9
+
10
+ Add this line to your application's Gemfile:
11
+
12
+ ```ruby
13
+ gem 'GetToken4Twitter'
14
+ ```
15
+
16
+ And then execute:
17
+
18
+ $ bundle
19
+
20
+ Or install it yourself as:
21
+
22
+ $ gem install GetToken4Twitter
23
+
24
+ ## Usage
25
+
26
+ 実行ファイルかirbでrequireするだけで使用することができます。
27
+
28
+ ## Development
29
+
30
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
31
+
32
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
33
+
34
+ ## Contributing
35
+
36
+ 1. Fork it ( https://github.com/[my-github-username]/GetToken4Twitter/fork )
37
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
38
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
39
+ 4. Push to the branch (`git push origin my-new-feature`)
40
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1 @@
1
+ require 'GetToken4Twitter'
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "GetToken4Twitter"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,3 @@
1
+ module GetToken4Twitter
2
+ VERSION = "0.1.0"
3
+ end
@@ -0,0 +1,28 @@
1
+ require "GetToken4Twitter/version"
2
+ require 'oauth'
3
+
4
+ print "Enter your consumer_key:"
5
+ CONSUMER_KEY = gets.chomp
6
+ print "Enter your consumer_secret:"
7
+ CONSUMER_SECRET = gets.chomp
8
+
9
+ consumer = OAuth::Consumer.new(CONSUMER_KEY ,CONSUMER_SECRET,{
10
+ :site=>"https://api.twitter.com"
11
+ })
12
+
13
+ request_token = consumer.get_request_token
14
+
15
+ puts "Please access this URL"
16
+ puts ":#{request_token.authorize_url}"
17
+ puts "and get the Pin code."
18
+
19
+ print "Enter your Pin code:"
20
+ pin = gets.chomp
21
+
22
+ access_token = request_token.get_access_token(:oauth_verifier => pin)
23
+
24
+ puts "your token is"
25
+ puts access_token.token
26
+ puts
27
+ puts "your secret is"
28
+ puts access_token.secret
metadata ADDED
@@ -0,0 +1,97 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: GetToken4Twitter
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - flum1025
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2016-03-18 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ~>
18
+ - !ruby/object:Gem::Version
19
+ version: '1.9'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ~>
25
+ - !ruby/object:Gem::Version
26
+ version: '1.9'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: oauth
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - '>='
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: Get twitter token
56
+ email:
57
+ - flum.1025@gmail.com
58
+ executables: []
59
+ extensions: []
60
+ extra_rdoc_files: []
61
+ files:
62
+ - .gitignore
63
+ - .project
64
+ - .travis.yml
65
+ - Gemfile
66
+ - GetToken4Twitter.gemspec
67
+ - README.md
68
+ - Rakefile
69
+ - bin/GetToken4Twitter.rb
70
+ - bin/console
71
+ - bin/setup
72
+ - lib/GetToken4Twitter.rb
73
+ - lib/GetToken4Twitter/version.rb
74
+ homepage: https://github.com/flum1025/GetToken4Twitter
75
+ licenses: []
76
+ metadata: {}
77
+ post_install_message:
78
+ rdoc_options: []
79
+ require_paths:
80
+ - lib
81
+ required_ruby_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ required_rubygems_version: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - '>='
89
+ - !ruby/object:Gem::Version
90
+ version: '0'
91
+ requirements: []
92
+ rubyforge_project:
93
+ rubygems_version: 2.5.2
94
+ signing_key:
95
+ specification_version: 4
96
+ summary: Get twitter token
97
+ test_files: []