sosowa 0.9 → 1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 1.0
2
+
3
+ * created_at, updated_atで%Y/%m/%d %H:%M:%S形式で返すよう変更
4
+
1
5
  ## 0.9
2
6
 
3
7
  * バグを修正
data/lib/sosowa/parser.rb CHANGED
@@ -46,8 +46,8 @@ module Sosowa
46
46
  log = parse_absolute_log_number(page)
47
47
  key = tr.search(%{td[@class="title cell_title"] > a})[0].attributes["href"].value.gsub(/^.+key=(.+?)&.+$/, '\1').to_i
48
48
  author = tr.search(%{td[@class="cell_author"]})[0].inner_html.to_s.strip
49
- created_at = Time.parse(tr.search(%{td[@class="cell_created"]})[0].inner_html.to_s.strip)
50
- updated_at = Time.parse(tr.search(%{td[@class="cell_lastup"]})[0].inner_html.to_s.strip)
49
+ created_at = Time.parse(tr.search(%{td[@class="cell_created"]})[0].inner_html.to_s.strip).strftime("%Y/%m/%d %H:%M:%S")
50
+ updated_at = Time.parse(tr.search(%{td[@class="cell_lastup"]})[0].inner_html.to_s.strip).strftime("%Y/%m/%d %H:%M:%S")
51
51
  eval = tr.search(%{td[@class="cell_eval"]})[0].inner_html.to_s.strip.split("/")
52
52
  review_count = eval[1].to_i
53
53
  comment_count = eval[0].to_i
data/lib/sosowa/scheme.rb CHANGED
@@ -69,8 +69,8 @@ module Sosowa
69
69
  :tags => tags,
70
70
  :log => log,
71
71
  :key => key,
72
- :created_at => Time.parse(header[1][1]),
73
- :updated_at => Time.parse(header[2][1]),
72
+ :created_at => Time.parse(header[1][1]).strftime("%Y/%m/%d %H:%M:%S"),
73
+ :updated_at => Time.parse(header[2][1]).strftime("%Y/%m/%d %H:%M:%S"),
74
74
  :review_count => review[1].to_i,
75
75
  :comment_count => review[0].to_i,
76
76
  :point => header[4][1].to_i,
@@ -1,3 +1,3 @@
1
1
  module Sosowa
2
- VERSION = "0.9"
2
+ VERSION = "1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sosowa
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.9'
4
+ version: '1.0'
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: 2012-08-20 00:00:00.000000000 Z
12
+ date: 2012-08-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri
@@ -68,7 +68,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
68
68
  version: '0'
69
69
  segments:
70
70
  - 0
71
- hash: -789369966723957202
71
+ hash: -142613809827686151
72
72
  required_rubygems_version: !ruby/object:Gem::Requirement
73
73
  none: false
74
74
  requirements:
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  version: '0'
78
78
  segments:
79
79
  - 0
80
- hash: -789369966723957202
80
+ hash: -142613809827686151
81
81
  requirements: []
82
82
  rubyforge_project:
83
83
  rubygems_version: 1.8.24