gree-community 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/LICENSE +7 -0
- data/README.md +9 -8
- data/gree-community.gemspec +1 -1
- data/lib/gree-community.rb +5 -2
- metadata +5 -3
data/Gemfile
CHANGED
data/LICENSE
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
Copyright (c) 2013 todesking
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
+
|
5
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
+
|
7
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# gree-community
|
2
2
|
|
3
|
-
|
3
|
+
Access to GREE community.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -36,11 +36,6 @@ Or install it yourself as:
|
|
36
36
|
|
37
37
|
See source for details.
|
38
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
39
|
## Contributing
|
45
40
|
|
46
41
|
1. Fork it
|
@@ -51,10 +46,16 @@ See source for details.
|
|
51
46
|
|
52
47
|
## Changes
|
53
48
|
|
49
|
+
### 0.0.3
|
50
|
+
|
51
|
+
* Update Gemfile.
|
52
|
+
* Add license
|
53
|
+
* Add Thread::Comment#user_id
|
54
|
+
|
54
55
|
### 0.0.2
|
55
56
|
|
56
|
-
Add missing dependency.
|
57
|
+
* Add missing dependency.
|
57
58
|
|
58
59
|
### 0.0.1
|
59
60
|
|
60
|
-
Initial release.
|
61
|
+
* Initial release.
|
data/gree-community.gemspec
CHANGED
data/lib/gree-community.rb
CHANGED
@@ -52,9 +52,10 @@ module GREE
|
|
52
52
|
children[3..-1]
|
53
53
|
Comment.new(
|
54
54
|
id,
|
55
|
-
user_name: comment.at('.item strong').text,
|
55
|
+
user_name: comment.at('.item strong a').text,
|
56
|
+
user_id: comment.at('.item strong a').attr(:href).match(%r{gree\.jp/(\d+)})[1],
|
56
57
|
body_text: body.map{|elm| elm.name == 'br' ? "\n" : elm.text }.join('').gsub(//,''),
|
57
|
-
time:
|
58
|
+
time: Time.strptime(comment.at('.shoulder .timestamp').text, '%m/%d %H:%M'),
|
58
59
|
)
|
59
60
|
}
|
60
61
|
nil
|
@@ -64,9 +65,11 @@ module GREE
|
|
64
65
|
@id=id
|
65
66
|
@body_text = values[:body_text]
|
66
67
|
@user_name = values[:user_name]
|
68
|
+
@user_id = values[:user_id]
|
67
69
|
@time = values[:time]
|
68
70
|
end
|
69
71
|
attr_reader :id
|
72
|
+
attr_reader :user_id
|
70
73
|
attr_reader :user_name
|
71
74
|
attr_reader :body_text
|
72
75
|
attr_reader :time
|
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.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: mechanize
|
@@ -36,6 +36,7 @@ extra_rdoc_files: []
|
|
36
36
|
files:
|
37
37
|
- .gitignore
|
38
38
|
- Gemfile
|
39
|
+
- LICENSE
|
39
40
|
- README.md
|
40
41
|
- gree-community.gemspec
|
41
42
|
- lib/gree-community.rb
|
@@ -59,8 +60,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
59
60
|
version: '0'
|
60
61
|
requirements: []
|
61
62
|
rubyforge_project:
|
62
|
-
rubygems_version: 1.8.
|
63
|
+
rubygems_version: 1.8.19
|
63
64
|
signing_key:
|
64
65
|
specification_version: 3
|
65
66
|
summary: Access to GREE community.
|
66
67
|
test_files: []
|
68
|
+
has_rdoc:
|