gree-community 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +2 -0
- data/README.md +60 -0
- data/gree-community.gemspec +3 -1
- metadata +21 -3
data/.gitignore
ADDED
data/README.md
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
# gree-community
|
2
|
+
|
3
|
+
This gem add Enumerable#weighted_sample_by mehtod.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
gem 'gree-community'
|
10
|
+
|
11
|
+
And then execute:
|
12
|
+
|
13
|
+
$ bundle
|
14
|
+
|
15
|
+
Or install it yourself as:
|
16
|
+
|
17
|
+
$ gem install gree-community
|
18
|
+
|
19
|
+
## Usage
|
20
|
+
|
21
|
+
require 'gree/community'
|
22
|
+
|
23
|
+
fetcher = GREE::Community::Fetcher.new('your_email', 'password')
|
24
|
+
|
25
|
+
community = GREE::Community.new('community id') # http://gree.jp/community/community_id
|
26
|
+
|
27
|
+
community.fetch(fetcher)
|
28
|
+
|
29
|
+
community.recent_threads.each do|thread|
|
30
|
+
thread.fetch(fetcher)
|
31
|
+
|
32
|
+
thread.recent_comments.each do|comment|
|
33
|
+
puts "#{thread.title} #{comment.user_name} #{comment.body_text}"
|
34
|
+
end
|
35
|
+
end
|
36
|
+
|
37
|
+
See source for details.
|
38
|
+
|
39
|
+
### Restrictions
|
40
|
+
|
41
|
+
* Weight is zero or positive Integer(Negative or Float is not allowed).
|
42
|
+
* Sum of weights should > 0
|
43
|
+
|
44
|
+
## Contributing
|
45
|
+
|
46
|
+
1. Fork it
|
47
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
48
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
49
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
50
|
+
5. Create new Pull Request
|
51
|
+
|
52
|
+
## Changes
|
53
|
+
|
54
|
+
### 0.0.2
|
55
|
+
|
56
|
+
Add missing dependency.
|
57
|
+
|
58
|
+
### 0.0.1
|
59
|
+
|
60
|
+
Initial release.
|
data/gree-community.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = "gree-community"
|
3
|
-
gem.version = "0.0.
|
3
|
+
gem.version = "0.0.2"
|
4
4
|
gem.authors = ["todesking"]
|
5
5
|
gem.email = ["discommunicative@gmail.com"]
|
6
6
|
gem.summary = %q{Access to GREE community.}
|
@@ -10,4 +10,6 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
11
11
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
12
12
|
gem.require_paths = ["lib"]
|
13
|
+
|
14
|
+
gem.add_runtime_dependency 'mechanize'
|
13
15
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gree-community
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,8 +9,24 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-01-
|
13
|
-
dependencies:
|
12
|
+
date: 2013-01-14 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
15
|
+
name: mechanize
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
19
|
+
- - ! '>='
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ! '>='
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '0'
|
14
30
|
description:
|
15
31
|
email:
|
16
32
|
- discommunicative@gmail.com
|
@@ -18,7 +34,9 @@ executables: []
|
|
18
34
|
extensions: []
|
19
35
|
extra_rdoc_files: []
|
20
36
|
files:
|
37
|
+
- .gitignore
|
21
38
|
- Gemfile
|
39
|
+
- README.md
|
22
40
|
- gree-community.gemspec
|
23
41
|
- lib/gree-community.rb
|
24
42
|
homepage: https://github.com/todesking/gree-community
|