cyrax 0.3.6 → 0.3.7

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.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ZDUwZDAwMmI2ZDA0ODYwMmRjMGFhMzZmN2EyMzBmYjc4N2QyNWQxZA==
4
+ ZWZlN2M4YjZiODVmYWUwNzQ4YjEzODRjZTZiOGJlZWI4NjcxZmI1Nw==
5
5
  data.tar.gz: !binary |-
6
- MGIyYmJhMWJlMjIyN2NlYmI3ZWVkYzBiMGY0MzMwNGFmMWU2MGEzMQ==
6
+ OGY1YjU5YmJkNTBkYWFiODc1NzVkMDMwMmU5Mzg2ZGQxZThkOWY2Ng==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- N2Q3YTIyOTM2MzdkNzRiZjhiYTRjNzY3MGFiNDQ0NTU5ZjBiYjcxYzk4ODli
10
- MzgyMDZkMWZmOGRmZTNmZTJmOGNmNzZjNTc5MTNiMDFiMDBkNjhjZjQwZjlh
11
- NDg5Zjg1ZTQwMDZmNjBlODIxMzdhZmY1MmIwZmU3MzdjNzViNWQ=
9
+ NDdjMjg3MjI1ODkzZjk4MjRmODJhNzNjNjNlOWZkZTkwOWRlY2FlMjFmZWI0
10
+ YzY4MzE0ZDRiZmMxNDQ0NTdmODZkNzA2Y2RhMzJjNzI2MjZmYzA3ODMwN2M3
11
+ NDAzOGEwMDQ4NjY5ZThjYTI2NzEyYzkyNTNjZDM1NTllNTNmZGE=
12
12
  data.tar.gz: !binary |-
13
- MDBkMWQwY2Y5ZWRkMWMwYWUyZTYyZDlhZmMyMzU5OTUzMjEyY2RlZjdmMDk0
14
- ZDVkMGYyNDBmMTM5ZDE0NzQ2MDU3ZDIzMzgwMDA1YTQ5MTI0ZGU0MmU5MGJj
15
- ZDcxN2NhMmE5MzBhZGMxZDM1YTZmNzRlNWIxNjhmOTgxZjVmZWU=
13
+ OTZlNmRiZjJlNzcwZThhMGFlMzRkMGFiY2NhNmQ3NDU0MGI4ZDgxNmJkODNm
14
+ NGMyNzRhZTc0MDM1MjYyMDY5MGE2NjY5MDVhMjY3N2ZmODU2NGE5ZjJhNjVl
15
+ MzQ2Yzg2NTBkZWRkMDY3NzNhODBlNTlmMWE5ZTBiNGI3MzMyZWM=
@@ -20,6 +20,10 @@ module Cyrax::Presenters
20
20
  end
21
21
  end
22
22
 
23
+ def as_json(*args)
24
+ presented_collection.as_json(*args)
25
+ end
26
+
23
27
  def method_missing(method, *args, &block)
24
28
  return super unless collection.respond_to?(method)
25
29
  collection.send(method, *args, &block)
@@ -2,7 +2,7 @@ class Cyrax::Response
2
2
  attr_accessor :message, :errors, :assignments,
3
3
  :result, :resource_name, :options
4
4
 
5
- def initialize(resource_name, result, options)
5
+ def initialize(resource_name, result, options = {})
6
6
  @resource_name = resource_name
7
7
  @result = result
8
8
  @options = options
data/lib/cyrax/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Cyrax
2
- VERSION = "0.3.6"
2
+ VERSION = "0.3.7"
3
3
  end
@@ -59,7 +59,7 @@ module Cyrax
59
59
  describe '#respond_with' do
60
60
  before { subject.stub(:response_name).and_return(:foo) }
61
61
  it 'calls Cyrax::Response' do
62
- Cyrax::Response.should_receive(:new).with(:foo, 'bar').and_return(double.as_null_object)
62
+ Cyrax::Response.should_receive(:new).with(:foo, 'bar', {as: nil}).and_return(double.as_null_object)
63
63
  subject.respond_with('bar')
64
64
  end
65
65
 
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,6 @@
1
+ ENV["RAILS_ENV"] ||= 'test'
1
2
  if ENV['COVERAGE']
2
3
  require 'simplecov'
3
4
  SimpleCov.start
4
5
  end
5
-
6
- require 'cyrax'
6
+ require 'cyrax'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cyrax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.6
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Droidlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-11-08 00:00:00.000000000 Z
11
+ date: 2013-11-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -66,6 +66,90 @@ dependencies:
66
66
  - - ! '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ! '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ! '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: sqlite3
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ! '>='
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ! '>='
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: mocha
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ! '>='
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rspec-rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ! '>='
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: shoulda-matchers
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ! '>='
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ! '>='
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: factory_girl_rails
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ! '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ! '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
69
153
  description: Small library for adding service layer to Rails projects
70
154
  email:
71
155
  executables: []