app_store 0.1.0 → 0.1.2
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/VERSION +1 -1
- data/lib/app_store/user_review.rb +25 -0
- metadata +2 -2
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
@@ -14,4 +14,29 @@ class AppStore::UserReview < AppStore::Base
|
|
14
14
|
'title' => :title,
|
15
15
|
'text' => :text
|
16
16
|
}
|
17
|
+
|
18
|
+
# version on which the comment was made
|
19
|
+
def on_version
|
20
|
+
@on_version ||= title.match(/.*\(v(.*)\)$/)[1]
|
21
|
+
end
|
22
|
+
|
23
|
+
# display position of the user review
|
24
|
+
def position
|
25
|
+
@position ||= title.match(/^([0-9]+)\..*/)[1]
|
26
|
+
end
|
27
|
+
|
28
|
+
# title extracted from title without position and version
|
29
|
+
def clean_title
|
30
|
+
title.match(/^[0-9]+\. (.*) \(v.*\)$/)[1]
|
31
|
+
end
|
32
|
+
|
33
|
+
# date of the comment, extracted from user_name
|
34
|
+
def date
|
35
|
+
Time.parse user_name.match(/ on ([a-zA-Z]{3} [0-9]{1,2}, [0-9]{4})$/)[1]
|
36
|
+
end
|
37
|
+
|
38
|
+
# user_name without date
|
39
|
+
def clean_user_name
|
40
|
+
user_name.match(/^(.*) on [a-zA-Z]{3} [0-9]{1,2}, [0-9]{4}$/)[1]
|
41
|
+
end
|
17
42
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: app_store
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabien Jakimowicz
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-10 00:00:00 +01:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|