cyrax 0.5.0 → 0.5.1.beta1
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 +8 -8
- data/README.md +1 -1
- data/lib/cyrax/helpers/controller.rb +13 -7
- data/lib/cyrax/response.rb +3 -1
- data/lib/cyrax/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
ZjFlMDA4MTNmMmFhOWI0NjZlMDI5NTQ5NGU4OTU3ODA0ZWM4MmMxNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
ODVlNDdhM2I2ODk5NWI0MjlmYmYxOTBhYzc0ZGU5MTQyOGExNWRkNg==
|
7
7
|
!binary "U0hBNTEy":
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MmM5ZmY0YTI5YmRkMWQ5MGNlZjkxM2JjM2RhNDhiZjg4YmU0MjEyMDZhZDYz
|
10
|
+
OWYxZjJjNTdmOGUwM2U2YzVkZGQ2N2NkY2JlZDQ2M2I0NmQzYTk4MDI3ODM5
|
11
|
+
MjcxMjYyZDgxZDE4ZTlmYWYwYTNlODJjMTYwOGJkMjM2Yjg3ZDM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
OGIzNjMyMDRjN2YzOTQ4MjYwODYzN2ZhZWU4NWE3MzM0Yjc3OWViNTdhNjRi
|
14
|
+
ZjE5ZjgyMDdiNDcwMmUwNTFhMDQzOWE1ZmY0MjEwOWU4Y2E0YmIxZDljM2Fi
|
15
|
+
N2U3YWE5Y2JjZGVjOWQyNGY2YjBkZGRiNjMyYWM4OWM4OTM5MmM=
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Cyrax [](https://travis-ci.org/droidlabs/cyrax) [](https://codeclimate.com/github/droidlabs/cyrax)
|
1
|
+
# Cyrax [](https://travis-ci.org/droidlabs/cyrax) [](https://codeclimate.com/github/droidlabs/cyrax) [](http://roadchange.com/droidlabs/cyrax)
|
2
2
|

|
3
3
|
> Safeties disabled; combat mode engaged.
|
4
4
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Cyrax::ControllerHelper
|
2
|
-
def respond_with(*args)
|
2
|
+
def respond_with(*args, &block)
|
3
3
|
if args.present? && args.first.is_a?(Cyrax::Response)
|
4
4
|
response, options = *args
|
5
5
|
options = {
|
@@ -14,12 +14,18 @@ module Cyrax::ControllerHelper
|
|
14
14
|
result = response.result
|
15
15
|
result = result.to_model if result.respond_to?(:to_model)
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
respond_to do |format|
|
18
|
+
format.html do
|
19
|
+
# set flashes
|
20
|
+
if response.success?
|
21
|
+
flash[:notice] = options[:notice] if options[:notice].present?
|
22
|
+
else
|
23
|
+
flash.now[:notice] = options[:notice] if options[:notice].present?
|
24
|
+
flash.now[:error] = options[:error] if options[:error].present?
|
25
|
+
end
|
26
|
+
set_resource_from(response)
|
27
|
+
super(result, options, &block)
|
28
|
+
end
|
23
29
|
format.json do
|
24
30
|
render json: response.as_json
|
25
31
|
end
|
data/lib/cyrax/response.rb
CHANGED
data/lib/cyrax/version.rb
CHANGED
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.5.
|
4
|
+
version: 0.5.1.beta1
|
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
|
+
date: 2013-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -132,9 +132,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
132
132
|
version: '0'
|
133
133
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
134
|
requirements:
|
135
|
-
- - ! '
|
135
|
+
- - ! '>'
|
136
136
|
- !ruby/object:Gem::Version
|
137
|
-
version:
|
137
|
+
version: 1.3.1
|
138
138
|
requirements: []
|
139
139
|
rubyforge_project:
|
140
140
|
rubygems_version: 2.0.5
|