highrise 3.0.1 → 3.0.3

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/.travis.yml CHANGED
@@ -2,6 +2,4 @@ rvm:
2
2
  - 1.9.2
3
3
  - 1.8.7
4
4
  - ree-1.8.7
5
- # branches:
6
- # only:
7
- # - master
5
+ - jruby
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- highrise (3.0.1)
4
+ highrise (3.0.3)
5
5
  activeresource (~> 3.0)
6
6
 
7
7
  GEM
@@ -17,7 +17,8 @@ GEM
17
17
  activesupport (= 3.1.0)
18
18
  activesupport (3.1.0)
19
19
  multi_json (~> 1.0)
20
- bcrypt-ruby (3.0.0)
20
+ bcrypt-ruby (3.0.1)
21
+ bcrypt-ruby (3.0.1-java)
21
22
  builder (3.0.0)
22
23
  diff-lcs (1.1.2)
23
24
  i18n (0.6.0)
@@ -35,6 +36,7 @@ GEM
35
36
  rspec-expectations (~> 2.0.1)
36
37
 
37
38
  PLATFORMS
39
+ java
38
40
  ruby
39
41
 
40
42
  DEPENDENCIES
@@ -3,7 +3,7 @@ module Highrise
3
3
  include Pagination
4
4
 
5
5
  def comments
6
- Comment.find(:all, :from => "/emails/#{email_id}/comments.xml")
6
+ Comment.find(:all, :from => "/emails/#{id}/comments.xml")
7
7
  end
8
8
  end
9
9
  end
data/lib/highrise/kase.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  module Highrise
2
2
  class Kase < Subject
3
+ include Pagination
4
+
3
5
  def open!
4
6
  update_attribute(:closed_at, nil)
5
7
  end
@@ -15,5 +17,13 @@ module Highrise
15
17
  def self.closed
16
18
  Kase.find(:all, :from => "/kases/closed.xml")
17
19
  end
20
+
21
+ def self.all_open_across_pages
22
+ find_all_across_pages(:from => "/kases/open.xml")
23
+ end
24
+
25
+ def self.all_closed_across_pages
26
+ find_all_across_pages(:from => "/kases/closed.xml")
27
+ end
18
28
  end
19
- end
29
+ end
@@ -1,3 +1,3 @@
1
1
  module Highrise
2
- VERSION = "3.0.1"
2
+ VERSION = "3.0.3"
3
3
  end
@@ -6,7 +6,7 @@ describe Highrise::Email do
6
6
  it_should_behave_like "a paginated class"
7
7
 
8
8
  it "#comments" do
9
- subject.should_receive(:email_id).and_return(1)
9
+ subject.should_receive(:id).and_return(1)
10
10
  Highrise::Comment.should_receive(:find).with(:all, {:from=>"/emails/1/comments.xml"}).and_return("comments")
11
11
  subject.comments.should == "comments"
12
12
  end
@@ -2,7 +2,9 @@ require 'spec_helper'
2
2
 
3
3
  describe Highrise::Kase do
4
4
  it { should be_a_kind_of Highrise::Subject }
5
-
5
+
6
+ it_should_behave_like "a paginated class"
7
+
6
8
  it "#close!" do
7
9
  mocked_now = Time.parse("Wed Jan 14 15:43:11 -0200 2009")
8
10
  Time.should_receive(:now).and_return(mocked_now)
@@ -14,4 +16,16 @@ describe Highrise::Kase do
14
16
  subject.should_receive(:update_attribute).with(:closed_at, nil)
15
17
  subject.open!
16
18
  end
19
+
20
+ it ".all_open_across_pages" do
21
+ subject.class.should_receive(:find).with(:all,{:from=>"/kases/open.xml",:params=>{:n=>0}}).and_return(["things"])
22
+ subject.class.should_receive(:find).with(:all,{:from=>"/kases/open.xml",:params=>{:n=>1}}).and_return([])
23
+ subject.class.all_open_across_pages.should == ["things"]
24
+ end
25
+
26
+ it ".all_closed_across_pages" do
27
+ subject.class.should_receive(:find).with(:all,{:from=>"/kases/closed.xml",:params=>{:n=>0}}).and_return(["things"])
28
+ subject.class.should_receive(:find).with(:all,{:from=>"/kases/closed.xml",:params=>{:n=>1}}).and_return([])
29
+ subject.class.all_closed_across_pages.should == ["things"]
30
+ end
17
31
  end
metadata CHANGED
@@ -1,61 +1,81 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: highrise
3
- version: !ruby/object:Gem::Version
4
- version: 3.0.1
3
+ version: !ruby/object:Gem::Version
4
+ hash: 1
5
5
  prerelease:
6
+ segments:
7
+ - 3
8
+ - 0
9
+ - 3
10
+ version: 3.0.3
6
11
  platform: ruby
7
- authors:
8
- - Marcos Tapajós
12
+ authors:
13
+ - "Marcos Tapaj\xC3\xB3s"
9
14
  - Ken Mayer
10
15
  autorequire:
11
16
  bindir: bin
12
17
  cert_chain: []
13
- date: 2011-08-31 00:00:00.000000000Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: activeresource
17
- requirement: &2153906540 !ruby/object:Gem::Requirement
18
+
19
+ date: 2011-10-05 00:00:00 Z
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ version_requirements: &id001 !ruby/object:Gem::Requirement
18
23
  none: false
19
- requirements:
24
+ requirements:
20
25
  - - ~>
21
- - !ruby/object:Gem::Version
22
- version: '3.0'
26
+ - !ruby/object:Gem::Version
27
+ hash: 7
28
+ segments:
29
+ - 3
30
+ - 0
31
+ version: "3.0"
32
+ requirement: *id001
23
33
  type: :runtime
24
34
  prerelease: false
25
- version_requirements: *2153906540
26
- - !ruby/object:Gem::Dependency
27
- name: rspec
28
- requirement: &2153905960 !ruby/object:Gem::Requirement
35
+ name: activeresource
36
+ - !ruby/object:Gem::Dependency
37
+ version_requirements: &id002 !ruby/object:Gem::Requirement
29
38
  none: false
30
- requirements:
39
+ requirements:
31
40
  - - ~>
32
- - !ruby/object:Gem::Version
41
+ - !ruby/object:Gem::Version
42
+ hash: 13
43
+ segments:
44
+ - 2
45
+ - 0
46
+ - 1
33
47
  version: 2.0.1
48
+ requirement: *id002
34
49
  type: :development
35
50
  prerelease: false
36
- version_requirements: *2153905960
37
- - !ruby/object:Gem::Dependency
38
- name: rake
39
- requirement: &2153905380 !ruby/object:Gem::Requirement
51
+ name: rspec
52
+ - !ruby/object:Gem::Dependency
53
+ version_requirements: &id003 !ruby/object:Gem::Requirement
40
54
  none: false
41
- requirements:
42
- - - =
43
- - !ruby/object:Gem::Version
55
+ requirements:
56
+ - - "="
57
+ - !ruby/object:Gem::Version
58
+ hash: 49
59
+ segments:
60
+ - 0
61
+ - 8
62
+ - 7
44
63
  version: 0.8.7
64
+ requirement: *id003
45
65
  type: :development
46
66
  prerelease: false
47
- version_requirements: *2153905380
48
- description: ! " Based on the original API module from DHH, http://developer.37signals.com/highrise/,
49
- this\n gem is a cleaned up, tested version of the same. \n\n Configure by
50
- adding the following:\n\n require 'highrise'\n Highrise::Base.site = 'http://your_site.highrisehq.com/'\n
51
- \ Highrise::Base.user = 'your_api_auth_token'\n"
52
- email:
67
+ name: rake
68
+ description: " Based on the original API module from DHH, http://developer.37signals.com/highrise/, this\n gem is a cleaned up, tested version of the same. \n\n Configure by adding the following:\n\n require 'highrise'\n Highrise::Base.site = 'http://your_site.highrisehq.com/'\n Highrise::Base.user = 'your_api_auth_token'\n"
69
+ email:
53
70
  - marcos@tapajos.me
54
71
  - kmayer@bitwrangler.com
55
72
  executables: []
73
+
56
74
  extensions: []
75
+
57
76
  extra_rdoc_files: []
58
- files:
77
+
78
+ files:
59
79
  - .gitignore
60
80
  - .travis.yml
61
81
  - Gemfile
@@ -120,32 +140,40 @@ files:
120
140
  - spec/spec_helper.rb
121
141
  homepage: http://github.com/tapajos/highrise
122
142
  licenses: []
143
+
123
144
  post_install_message:
124
145
  rdoc_options: []
125
- require_paths:
146
+
147
+ require_paths:
126
148
  - lib
127
- required_ruby_version: !ruby/object:Gem::Requirement
149
+ required_ruby_version: !ruby/object:Gem::Requirement
128
150
  none: false
129
- requirements:
130
- - - ! '>='
131
- - !ruby/object:Gem::Version
132
- version: '0'
133
- segments:
151
+ requirements:
152
+ - - ">="
153
+ - !ruby/object:Gem::Version
154
+ hash: 3
155
+ segments:
134
156
  - 0
135
- hash: -677915891012339323
136
- required_rubygems_version: !ruby/object:Gem::Requirement
157
+ version: "0"
158
+ required_rubygems_version: !ruby/object:Gem::Requirement
137
159
  none: false
138
- requirements:
139
- - - ! '>='
140
- - !ruby/object:Gem::Version
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ hash: 23
164
+ segments:
165
+ - 1
166
+ - 3
167
+ - 6
141
168
  version: 1.3.6
142
169
  requirements: []
170
+
143
171
  rubyforge_project:
144
172
  rubygems_version: 1.8.10
145
173
  signing_key:
146
174
  specification_version: 3
147
175
  summary: Ruby wrapper around Highrise API
148
- test_files:
176
+ test_files:
149
177
  - examples/config_initializers_highrise.rb
150
178
  - examples/extending.rb
151
179
  - examples/sample.rb