twitter_snchecker 0.0.1

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: 522e5d32cb8659fef77733ef49c062cd33113d66
4
+ data.tar.gz: 0ee5a861953a7e6f4db2f8f953f2379a16280ef3
5
+ SHA512:
6
+ metadata.gz: 7ac90323c666e656ed1d8c6f836223aa9735eab47b9a92c70fa29bf935b8329bf682ed288ad48f3cc1d5f7c25718a3d1f427d7dabca64ccbd0014bc115de379f
7
+ data.tar.gz: 0c32e519fd6a927c89e22775e50a45b58e9b35c24c9864468777d6a5f363c826164374e7faf891991c56cc41c06d72aca1044ce450826dbd0d328385ea7176cc
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in twitter_snchecker.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,3 @@
1
+ 好きにしていいよ
2
+
3
+ ぱくってもこれ単体で売ってもいいよ
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # TwitterSnchecker
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'twitter_snchecker'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install twitter_snchecker
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,19 @@
1
+ require "twitter_snchecker/version"
2
+ require 'net/http'
3
+ require 'json'
4
+
5
+ module Twitter
6
+ def self.snAvailable?(screen_name)
7
+
8
+ baseurl = "https://twitter.com/users/username_available?username="
9
+
10
+ res = Net::HTTP.get_response(URI.parse(baseurl+screen_name))
11
+
12
+ if res.kind_of?(Net::HTTPOK) then
13
+ return JSON.parse(res.body)["valid"]
14
+ else
15
+ raise res.to_s
16
+ end
17
+
18
+ end
19
+ end
@@ -0,0 +1,3 @@
1
+ module TwitterSnchecker
2
+ VERSION = "0.0.1"
3
+ end
@@ -0,0 +1,3 @@
1
+ require 'twitter_snchecker'
2
+
3
+ Twitter.snAvailable?("Twitter")
@@ -0,0 +1,21 @@
1
+ # encoding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'twitter_snchecker/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "twitter_snchecker"
8
+ spec.version = TwitterSnchecker::VERSION
9
+ spec.authors = ["Ponz"]
10
+ spec.email = ["info@diconyx.net"]
11
+ spec.description = "ScreenNameが空いてるかチェックできるやつ"
12
+ spec.summary = "ScreenNameが空いてるかチェックできるやつ"
13
+ spec.homepage = "https://github.com/dpon/twitter_snchecker"
14
+ spec.license = ""
15
+
16
+ spec.files = `git ls-files`.split($/)
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ["lib"]
20
+
21
+ end
metadata ADDED
@@ -0,0 +1,54 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: twitter_snchecker
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Ponz
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-08-20 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: ScreenNameが空いてるかチェックできるやつ
14
+ email:
15
+ - info@diconyx.net
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - .gitignore
21
+ - Gemfile
22
+ - LICENSE.txt
23
+ - README.md
24
+ - Rakefile
25
+ - lib/twitter_snchecker.rb
26
+ - lib/twitter_snchecker/version.rb
27
+ - spec/spec_helper.rb
28
+ - twitter_snchecker.gemspec
29
+ homepage: https://github.com/dpon/twitter_snchecker
30
+ licenses:
31
+ - ''
32
+ metadata: {}
33
+ post_install_message:
34
+ rdoc_options: []
35
+ require_paths:
36
+ - lib
37
+ required_ruby_version: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - '>='
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ required_rubygems_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ requirements: []
48
+ rubyforge_project:
49
+ rubygems_version: 2.0.3
50
+ signing_key:
51
+ specification_version: 4
52
+ summary: ScreenNameが空いてるかチェックできるやつ
53
+ test_files:
54
+ - spec/spec_helper.rb