peterosullivan-highrise 3.0.4 → 3.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -1
- data/lib/highrise/person.rb +10 -1
- data/lib/highrise/rfc822.rb +19 -17
- data/lib/highrise/version.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -7,8 +7,8 @@ This fork is very close to the orginal gem. I have added a few features and shor
|
|
7
7
|
|
8
8
|
###Tag methods
|
9
9
|
Highrise::Tag.delete_by_name('tag_name')
|
10
|
+
Highrise::Person.tagged_with_name('tag_name')
|
10
11
|
Highrise::Person.find(123).tagged?('tag_name')
|
11
|
-
Highrise::Person.find(123).tagged_with_name('tag_name')
|
12
12
|
|
13
13
|
###Email methods
|
14
14
|
Highrise::Person.find(123).email_address
|
data/lib/highrise/person.rb
CHANGED
@@ -47,7 +47,16 @@ module Highrise
|
|
47
47
|
def tagged? name
|
48
48
|
tags.any?{ | tag | tag['name'].to_s == name}
|
49
49
|
end
|
50
|
-
|
50
|
+
|
51
|
+
def self.tagged_with_name(tag_name)
|
52
|
+
tagged_with_id((Tag.find_by_name(tag_name)).id)
|
53
|
+
end
|
54
|
+
|
55
|
+
def self.tagged_with_id id
|
56
|
+
find_all_across_pages(:from => "/tags/#{id}.xml").select do |obj|
|
57
|
+
obj.kind_of?(Person)
|
58
|
+
end
|
59
|
+
end
|
51
60
|
|
52
61
|
def create_subject_fields_accessors
|
53
62
|
subject_data_fields.each do |subject_field_name, value|
|
data/lib/highrise/rfc822.rb
CHANGED
@@ -10,21 +10,23 @@
|
|
10
10
|
# Licensed under a Creative Commons Attribution-ShareAlike 2.5 License
|
11
11
|
# http://creativecommons.org/licenses/by-sa/2.5/
|
12
12
|
#
|
13
|
-
module
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
'\\
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
13
|
+
module Highrise
|
14
|
+
module RFC822
|
15
|
+
EmailAddress = begin
|
16
|
+
qtext = '[^\\x0d\\x22\\x5c\\x80-\\xff]'
|
17
|
+
dtext = '[^\\x0d\\x5b-\\x5d\\x80-\\xff]'
|
18
|
+
atom = '[^\\x00-\\x20\\x22\\x28\\x29\\x2c\\x2e\\x3a-' +
|
19
|
+
'\\x3c\\x3e\\x40\\x5b-\\x5d\\x7f-\\xff]+'
|
20
|
+
quoted_pair = '\\x5c[\\x00-\\x7f]'
|
21
|
+
domain_literal = "\\x5b(?:#{dtext}|#{quoted_pair})*\\x5d"
|
22
|
+
quoted_string = "\\x22(?:#{qtext}|#{quoted_pair})*\\x22"
|
23
|
+
domain_ref = atom
|
24
|
+
sub_domain = "(?:#{domain_ref}|#{domain_literal})"
|
25
|
+
word = "(?:#{atom}|#{quoted_string})"
|
26
|
+
domain = "#{sub_domain}(?:\\x2e#{sub_domain})*"
|
27
|
+
local_part = "#{word}(?:\\x2e#{word})*"
|
28
|
+
addr_spec = "#{local_part}\\x40#{domain}"
|
29
|
+
pattern = /\A#{addr_spec}\z/
|
30
|
+
end
|
29
31
|
end
|
30
|
-
end
|
32
|
+
end
|
data/lib/highrise/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peterosullivan-highrise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 13
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 3
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 3.0.
|
9
|
+
- 5
|
10
|
+
version: 3.0.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- "Marcos Tapaj\xC3\xB3s"
|