airdata 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -99,6 +99,13 @@ namespaced within the `Airdata` module and accessible like this:
99
99
  Currently there are no special public methods/APIs available for these models,
100
100
  the engine is tailored primarily for data storage and access.
101
101
 
102
+ ### Ordering
103
+
104
+ Default ordering is implemented for all 3 classes. Airports and waypoints are
105
+ sorted *alphabetically* i.e. ordered by `id`, and the runways are ordered by their
106
+ `airport_id`. Remember you can always override the default ordering by using Active
107
+ Record's `.reorder` [method](http://guides.rubyonrails.org/active_record_querying.html#ordering)
108
+
102
109
  ### Airports
103
110
 
104
111
  Includes one-to-many association with the `Runways` class.
@@ -147,6 +154,7 @@ for navaids.
147
154
  ```ruby
148
155
  attr_accessible :country_code, :elevation, :freq, :ident, :lat, :lon, :name, :range
149
156
  ```
157
+
150
158
  * ident
151
159
  * name
152
160
  * frequency
@@ -174,8 +182,20 @@ rake airdata:update # Removes old Airdata and installs latest avail
174
182
 
175
183
  ```
176
184
 
185
+ ## Changelog
186
+
187
+ ### v. 0.2, 29 August 2012
188
+
189
+ * added default ordering for all 3 models. Airports and waypoints/navaids are
190
+ sorted by `id`, runways are sorted by `airport_id`
191
+
177
192
  ## Credits
178
193
 
179
194
  Copyright © 2012 [Svilen Vassilev](http://about.me/svilen)
180
195
 
196
+ *If you find my work useful or time-saving, you can endorse it or buy me a beer:*
197
+
198
+ [![endorse](http://api.coderwall.com/svilenv/endorse.png)](http://coderwall.com/svilenv)
199
+ [![Donate](https://www.paypalobjects.com/en_US/i/btn/btn_donate_SM.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5FR7AQA4PLD8A)
200
+
181
201
  Released under the [MIT LICENSE](https://github.com/tarakanbg/airdata/blob/master/LICENSE)
@@ -3,5 +3,7 @@ module Airdata
3
3
  attr_accessible :elevation, :icao, :lat, :lon, :msa, :name, :ta
4
4
 
5
5
  has_many :runways, :dependent => :destroy
6
+
7
+ default_scope order("id ASC")
6
8
  end
7
9
  end
@@ -4,5 +4,7 @@ module Airdata
4
4
  attr_accessible :ils_freq, :lat, :length, :lon, :number
5
5
 
6
6
  belongs_to :airport
7
+
8
+ default_scope order("airport_id ASC")
7
9
  end
8
10
  end
@@ -1,5 +1,7 @@
1
1
  module Airdata
2
2
  class Waypoint < ActiveRecord::Base
3
3
  attr_accessible :country_code, :elevation, :freq, :ident, :lat, :lon, :name, :range
4
+
5
+ default_scope order("id ASC")
4
6
  end
5
7
  end
@@ -1,3 +1,3 @@
1
1
  module Airdata
2
- VERSION = "0.1"
2
+ VERSION = "0.2"
3
3
  end
@@ -1,3 +1,6 @@
1
1
  Connecting to database specified by database.yml
2
2
   (10.5ms) begin transaction
3
3
   (0.0ms) rollback transaction
4
+ Connecting to database specified by database.yml
5
+  (0.2ms) begin transaction
6
+  (0.1ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airdata
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.1'
4
+ version: '0.2'
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-30 00:00:00.000000000 Z
12
+ date: 2012-08-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -162,7 +162,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
162
  version: '0'
163
163
  segments:
164
164
  - 0
165
- hash: 146581153
165
+ hash: 9243411
166
166
  required_rubygems_version: !ruby/object:Gem::Requirement
167
167
  none: false
168
168
  requirements:
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
171
171
  version: '0'
172
172
  segments:
173
173
  - 0
174
- hash: 146581153
174
+ hash: 9243411
175
175
  requirements: []
176
176
  rubyforge_project:
177
177
  rubygems_version: 1.8.24