flexible_api 0.0.1 → 0.0.4

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.
@@ -18,7 +18,7 @@ module FlexibleApi
18
18
  def to_hash
19
19
  {
20
20
  :name => @name,
21
- :fields => select_field + notations.keys,
21
+ :fields => display_field + notations.keys,
22
22
  :includes => @includes.map do |inc|
23
23
  { :name => inc[:name], :type => inc[:association].name.to_s.pluralize.underscore.downcase, :request_level => inc[:request_level].name }
24
24
  end
@@ -85,6 +85,14 @@ module FlexibleApi
85
85
  end
86
86
  end
87
87
 
88
+ def display_field
89
+ @display_field_array ||= begin
90
+ displays = @display_fields.to_a
91
+ @eaten_levels.each { |l| displays.concat l.display_field }
92
+ displays
93
+ end
94
+ end
95
+
88
96
  def include_field
89
97
  @include_field_array ||= begin
90
98
  includes = @includes.map { |i| i[:association].name }
@@ -1,5 +1,5 @@
1
1
  module FlexibleApi
2
2
 
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.4'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexible_api
3
3
  version: !ruby/object:Gem::Version
4
- hash: 29
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 1
10
- version: 0.0.1
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - John Crepezzi
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-28 00:00:00 +01:00
18
+ date: 2011-03-29 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  requirements: []
105
105
 
106
106
  rubyforge_project: flexible_api
107
- rubygems_version: 1.6.2
107
+ rubygems_version: 1.4.1
108
108
  signing_key:
109
109
  specification_version: 3
110
110
  summary: A flexible API for making APIs